PowerShell Team
Automating the world one-liner at a time…
Latest posts
Why Should I Test With PowerShell?
Today, on our internal discussion list, someone asked if there were any advantages to testing with PowerShell versus testing with C#. I was able to come up with 10 quick reasons to test with PowerShell: I hope these reasons help convince other software testers to use PowerShell. It can really make testing a lot simpler. Hope this helps, James Brundage [MSFT]
Using PowerShell to Protect Against Conficker (Enabling and Disabling AutoRun.inf)
On the front page of MSN.com today, there’s details about a new worm, Conficker, that spreads using the good old fashioned autorun.inf tricks. It infects USB drives so that, when you plug the drive into another computer, it automatically runs and infects the machine. The article mentioned a post on Nick Brown’s blog that instructs you on various ways to disable autorun.inf files and gives a .REG file for disabling autorun.inf. Here’s the .REG file: Recently, I’ve started to like taking small registry hacks and turning them into functions, so here’s a pair of functions that I wrote to automate t...
Group Policy Cmdlets in Windows 7
Lilia Gutnik has posted a blog entry HERE showing an example of the Windows 7 Group Policy cmdlets. Check it out. Experiment! Enjoy! Engage! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
How To Make Your Own Module Repository
Andy Schneider (from Get-PowerShell.com) recently asked me how he could make sure that everyone at Avanade could get a consistent set of modules. I run into a somewhat similar problem here at Microsoft, where I want to take scripts I've built to work with internal applications and make them easy for people to use, even if they're not already using PowerShell. I don't want the scripts to be broadly available (after all, what is someone outside of Microsoft going to do with a script that works with Product Studio?) but I want the scripts (and PowerShell) to be installed or updated with a single click. D...
Please Join Me for a Power Scripting Podcast Tonight @ 9PM EST (6PM PST)
I’m going to be doing a PowerScripting Podcast tonight @ 9PM EST. There’s a live chat room where you can ask questions and pick the brains of a tester / avid scripter on the PowerShell team. It should be fun. I hope to see your questions there. http://powerscripting.wordpress.com/2009/01/14/tomorrow-on-powerscripting-live-james-brundage/ Hope this Helps, James Brundage [MSFT]
Windows 7 Troubleshooting
Windows 7 has a cool new extensible troubleshooting framework which is entirely based on PowerShell scripts. Rafael Rivera has written a very good step-by-step guide for how to author a Win7 Troubleshooting Pack HERE. Check it out. Experiment! Enjoy! Engage! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Podcast Discussing WSMAN 1/14/2008
Tomorrow evening I'll be doing the Mind Of Root podcast with Steve Murawski to discuss WSMAN. WSMAN is the new standard management protocol to talk to all sorts of heterogeneous devices and is the protocol that PowerShell Remoting is based upon. As a general rule, management protocols take forever to become relevant but I believe that WSMAN is going to catch on like wildfire. I'll discuss why during the podcast. More details HERE. Experiment! Enjoy! Engage! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http:/...
Interactive remoting in CTP3
Today let's talk about one of the cool new features of Windows PowerShell V2 - Interactive Remoting. Let’s start with an example: As you can see Enter-PSSession starts interactive remoting session and Exit-PSSession takes you out of it. The aliases for these commands are etsn and exsn. You can also use exit keyword instead of Exit-PSSession. Interactive remoting uses the same remoting infrastructure as other PowerShell remoting cmdlets. WinRM provides the transport and maintains a listener service, which is responsible for creation of the remote PowerShell sessions. Similar to Invoke-Command, you can use compu...
How to copy colorized script from PowerShell ISE
UPDATED Feb-03-2009: Lee Holmes has posted an updated version of the script which does a much better job of HTML copy-pasting. It can also produce line numbers and has a number of other improvements. In the previous article we demonstrated how to use Console-Copy script to make a colorized copy of console screen and place it in the system clipboard. Now what about doing the same thing with these nice looking colorized scripts that you can see in PowerShell ISE? Direct copy with Ctrl-C will copy just text without colorization. But the cool thing about PowerShell ISE is its great extensibility, which mean...