PowerShell Team

Automating the world one-liner at a time…

Latest posts

Apr 22, 2014
Post comments count 0
Post likes count 0

Debug Mode in Desired State Configuration

PowerShell Team

The DSC engine caches resources implemented as a PowerShell module for efficiency purposes. This can sometimes turn out to be annoying, when you are authoring a resource and testing it simultaneously. The only way to cause DSC to load the newer version every time is to explicitly kill the process hosting the DSC engine. As part of the WMF5 CTP release, we have introduced a new property for configuring the DSC Local Configuration Manager (LCM) called the DebugMode. When set to true, it causes the engine to reload the PowerShell DSC resource. Once you are done writing your resource, you can set it back to false an...

Apr 16, 2014
Post comments count 0
Post likes count 0

A World of Scripts at your Fingertips – Introducing Script Browser

PowerShell Team

 <Today we have a guest blog entry from Microsoft Customer Services & Support and the Garage>  Update: Version 1.1 of the Script Browser is out.  Check out the announcement here: http://blogs.technet.com/b/onescript/archive/2014/04/29/here-comes-the-update-of-script-browser-amp-script-analyzer-1-1.aspx To reuse script samples on the Internet, the following steps seem quite familiar to IT Pros: wandering through different script galleries, forums and blogs, switching back and forth between webpages and scripting environment, and countless download, copy and paste operations. But all of these will d...

Apr 16, 2014
Post comments count 0
Post likes count 0

Collecting the Output of Remoting Commands

PowerShell Team

One question we often get around PowerShell Remoting is "How do I collect the output of remoting commands into a different file for each computer?" For example, you want to invoke a remote command across 1,000 machines as a multi-threaded job and then create 1,000 text files for their output. This is in fact impressively easy in PowerShell due to the automatic properties that we add to remote output. The trick is to just know that it exists :)   As you can see in the example, we tag remote output with the computer name from which it originated. If we leverage that property, we can now create o...

Apr 7, 2014
Post comments count 0
Post likes count 0

What’s in a name? Using prefixes in PowerShell.

PowerShell Team

We’ve talked about this in the past but it’s time for a reminder.  PowerShell uses prefixes in front of nouns to avoid name collisions.  Imagine how many collisions there would be if people used the noun “USER” directly.  Instead, we have cmdlets *-ADUser, *-VPNUser, and *-RDUser.  The use of the prefix avoids name collisions.  When there is a name collision, the customer must specify the full name of the cmdlet.  Did you know that the full name of Get-ADUser was actually ActiveDirectory\Get-ADUser?  How would you feel if you had to type that every time you wanted to invoke that command? The use of prefixes ...

Apr 4, 2014
Post comments count 0
Post likes count 0

Windows Management Framework V5 Preview

PowerShell Team

The Windows Management Framework V5 Preview is out! Check out Jeffrey Snover's announcement here. The preview contains updates to PowerShell Desired State Configuration, as well as two new features: NetworkSwitch cmdlets and Windows PowerShell OneGet.  OneGet is designed to dramatically simplify how you discover and install software packages, while the NetworkSwitch cmdlets allow you to manage Certified for Windows network switches.  Check out the announcement page for more details. We're excited to share this preview with you -- let us know what you think.  Cheers, PowerShell Team

Apr 3, 2014
Post comments count 0
Post likes count 0

Configuring an Azure VM using PowerShell DSC

PowerShell Team

Update 8/7/2014: We just published the Azure PowerShell DSC Extension, which simplifies the configuration of Azure VMs with PowerShell DSC. Please refer to this blog post for more information At the //build/ conference today, Jeffery Snover demonstrated bringing up an Azure virtual machine and configuring it using DSC and the Custom Script VM extension.  We are sharing the scripts he used to accomplish this. These scripts present an example of how PowerShell DSC can be used with the Azure boot agent to create and automatically configure Azure VMs. In order to use these scripts you must have an active A...

Mar 28, 2014
Post comments count 0
Post likes count 0

DSC Resource Kit Wave 3

PowerShell Team

In September, Microsoft released PowerShell Desired State Configuration (DSC) with twelve built in resources.   Three months later (December), we added eight more resources with Wave One of the DSC Resource Kit.   Two months after that (February), we totaled fourteen additional resources with Wave Two of the DSC Resource Kit.   Can you guess what happens now, the month after the release of Wave Two?   We're happy to announce Wave Three of the DSC Resource Kit.  This wave contains eighteen new DSC resources.  This brings our total count to over 50 DSC Resources -- without even mentio...

Mar 10, 2014
Post comments count 0
Post likes count 0

PowerShell Summit North America

PowerShell Team

We are delighted to draw attention to this year's PowerShell Summit - an excellent community run PowerShell event. As described by PowerShell.Org: Come meet the Windows PowerShell team, PowerShell MVPs, independent experts, and your peers and colleagues in the PowerShell universe! The PowerShell Summit is a one-of-a-kind annual event, and this year it’s April 27-29 right in Microsoft’s home town of Bellevue, Washington. You’ll enjoy more than 63 in-depth technical sessions about PowerShell, how to manage using PowerShell, how to develop in PowerShell, how to troubleshoot in PowerShell – pr...

Feb 28, 2014
Post comments count 0
Post likes count 0

Want to Automatically Configure Your Machines Using DSC at Initial Boot-up?

PowerShell Team

Often times, IT Pros want to automate software installation and configuration upon a machine’s initial boot-up. This blog will walk you through how to use Windows PowerShell Desired State Configuration (DSC) to do this. We will show you how to prepare and inject DSC configurations into your bootable media (such as VHDs), so that they are executed during the initial boot-up process. We will discuss three approaches to this process, and give a VHD example for each one. Prerequisites: Option 1 – Inject a DSC configuration (.ps1) into a VHD Our first approach will be to inject a .ps1 with a DSC config...