日志列表
-
PowerShell (北京) Windows PowerShell (Monad) Has Arrived
发表于 2009-03-31
I just got out of Bob Muglia's keynote speech where he formally announced Windows PowerShell (previously known as Monad). The key things he announced are: Monad (MSH) has a new name: Windows PowerShell Windows PowerShell will RTW (Web download) in Q4 2006 RC1 of Windows PowerShell ... ...全文
-
PowerShell (北京) Introduction to MshObject
发表于 2009-03-31
If you’ve ever worked with the Monad APIs then you’ve no doubt seen a type called System.Management.Automation.MshObject. I’m not going to go into all the details of what it is because that would take me more time than I have right now and there are people who can explain better th... ...全文
-
PowerShell (北京) Did you know? #2
发表于 2009-03-31 评论: 1
Did you know that you can make a variable automatically propagate to new scopes by using the AllScope option? Normally when you enter a new scope variables are not copied from the parent scope. Instead we do a lookup for the variable when requested. Anytime the variable is written to it ha... ...全文
-
PowerShell (北京) Did you know? #1
发表于 2009-03-31 评论: 1
Did you know? #1 Did you know that you can access the content of a provider using the variable syntax? For instance, you can get and set the contents of a file just by doing the following:MSH > ${c:\temp\foo.txt} = "bar"MSH > ${c:\temp\foo.txt}barMSH > Note, the default encoding... ...全文
-
PowerShell (北京) Did you know? #3
发表于 2009-03-31
Did you know that you can put constraints on variables using the same attributes as cmdlet parameters?Unfortunately we had to postpone the language support for this but you can still do it using new-object.MSH > $a = "foo"MSH > $varA = get-variable aMSH > $varAName &nb... ...全文
-
PowerShell (北京) Did you know? #4
发表于 2009-03-31
Did you know that you can access most of the Cmdlet base class APIs through script. using the $executioncontext variable? -Jeff Jones Published Tuesday, April 25, 2006 5:17 PM by PowerShellTeam ...全文
-
PowerShell (北京) Support for Existing apps in Monad
发表于 2009-03-31
Monad provides strong support for existing apps and technology. If you use native cmdline exes, vbscripts, batch files, perl scripts etc to manage and maintain windows, you can pretty much use them the same way from monad as you would from cmd.exe. For example, I am used to... ...全文
-
PowerShell (北京) MshObject and Methods that take object
发表于 2009-03-31
Every once in a while people ( including me) run into trouble calling methods that take object. Why? Well, as I told you earlier objects in MSH are wrapped by an invisible MshObject. As it turns out that this invisible object is not always so invisible. Take a look a... ...全文
-
PowerShell (北京) Adding Notes
发表于 2009-03-31
A while back I mentioned that there was a way of adding notes to objects in the shell. Here is one way to do it: ## Adds a note to the pipeline input. filter AddNote([string] $name, $value) { $mshObj = [System.Management.Automation.MshObject] $_; $note = new-object System.Management.AUtoma... ...全文
-
PowerShell (北京) Duplicate Files
发表于 2009-03-31
Need a way to check if two files are the same? Calculate a hash of the files. Here is one way to do it: ## Calculates the hash of a file and returns it as a string. function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $... ...全文
-
PowerShell (北京) Duplicate Files 2
发表于 2009-03-31
A long time ago I posted a filter (AddNote) for adding notes to objects. Some time later I posted a function (Get-MD5) for calculating the MD5 hash of a file and somebody asked how that could be used in a script. to list all the files in a given folder that are very likely the same.... ...全文
-
PowerShell (北京) Image Conversion
发表于 2009-03-31
I needed to convert some images from bmp to gif for a web site I've been working on. I figured that I could script. this pretty easy - here's what I came up with. It's a little more general than I needed, and I thought it might be useful to others. Anyway, it's useful to m... ...全文
-
PowerShell (北京) Teminating vs. Non-Terminating, ErrorRecord
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Debugging Monad Scripts, Part 3: Write-Host
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Debugging Monad Scripts, Part 2: $error
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Debugging Monad Scripts, Part 4: set-mshdebug
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Debugging Monad Scripts, Part 6: Trace-Expression, Breakpoint Script
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Preferences and Commandline Options
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Debugging Monad Scripts, Part 7 (Final): How Traps Work
发表于 2009-03-31
Did your command or script. fail and/or report an error? We hope to have a proper script. debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong. In this series of blog entries, I will present some of those features. ... ...全文
-
PowerShell (北京) Using-Culture -Culture culture -Script {scriptblock}
发表于 2009-03-31
One of the traditional challenges with scripting is dealing with different CULTURES. Imagine the case where you are writing a script. and you'll have to parse datetime string from different cultures. If it was just one culture, you could set the process culture and be done ... ...全文
论坛资源
- 07-30 windows powershell 实战
- 01-02 Windows PowerShell (Monad) RC1 Updated
- 06-22 用Windows PowerShell查看系统信硬件信息
- 07-10 Win Powershell遭遇病毒 微软建议升级软件
- 09-23 PowerShell远程管理 2.0 版速览

