PowerShell Team

Automating the world one-liner at a time…

Latest posts

Introducing MCP Support in AI Shell Preview 6
Aug 5, 2025
Post comments count 0
Post likes count 3

Introducing MCP Support in AI Shell Preview 6

Steven Bucher
Steven Bucher

We're excited to share the latest preview release of AI Shell that includes new features and improvements based on your feedback.

Announcing Microsoft.PowerShell.PlatyPS 1.0.0
Jul 24, 2025
Post comments count 3
Post likes count 6

Announcing Microsoft.PowerShell.PlatyPS 1.0.0

Jason Helmick Sean Wheeler
Jason,
Sean

We are pleased to announce the general availability of Microsoft.PowerShell.PlatyPS 1.0.0, a tool to build PowerShell help files.

Announcing Microsoft Desired State Configuration v3.1.0
Jun 18, 2025
Post comments count 0
Post likes count 3

Announcing Microsoft Desired State Configuration v3.1.0

Jason Helmick
Jason Helmick

This post announces the release of Microsoft Desired State Configuration v3.1.0. We discuss the features and benefits of DSC and how it differs from PowerShell DSC.

AI Shell Preview 4 Release!
May 21, 2025
Post comments count 1
Post likes count 5

AI Shell Preview 4 Release!

Steven Bucher
Steven Bucher

We're excited to share the latest preview release of AI Shell that includes new features and improvements based on your feedback.

PowerShell, OpenSSH, and DSC team investments for 2025
Apr 14, 2025
Post comments count 4
Post likes count 3

PowerShell, OpenSSH, and DSC team investments for 2025

Steve Lee
Steve Lee

Planned team investments for 2025 for PowerShell, OpenSSH, DSC, and related tooling.

Authoring Enhancements in Microsoft Desired State Configuration v3.0.0
Mar 12, 2025
Post comments count 0
Post likes count 3

Authoring Enhancements in Microsoft Desired State Configuration v3.0.0

Jason Helmick
Jason Helmick

This is the third post in a multi-part series about the new release of DSC. Microsoft Desired State Configuration (DSC) v3.0.0 provides powerful feature that enhance the authoring experience. DSC command completer The completer command returns a shell script that, when executed, registers completions for the given shell. DSC can generate completion scripts for the following shells: To learn more, see the command reference documentation. Enhanced Authoring with Schemas Working with DSC platform involves writing configuration documents and resource manifests. D...

Get started with Microsoft Desired State Configuration v3.0.0
Mar 12, 2025
Post comments count 4
Post likes count 4

Get started with Microsoft Desired State Configuration v3.0.0

Jason Helmick
Jason Helmick

This post show you how to install DSC v3.0.0 and get started using the **dsc** command.

Announcing Microsoft Desired State Configuration v3.0.0
Mar 12, 2025
Post comments count 6
Post likes count 12

Announcing Microsoft Desired State Configuration v3.0.0

Jason Helmick
Jason Helmick

This post announces the release of Microsoft Desired State Configuration v3.0.0. We discuss the features and benefits of DSC and how it differs from PowerShell DSC.

Announcing AI Shell Preview 2
Feb 28, 2025
Post comments count 6
Post likes count 5

Announcing AI Shell Preview 2

Steven Bucher
Steven Bucher

We are pleased to share a new preview release of AI Shell!

Microsoft Update changes for PowerShell 7
Feb 27, 2025
Post comments count 3
Post likes count 2

Microsoft Update changes for PowerShell 7

Steven Bucher
Steven Bucher

This blog outlines the expected behavior of MU releases for PowerShell 7.

PowerShell 7.5 GA is now available
Feb 12, 2025
Post comments count 2
Post likes count 3

PowerShell 7.5 GA is now available

Jason Helmick
Jason Helmick

We're pleased to announce the release of PowerShell 7.5.0! For this release the focus has been on quality, security and stability of the platform. We greatly appreciate the enormous amount of community contributions in this release along with new cmdlets, experimental features and other quality of life additions. PowerShell 7.5 is built on top of .NET 9 and will be supported for 18 months as a standard support release. Please note that support for PowerShell 7.2 is ended November 8, 2024. PowerShell 7.4 is the current LTS release of PowerShell and is supported until November 2026. How do I get it? PowerShell...

Announcing the Public Preview of AI Shell
Nov 19, 2024
Post comments count 6
Post likes count 13

Announcing the Public Preview of AI Shell

Steven Bucher
Steven Bucher

We are pleased to announce the public preview of AI Shell.

PowerShell 7.5 RC-1 is now available
Nov 18, 2024
Post comments count 1
Post likes count 5

PowerShell 7.5 RC-1 is now available

Sydney Smith
Sydney Smith

Availability of PowerShell 7.5 RC1

Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1
Oct 30, 2024
Post comments count 1
Post likes count 4

Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1

Jason Helmick
Jason Helmick

We are pleased to announce the release of Microsoft.PowerShell.PlatyPS 1.0.0-Preview1, a tool to build PowerShell help files.

PSResourceGet support for Azure Container Registry (ACR) is in Preview
Apr 2, 2024
Post comments count 2
Post likes count 5

PSResourceGet support for Azure Container Registry (ACR) is in Preview

Sydney Smith
Sydney Smith

PSResourceGet 1.1 preview 1 is available

PowerShell and OpenSSH team investments for 2024
Feb 5, 2024
Post comments count 1
Post likes count 8

PowerShell and OpenSSH team investments for 2024

Steve Lee
Steve Lee

Planned team investments for 2024 for PowerShell, OpenSSH, and related tooling.

PowerShell 7.4 General Availability
Nov 16, 2023
Post comments count 0
Post likes count 9

PowerShell 7.4 General Availability

Steve Lee
Steve Lee

PowerShell 7.4 GA has been released.

PowerShell 7.4 Release Candidate 1
Oct 30, 2023
Post comments count 2
Post likes count 1

PowerShell 7.4 Release Candidate 1

Sydney Smith
Sydney Smith

Availability of PowerShell 7.4 RC1

PowerShell Extension for Visual Studio Code Fall 2023 Update
Oct 25, 2023
Post comments count 0
Post likes count 3

PowerShell Extension for Visual Studio Code Fall 2023 Update

Sydney Smith
Sydney Smith

PowerShell Extension for Visual Studio Fall 2023 Update

PSResourceGet is generally available
Oct 9, 2023
Post comments count 5
Post likes count 5

PSResourceGet is generally available

Sydney Smith
Sydney Smith

PSResourceGet is generally available

PSReadLine 2.3.4 GA Release
Oct 3, 2023
Post comments count 0
Post likes count 7

PSReadLine 2.3.4 GA Release

Steven Bucher
Steven Bucher

We are excited to announce the general availability of PSReadLine 2.3.4!

PowerShellGet 3.0.22-beta22 is now available
Sep 20, 2023
Post comments count 0
Post likes count 3

PowerShellGet 3.0.22-beta22 is now available

Sydney Smith
Sydney Smith

The latest preview of PowerShellGet is now available on the PowerShell Gallery. In this new preview version of PowerShellGet, PowerShellGet is a compatibility module that allows use of PowerShellGet 2.x (and below) cmdlet syntax with PSResourceGet functionality by making a best effort mapping between the cmdlet interfaces of both versions of the module. This module is a continuation of the CompatPowerShellGet project, but will now be shipping under the PowerShellGet module name. How to install the module To install from PSResourceGet (which is included in PowerShell 7.4 Preview 5) To install from PowerShel...

Announcing PowerShell Crescendo 1.1.0 General Availability (GA)
Sep 12, 2023
Post comments count 0
Post likes count 5

Announcing PowerShell Crescendo 1.1.0 General Availability (GA)

Jason Helmick
Jason Helmick

Announcing the General Availability (GA) release of PowerShell Crescendo 1.1.0, a framework for the

PSResourceGet Release Candidate is Now Available
Sep 7, 2023
Post comments count 1
Post likes count 2

PSResourceGet Release Candidate is Now Available

Sydney Smith
Sydney Smith

Microsoft.PowerShell.PSResourceGet is a continuation of the PowerShellGet 3.0 project. The release candidate of this module under the new name is now available on the PowerShell Gallery. This release contains a number of bug fixes. This release is considered "go live" meaning that it is a fully supported release and expected to be of GA quality. After this release we don't expect to make any changes before we make the module "Generally Available (GA)". Please test out this module and report any issues so that we can resolve any blocking scenarios before this module becomes GA. Once this module becomes GA we will ...

PowerShell Adapter Feedback Provider
Aug 28, 2023
Post comments count 0
Post likes count 1

PowerShell Adapter Feedback Provider

Steven Bucher
Steven Bucher

This blog outlines the PowerShell Adapter Feedback Provider module

PSResourceGet Preview 24 is Now Available
Aug 16, 2023
Post comments count 0
Post likes count 1

PSResourceGet Preview 24 is Now Available

Sydney Smith
Sydney Smith

Microsoft.PowerShell.PSResourceGet is a continuation of the PowerShellGet 3.0 project. The latest preview release of this module under the new name is now available on the PowerShell Gallery. This release contains improved publish support, new aliases and many bug fixes. This is the last planned preview release before we release a "Release Candidate (RC)" of the module. From there we don't expect to make any changes before we make the module "Generally Available (GA)". How to install the module To install from PSResourceGet previews (which is included in PowerShell 7.4 Preview 4) To install from PowerShell...

Announcing PowerShell Crescendo 1.1.0-RC1
Aug 8, 2023
Post comments count 0
Post likes count 1

Announcing PowerShell Crescendo 1.1.0-RC1

Jason Helmick
Jason Helmick

This RC contains several community requested features and fixes including improved support for PSScriptAnalyzer, improvements to error handling, and the addition of `ExcludeAsArgument` property.

Desired State Configuration (DSC) Planning Update
Aug 7, 2023
Post comments count 1
Post likes count 3

Desired State Configuration (DSC) Planning Update

Michael Greene
Michael Greene

A fun and informative blog post sharing the exciting plans and roadmap for Desired State Configuration (DSC), including plans for compatibility, transparency, cross-platform support, and more.

Microsoft.PowerShell.TextUtility module updates
Jul 17, 2023
Post comments count 1
Post likes count 7

Microsoft.PowerShell.TextUtility module updates

Jim Truher
Jim Truher

TextUtility module gets new functionality We have recently released another preview of the TextUtility module. This module is a collection of tools that are meant to help with working with text content. Installing the module You can install this module from the PowerShellGallery with PowerShellGet via: Or you can install it with PSResourceGet via: ConvertFrom-TextTable The most recent pre-release of Microsoft.PowerShell.TextUtility has some new exciting functionality. The new cmdlet allows you to take tabular text and convert it into objects. Also, there is a way to convert some of types of those ...

JSON Adapter Feedback Provider
Jul 10, 2023
Post comments count 5
Post likes count 2

JSON Adapter Feedback Provider

Steven Bucher Jim Truher
Steven,
Jim

This blog outlines a new feedback provider developed by the PowerShell Team to inform users of native executables that can output `JSON`.

What are Feedback Providers?
Jul 6, 2023
Post comments count 2
Post likes count 4

What are Feedback Providers?

Steven Bucher
Steven Bucher

This is an introduction to the concept of feedback providers in PowerShell. What they are, how to use them and why we are implementing them.

PSResourceGet Preview is Now Available
Jun 9, 2023
Post comments count 0
Post likes count 4

PSResourceGet Preview is Now Available

Sydney Smith
Sydney Smith

Microsoft.PowerShell.PSResourceGet is a continuation of the PowerShellGet 3.0 project. The first preview release of this module under the new name is now available on the PowerShell Gallery. This release contains the module rename, and reintroduces support for Azure Artifacts, GitHub packages, and Artifactory and contains a number of bug fixes. How to install the module To install from PowerShellGet 3.0 previews To install from PowerShellGet 2.2.5 Note that once you install this module you will need to re-register your repositories as the repository registration file has moved. What is included in th...

PowerShellGet in PowerShell 7.4 Updates
May 17, 2023
Post comments count 1
Post likes count 4

PowerShellGet in PowerShell 7.4 Updates

Sydney Smith
Sydney Smith

Version 3 previews of PowerShellGet will begin shipping in PowerShell 7.4 previews in June (preview 5) with the following updates. These changes include important plans to address migration and compatibility, and we would like to request feedback. We would greatly appreciate your thoughtful feedback on these plans while there is still time to consider changes. Please comment on this github issue. Considerations for this decision We appreciate the feedback we have already been given by the community, at PowerShell events, by MVP's, and by our peers. Some of the key fa...

PowerShellGet 3.0 Preview 21
May 10, 2023
Post comments count 0
Post likes count 2

PowerShellGet 3.0 Preview 21

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! How to Install PowerShellGet 3.0 Preview 21 Prerequisites Please ensure that you have the latest (non-prerelease) version of PowerShellGet and PackageManagement installed. To check the version you currently have installed run the command The latest version of PowerShellGet is 2.2.5, and the latest version of PackageManagement is 1.4.7. To install the latest versions of these modules run the following: Installing the Preview To install this preview release side-by-side with your exi...

Completion Predictor v0.1.1 Release
May 10, 2023
Post comments count 0
Post likes count 4

Completion Predictor v0.1.1 Release

Steven Bucher
Steven Bucher

We released a new version of the CompletionPredictor! This blog post highlights some of the new functionalities of it.

PowerShell Extension for Visual Studio Code Spring 2023 Update
May 8, 2023
Post comments count 0
Post likes count 2

PowerShell Extension for Visual Studio Code Spring 2023 Update

Steve Lee Sydney Smith
Steve,
Sydney

PowerShell Extension for Visual Studio Spring 2023 Update

PSReadLine 2.3.1-beta1 Release
May 8, 2023
Post comments count 0
Post likes count 5

PSReadLine 2.3.1-beta1 Release

Steven Bucher
Steven Bucher

We are very excited to annouce the release of PSReadLine 2.3.1-beta1 is now available on the PowerShell Gallery! We have added a brand new tool tip feature to help give more descriptions to predictor results.

PowerShellGet 3.0 Preview 20
Mar 31, 2023
Post comments count 1
Post likes count 1

PowerShellGet 3.0 Preview 20

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This release includes a major refactor of the module to remove the dependency on the NuGet client APIs for remote repositories. This version of the module, along with the PowerShellGet compatibility module, will be shipping in the next preview of PowerShell 7.4 (preview 3). How to Install PowerShellGet 3.0 Preview 20 Prerequisites Please ensure that you have the latest (non-prerelease) version of PowerShellGet and PackageManagement installed. To check the version you currently have inst...

PSReadLine 2.3.0-beta0 Release
Mar 13, 2023
Post comments count 0
Post likes count 2

PSReadLine 2.3.0-beta0 Release

Steven Bucher
Steven Bucher

Announcement of PSReadLine 2.3.0-beta0 release and description of the new features and fixes available.

PowerShell Extension for Visual Studio Code February 2023 Update
Feb 23, 2023
Post comments count 1
Post likes count 5

PowerShell Extension for Visual Studio Code February 2023 Update

Sydney Smith
Sydney Smith

We are excited to announce that the February update to the PowerShell Extension for Visual Studio Code is now available on the extension marketplace. In this update we rewrote all the symbol logic. Classes (and their properties and methods) are now proper symbols. We now have a single visitor that builds a cached dictionary of symbols for each file instead of a dozen similar-yet-different Abstract Symbol Tree (AST) PowerShell script visitors handling different parts of each symbol-related request. This was a massive simplification of the code that also leads to huge performance improvements across all the symbol...

PowerShell/OpenSSH Team Investments for 2023
Jan 23, 2023
Post comments count 2
Post likes count 7

PowerShell/OpenSSH Team Investments for 2023

Steve Lee
Steve Lee

Team investments for 2023 across PowerShell, PowerShellGallery, OpenSSH, and supporting tools

PowerShell Extension for Visual Studio Code January 2023 Update
Jan 20, 2023
Post comments count 0
Post likes count 0

PowerShell Extension for Visual Studio Code January 2023 Update

Sydney Smith
Sydney Smith

We are excited to announce that the January update to the PowerShell Extension for Visual Studio Code is now available on the extension marketplace. This first stable release for the new year includes a multitude of fixes for the debugger! Expanding variables with properties that are inaccessible no longer causes a short-circuit preventing the rest of the properties from being expanded, variable values whose expansion results in PowerShell code being executed now works as expected, and in general all the correct properties are now present. We look forward to adding the ability to view static and private fields in...

PowerShellGet 3.0 Preview 18
Jan 11, 2023
Post comments count 0
Post likes count 2

PowerShellGet 3.0 Preview 18

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This release includes a number of bug fixes as well as cmdlet. How to Install PowerShellGet 3.0 Preview 18 Prerequisites Please note that this preview release of PowerShellGet 3.0 does not support PowerShell 7.0, 7.1 or 7.2-preview1. This is a temporary issue due to a dependency and should be resolved in future releases. This release does support Windows PowerShell 5.1, PowerShell 7.2 and 7.3. Please ensure that you have the latest (non-prerelease) version of PowerShellGet and Package...

Announcing PowerShell Crescendo 1.1.0-preview01
Dec 6, 2022
Post comments count 1
Post likes count 2

Announcing PowerShell Crescendo 1.1.0-preview01

Jason Helmick
Jason Helmick

**PowerShell Crescendo 1.1.0-preview01**. This preview includes a new schema, support for argument value transformation, the ability to bypass the output handler, and improved error handling.

PowerShell Extension for Visual Studio Code October 2022 Update
Dec 5, 2022
Post comments count 0
Post likes count 0

PowerShell Extension for Visual Studio Code October 2022 Update

Andy Jordan
Andy Jordan

We are excited to announce that the October update to the PowerShell Extension for Visual Studio Code is now available on the extension marketplace. This October stable release incorporates a number of bugfixes throughout September and early October, though is not based on the latest preview, v2022.10.1-preview, as the refactors involved in enabling TypeScript's strict type checking and ESLint's strict linting will need more testing. However, based on the success of the PowerShell Script Analyzer's v1.21.0 release we wanted to get this to you sooner! Updates in the October Release Note that these update...

PowerShell 7.3 General Availability
Nov 9, 2022
Post comments count 6
Post likes count 4

PowerShell 7.3 General Availability

Steve Lee
Steve Lee

General availability of PowerShell 7.3

PSScriptAnalyzer (PSSA) 1.21.0 has been released
Oct 24, 2022
Post comments count 3
Post likes count 1

PSScriptAnalyzer (PSSA) 1.21.0 has been released

Jim Truher
Jim Truher

Announcing the release of PSScriptAnalyzer 1.21

PowerShellGet 3.0 Preview 17
Sep 9, 2022
Post comments count 1
Post likes count 3

PowerShellGet 3.0 Preview 17

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This release includes a number of bug fixes as well as support for specifying the temporary path used during installation of PSResources. How to Install PowerShellGet 3.0 Preview 17 Prerequisites Please note that this preview release of PowerShellGet 3.0 does not support PowerShell 7.0, 7.1 or 7.2-preview1. This is a temporary issue due to a dependency and should be resolved in future releases. This release does support Windows PowerShell 5.1, PowerShell 7.2 and 7.3-previews. Please en...

PowerShell Extension for Visual Studio Code August 2022 Update
Aug 30, 2022
Post comments count 1
Post likes count 2

PowerShell Extension for Visual Studio Code August 2022 Update

Sydney Smith Andy Jordan
Sydney,
Andy

We are excited to announce that the August update to the PowerShell Extension for Visual Studio Code is now available on the extension marketplace. This release adds a walkthrough experience for getting started with PowerShell in VS Code, more regression tests, a major LSP client library update, and includes a number of bug fixes! Updates in the August Release Note that these updates all shipped in our PowerShell Preview Extension for VS Code before shipping in our stable channel. Some highlights of August releases: For the full ...

Archive Module 2.0 Preview 2
Aug 10, 2022
Post comments count 0
Post likes count 0

Archive Module 2.0 Preview 2

Sydney Smith
Sydney Smith

We are excited to announce that the second preview of a rewrite of Microsoft.PowerShell.Archive, the module that lets you create and extract archives, is now available on the PowerShell Gallery. This release is the second preview release of a rewrite of the module and is not feature complete. Please note that this release is only compatible with PowerShell 7.3.0-preview5 and up. For more information on what is proposed in this rewrite, or to give feedback on the design please refer to the RFC. Installing the module Please note that this release will only work with PowerShell 7.3.0-preview5 and up. Find and i...

Announcing the release of Get-WhatsNew
Aug 8, 2022
Post comments count 0
Post likes count 3

Announcing the release of Get-WhatsNew

Jason Helmick
Jason Helmick

Get the latest PowerShell feature information in your terminal with Get-WhatsNew

PowerShell Extension for Visual Studio Code July 2022 Update
Jul 31, 2022
Post comments count 2
Post likes count 1

PowerShell Extension for Visual Studio Code July 2022 Update

Steve Lee Sydney Smith
Steve,
Sydney

We are excited to announce that the July update to the PowerShell Extension for Visual Studio Code is now available on the extension marketplace. This release renames the "PowerShell Integrated Console" to the "PowerShell Extension Terminal" to align with VS Code's verbiage, adds many regression tests, and includes a number of bug fixes! Updates in the July release Note that these updates all shipped in our PowerShell Preview Extension for VS Code before shipping in our stable channel. Some highlights of July release: For the full list of changes please refer to our changelog. Improvem...

PowerShellGet 3.0 Preview 16
Jul 28, 2022
Post comments count 0
Post likes count 2

PowerShellGet 3.0 Preview 16

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This release includes ScriptFileInfo cmdlets,  support, and an AuthenticodeCheck for Install. How to Install PowerShellGet 3.0 Preview 16 Prerequisites Please note that this preview release of PowerShellGet 3.0 does not support PowerShell 7.0, 7.1 or 7.2-preview1. This is a temporary issue due to a dependency and should be resolved in future releases. This release does support Windows PowerShell 5.1, PowerShell 7.2 and 7.3-previews. Please ensure that you have the latest (non-prereleas...

Archive Module 2.0 Preview 1
Jul 26, 2022
Post comments count 4
Post likes count 2

Archive Module 2.0 Preview 1

Sydney Smith
Sydney Smith

We are excited to announce that the first preview of a rewrite of Microsoft.PowerShell.Archive, the module that lets you create and extract archives, is now available on the PowerShell Gallery. This release is the first preview release of a rewrite of the module and is not feature complete. Please note that this release only contains the  cmdlet and is only compatible with PowerShell 7.3.0-preview5 and up. For more information on what is proposed in this rewrite, or to give feedback on the design please refer to the RFC. Goals of the 2.0 release The goal for the Archive module is to build a high-performing a...

PowerShell Extension for Visual Studio Code June 2022 Update
Jul 1, 2022
Post comments count 0
Post likes count 0

PowerShell Extension for Visual Studio Code June 2022 Update

Sydney Smith
Sydney Smith

We are excited to announce that an update to the PowerShell Extension for Visual Studio Code is now available on the extension marketplace. This release fixes a number of issues related to IntelliSense and enables updates to PowerShell Editor Services (the engine of the VS Code extension) for other clients, such as Emacs and Vim with LSP plug-ins. Updates from the June releases Some highlights of June releases: For the full list of changes please refer to our changelog. IntelliSense improvements In this release we have made a number of improvements t...

Hosting PowerShell in a Python script
Jun 27, 2022
Post comments count 1
Post likes count 2

Hosting PowerShell in a Python script

Jim Truher
Jim Truher

How to use Python to call the PowerShell engine without running the PowerShell executable

PSReadLine 2.2.6 enables Predictive Intellisense by default
Jun 27, 2022
Post comments count 3
Post likes count 2

PSReadLine 2.2.6 enables Predictive Intellisense by default

Jason Helmick
Jason Helmick

Announcing Predictive Intellisense has been proven to be a productivity booster and so we are enabling it by default starting with PSReadLine 2.2.6!

PowerShellGet 3.0 Preview 14
May 31, 2022
Post comments count 0
Post likes count 0

PowerShellGet 3.0 Preview 14

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This release includes support for PSResourceRepository credential persistence, as well as support for RequiredResourceFiles for Install. How to Install PowerShellGet 3.0 Preview 14 Prerequisites Please ensure that you have the latest (non-prerelease) version of PowerShellGet and PackageManagement installed. To check the version you currently have installed run the command  The latest version of PowerShellGet is 2.2.5, and the latest version of PackageManagement is 1.4.7. To install the ...

Major update to the PowerShell Extension for Visual Studio Code
May 3, 2022
Post comments count 3
Post likes count 0

Major update to the PowerShell Extension for Visual Studio Code

Sydney Smith
Sydney Smith

An updated version of our PowerShell extension is now available on the Visual Studio Code marketplace. This update represents a complete overhaul of the core PowerShell engine of PowerShell Editor Services, intending to create a more reliable and stable user experience. This release represents nearly two years' work, tracked in PSES #1295 and implemented in PSES #1459. It is our response to many issues opened by users over the last several years. Thank you to all of the community members who opened issues which helped motivate this major update. These major updates have also been tested over the last 6 months,...

Announcing PowerShell Crescendo General Availability (GA)
Mar 10, 2022
Post comments count 0
Post likes count 1

Announcing PowerShell Crescendo General Availability (GA)

Jason Helmick
Jason Helmick

Announcing the General Availability (GA) release of PowerShell Crescendo, a framework for the

PowerShell and OpenSSH team investments for 2022
Mar 4, 2022
Post comments count 3
Post likes count 0

PowerShell and OpenSSH team investments for 2022

Steve Lee
Steve Lee

Planned team investments for 2022 for PowerShell and OpenSSH.

PSReadLine 2.2 GA
Feb 23, 2022
Post comments count 0
Post likes count 0

PSReadLine 2.2 GA

Jason Helmick
Jason Helmick

Announcing the general availability (GA) release for PSReadLine 2.2. This release addresses community suggestions and feedback. Be sure to checkout new features Predictive IntelliSense and Dynamic Help.

PSReadLine 2.2 RC
Jan 31, 2022
Post comments count 0
Post likes count 0

PSReadLine 2.2 RC

Jason Helmick
Jason Helmick

This is the release candidate (RC) for PowerShell PSReadLine 2.2. We look forward to community validation and feedback prior to the general release (GA). This release candidate includes several community fixes and suggested features.

When PowerShellGet v1 fails to install the NuGet Provider
Jan 20, 2022
Post comments count 0
Post likes count 5

When PowerShellGet v1 fails to install the NuGet Provider

Amber Erickson
Amber Erickson

How to resolve errors in PowerShellGet v1 when attempting to install the NuGet package provider.

PowerShellGet 3.0 Preview 12 Release
Dec 9, 2021
Post comments count 0
Post likes count 0

PowerShellGet 3.0 Preview 12 Release

Sydney Smith
Sydney Smith

We are excited to announce that an update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This release includes more parameters, additional pipeline support, more wildcard support and a number of other features detailed below. How to Install PowerShellGet 3.0 Preview 12 Prerequisites Please ensure that you have the latest (non-prerelease) version of PowerShellGet and PackageManagement installed. To check the version you currently have installed run the command:  The latest version of PowerShellGet is 2.2.5, and the latest version of PackageManagement is 1.4.7. To install th...

Announcing PowerShell Crescendo Release Candidate (RC)
Dec 9, 2021
Post comments count 0
Post likes count 0

Announcing PowerShell Crescendo Release Candidate (RC)

Jason Helmick
Jason Helmick

This is the release candidate (RC) for PowerShell Crescendo. We look forward to community validation and feedback prior to the general release (GA). This release adds a versioned schema to support future updates and several community suggested features.

New release of PowerShell Preview for Visual Studio Code!
Nov 9, 2021
Post comments count 0
Post likes count 0

New release of PowerShell Preview for Visual Studio Code!

Sydney Smith
Sydney Smith

An updated version of our PowerShell Preview extension is now available on the Visual Studio Code marketplace. This update represents a complete overhaul of the core PowerShell engine of PowerShell Editor services, with the intention of create a more reliable and stable user experience. This release represents over a year's work, tracked in PSES #1295 and implemented in PSES #1459, and is our response to many issues opened by users over the last few years. Thank you to all of the community members who opened issues which helped motivate this major update. For information on getting started with the PowerShell e...

General Availability of PowerShell 7.2
Nov 8, 2021
Post comments count 11
Post likes count 1

General Availability of PowerShell 7.2

Steve Lee
Steve Lee

Announcing general availability of PowerShell 7.2

Announcing PowerShell Crescendo Preview.4
Oct 25, 2021
Post comments count 1
Post likes count 0

Announcing PowerShell Crescendo Preview.4

Jason Helmick
Jason Helmick

This is the last planned preview before the release candidate (RC). This preview adds support for a globally available schema, several community suggestions, and an experimental help parsing feature to improve complex native command maintenance.

PSArm Experiment Update
Aug 11, 2021
Post comments count 1
Post likes count 0

PSArm Experiment Update

Danny Maertens
Danny Maertens

We are annoucing that the PSArm experimental module is no longer under active development.

PowerShellGet 3.0 Preview 11 Release
Aug 9, 2021
Post comments count 0
Post likes count 0

PowerShellGet 3.0 Preview 11 Release

Amber Erickson
Amber Erickson

We are excited to announce that an important update to our preview of PowerShellGet 3.0 is now available on the PowerShell Gallery! This preview release marks the completion of a complete refactor of this module and is a major step towards being feature complete for PowerShellGet 3.0. PowerShellGet 3.0 is a complete re-write of PowerShellGet with the following goals: This means that PowerShellGet 3.0 does not take a dependency on PackageManagement, NuGet or any other package provider, simplifying the codebase. Using the lessons learned from previous versions of the module, along with...

PowerShell for Visual Studio Code August 2021 Update
Aug 9, 2021
Post comments count 1
Post likes count 0

PowerShell for Visual Studio Code August 2021 Update

Andy Jordan
Andy Jordan

We are excited to announce that an update to our PowerShell extension is now available on the Visual Studio Code Marketplace. This blog will explain what is new in this release as well as what you can expect from extension updates in the coming months. What's new in the PowerShell Extension release This release includes the near-completion of the CI/CD Infrastructure Project. While our release cadence already doubled over the past six months, the final major piece of this effort is complete: with PRs #3461 and #1528 (among others) the release process has been fully automated. This means that we can now relea...

Announcing SecretManagement 1.1 GA
Aug 2, 2021
Post comments count 1
Post likes count 0

Announcing SecretManagement 1.1 GA

Joey Aiello
Joey Aiello

SecretManagement 1.1 is now generally available

Announcing PowerShell Crescendo Preview.3
Jul 27, 2021
Post comments count 1
Post likes count 0

Announcing PowerShell Crescendo Preview.3

Jason Helmick
Jason Helmick

Improving the development and distribution of Crescendo modules, this preview adds support for multiple command definitions per JSON file, and multiple output handlers to wrap native command output into objects.

Preview updating PowerShell 7.2 with Microsoft Update
Jun 16, 2021
Post comments count 4
Post likes count 1

Preview updating PowerShell 7.2 with Microsoft Update

Travis Plunk
Travis Plunk

We are going to begin previewing our updates to PowerShell 7 with Microsoft Update.

PowerShell for Visual Studio Code May 2021 Update
Jun 2, 2021
Post comments count 4
Post likes count 0

PowerShell for Visual Studio Code May 2021 Update

Andy Jordan
Andy Jordan

We are excited to announce that an update to our PowerShell extension is now available on the Visual Studio Code Marketplace. This blog will explain what is new in this release as well as what you can expect from the extension in the coming months. What's new in the PowerShell Extension release This incremental release incorporates a major update to OmniSharp, the Language Server Protocol library we use (like many other VSCode extensions). Behind the scenes there has also been a concerted effort to improve our build and release processes, with the intention of accelerating our release cadence. Some h...

SecretManagement Module v1.1.0 preview update
May 25, 2021
Post comments count 0
Post likes count 0

SecretManagement Module v1.1.0 preview update

Paul Higinbotham
Paul Higinbotham

Potential breaking change in the latest preview of SecretManagement 1.1 module release

Announcing PSDesiredStateConfiguration on PowerShell Gallery
May 14, 2021
Post comments count 1
Post likes count 0

Announcing PSDesiredStateConfiguration on PowerShell Gallery

Jason Helmick
Jason Helmick

We are pleased to announce the release of PSDesiredStateConfiguration 2.0.5 for DSC as a separate module on PowerShell Gallery.

Announcing PowerShell Crescendo Preview.2
May 6, 2021
Post comments count 1
Post likes count 0

Announcing PowerShell Crescendo Preview.2

Jason Helmick
Jason Helmick

Many native commands require elevated privileges to perform the expected operations. PowerShell Crescendo Preview 2 now supports cross platform elevation for your Crescendo wrapped native commands.

Optimizing your $Profile
Apr 6, 2021
Post comments count 9
Post likes count 4

Optimizing your $Profile

Steve Lee
Steve Lee

Learn how to measure and improve startup time of your $Profile

Announcing the preview of PSArm
Mar 31, 2021
Post comments count 7
Post likes count 0

Announcing the preview of PSArm

Steve Lee
Steve Lee

We are pleased to announce the preview of PSArm, providing a domain-specific language embedded in PowerShell for Azure Resource Manager (ARM) templates.

SecretManagement and SecretStore are Generally Available
Mar 25, 2021
Post comments count 4
Post likes count 2

SecretManagement and SecretStore are Generally Available

Sydney Smith
Sydney Smith

We are excited to announce two modules are now generally available on the PowerShell Gallery: To install the modules, open any PowerShell console and run: Introducing SecretManagement The SecretManagement module helps users manage secrets by providing a common set of cmdlets to interface with secrets across vaults. SecretManagement utilizes an extensible model where local and remote vaults can be registered and unregistered for use in accessing and retrieving secrets. The module provides the following cmdlets for accessing secrets and managing SecretVaults: Reference documentation for ...

SecretStore Release Candidate 3
Mar 15, 2021
Post comments count 0
Post likes count 0

SecretStore Release Candidate 3

Sydney Smith
Sydney Smith

The SecretStore release candidate 3 (RC3) module is now available on the PowerShell Gallery. This contains an exciting new feature which allows users to non-interactively create, and configure a SecretStore. This feature was added to support CI systems and other automated scenarios. SecretStore is an extension vault module, for PowerShell SecretManagement, which works over all supported PowerShell platforms on Windows, Linux, and macOS. For more context on this module and the SecretManagement module refer to the previous blog posts: For more context on these modules check out these previous blog posts: ...

Updating help for the PSReadLine module in Windows PowerShell 5.1
Mar 11, 2021
Post comments count 2
Post likes count 7

Updating help for the PSReadLine module in Windows PowerShell 5.1

Sean Wheeler
Sean Wheeler

Describes how to workaround the error when you try to update help for PSReadline in Windows PowerShell 5.1.

Announcing PSReadLine 2.2-beta.2 with Dynamic help
Mar 5, 2021
Post comments count 1
Post likes count 0

Announcing PSReadLine 2.2-beta.2 with Dynamic help

Jason Helmick
Jason Helmick

We are pleased to announce Dynamic Help, providing just-in-time help at the command line. Receive the help you need in the terminal without losing your place typing on the pipeline.

SecretManagement and SecretStore Release Candidate 2
Mar 3, 2021
Post comments count 0
Post likes count 0

SecretManagement and SecretStore Release Candidate 2

Sydney Smith
Sydney Smith

The SecretManagement and SecretStore release candidate 2 (RC2) modules are now available on the PowerShell Gallery. These releases contain an exciting new feature which allows users to provide non-sensitive metadata for secrets (note: this feature may not be available for all extension vaults). For more context on these modules check out these previous blog posts: Before installing this module, please uninstall the current preview versions of the module and restart your PowerShell session. To install these updates run the following commands: SecretManagement Updates In addition to b...

PowerShell Team 2021 Investments
Mar 2, 2021
Post comments count 5
Post likes count 0

PowerShell Team 2021 Investments

Steve Lee
Steve Lee

Details of the work the PowerShell team has planned for PowerShell 7.2, OpenSSH, and related tooling.

PowerShell for Visual Studio Code Updates – February 2021
Feb 25, 2021
Post comments count 4
Post likes count 0

PowerShell for Visual Studio Code Updates – February 2021

Sydney Smith
Sydney Smith

  We are excited to announce that updates to our PowerShell extension and PowerShell Preview extension are now available on the Visual Studio Code marketplace. This blog will explain what is new in these releases as well as what you can expect from the extension in the coming months. What's new in the PowerShell Extension release This incremental release incorporates changes from four preview releases! Some highlights of the release include: For the full list of updates please refer to the changelog. Further goals of this release are well discussed on GitHub. What's new in PowerS...

Announcing PowerShell Community Blog
Feb 18, 2021
Post comments count 1
Post likes count 0

Announcing PowerShell Community Blog

Jason Helmick
Jason Helmick

<Summary of the post>

SecretManagement and SecretStore Release Candidates
Jan 7, 2021
Post comments count 4
Post likes count 0

SecretManagement and SecretStore Release Candidates

Sydney Smith
Sydney Smith

The SecretManagement and SecretStore release candidate (RC) modules are now available on the PowerShell Gallery. The SecretManagement module helps users manage secrets by providing a common set of cmdlets to interface with secrets across vaults. This module supports an extensible model where local and remote vaults can be registered and unregistered for use in accessing and retrieving secrets. SecretStore is a cross-platform local extension vault for use with SecretManagement. We designed this vault as a best attempt at creating a vault that is available where PowerShell is, usable in popular PowerShell scenario...

PowerShell 7.2 Preview 2 release
Dec 15, 2020
Post comments count 8
Post likes count 0

PowerShell 7.2 Preview 2 release

Steve Lee
Steve Lee

Important changes included in the PowerShell 7.2 Preview 2 release

Announcing PowerShell Crescendo Preview.1
Dec 8, 2020
Post comments count 21
Post likes count 0

Announcing PowerShell Crescendo Preview.1

Jason Helmick
Jason Helmick

<Summary of the post>

Incident Report – PowerShell Gallery Downtime October 30, 2020
Dec 2, 2020
Post comments count 2
Post likes count 0

Incident Report – PowerShell Gallery Downtime October 30, 2020

Sydney Smith
Sydney Smith

  The PowerShell gallery experienced downtime on October 30th 2020. This report will give context as to what caused the downtime, what actions were taken to mitigate the issue, and what steps we are taking to improve the PowerShell gallery experience moving forward. Downtime Impact The downtime was declared at 2020-10-30 03:29 PDT, and was mitigated about 12 hours later at 2020-10-30 15:39 PDT. During this time packages were not available from the gallery, and the web interface was not accessible. Root Cause of the Downtime The downtime was a result of an attempt to fix ongoing statistics errors with ...

You’ve got Help!
Nov 23, 2020
Post comments count 2
Post likes count 0

You’ve got Help!

Sean Wheeler
Sean Wheeler

Announcing the new pipeline for publishing updateable help

SecretManagement preview 6 and SecretStore preview 4
Nov 16, 2020
Post comments count 4
Post likes count 0

SecretManagement preview 6 and SecretStore preview 4

Sydney Smith
Sydney Smith

Two updated preview releases are now available on the PowerShell Gallery: For more information on these modules check out these previous blog posts: Before installing these modules, please uninstall the current preview versions of the modules and restart your PowerShell session. To install these updates run the following commands: SecretManagement preview 6 updates This update to SecretManagement improves the compatibility of the module with Windows PowerShell, and improved the usability of the module by providing more ways to unregister vaults and by setting the first registe...

Announcing PowerShell 7.1
Nov 11, 2020
Post comments count 9
Post likes count 0

Announcing PowerShell 7.1

Joey Aiello
Joey Aiello

We're proud to announce the release of PowerShell 7.1, the latest major update to PowerShell 7. This release includes a number of improvements and fixes that build on top of the PowerShell 7.0 release in March and the recent GA release of .NET 5. Since then, the PowerShell Team (and many of you, our community contributors, thank you!) have been hard at work addressing some of the community's top bug reports and feature requests. What's new in PowerShell 7.1? For PowerShell 7.1, we decided to build on the foundation established in PowerShell 7.0 with a strong focus on community issues, especially where we co...

Announcing PSReadLine 2.1+ with Predictive IntelliSense
Nov 10, 2020
Post comments count 3
Post likes count 3

Announcing PSReadLine 2.1+ with Predictive IntelliSense

Jason Helmick
Jason Helmick

Tab completion has accelerated the success of new and experienced PowerShell users for over a decade. New users get the benefit of discovery, seeing available cmdlets and parameters as options while interactively typing. Experienced users receive the benefit of acceleration, typing less while using the Tab key to quickly complete a command. As the scale and complexity of cloud deployments and IT environments grow, cmdlet surface area is continually being updated with new cmdlets and additional parameter sets. For example, If you're beginning your journey with Azure, the Azure PowerShell module can...

SecretManagement and SecretStore Updates
Nov 3, 2020
Post comments count 6
Post likes count 0

SecretManagement and SecretStore Updates

Sydney Smith
Sydney Smith

Two updated preview releases are now available on the PowerShell Gallery: Before installing these modules please uninstall the current preview versions of the modules and restart your PowerShell session. To install these updates run the following commands: SecretManagement Preview 5 Updates This update to SecretManagement improves the usability of the module by adding name completers, and adding functionality to  for vault extension authors as well a a few other changes. Read the full list of changes below: SecretStore Preview 3 Updates This update to Secr...

PowerShell Working Groups
Oct 12, 2020
Post comments count 5
Post likes count 0

PowerShell Working Groups

Joey Aiello
Joey Aiello

Since we open sourced PowerShell in 2016, PowerShell has been an immensely popular project on GitHub. Every year, 700-1000 PRs and 1300-1500 issues are submitted to the PowerShell repo, with roughly half of the PRs and 90% of the issues filed from the community. We realize that some of these issues and PRs have been piling up and, as the project has grown in popularity and community activity, we sometimes struggle with the sheer volume of them. Those of us on the PowerShell Committee have been discussing some ways that we think we might be able to improve the efficiency of our decision-making process,...

SecretManagement and SecretStore Updates
Sep 30, 2020
Post comments count 3
Post likes count 0

SecretManagement and SecretStore Updates

Sydney Smith
Sydney Smith

Two updated preview releases are now available on the PowerShell Gallery: Please note that these preview releases contain breaking changes. This version of SecretStore is incompatible with previous versions because the configuration format has changed. The previous file store cannot be read by the new version and you will need to reset the store Reset-SecretStore after installing the new version. Be sure to save your current stored secrets before upgrading so they can be re-added after you Reset your SecretStore. To install these updates run the following commands: If you see an error indicating ...

PowerShell+Azure Sentinel notebooks to supercharge your threat hunting and investigations!
Sep 24, 2020
Post comments count 0
Post likes count 0

PowerShell+Azure Sentinel notebooks to supercharge your threat hunting and investigations!

Julian Gonzalez
Julian Gonzalez

For those interested in security and security analytics, we recently published an article on how you can now enable PowerShell Jupyter notebooks via .Net Interactive Public Preview for use with Azure Sentinel: https://techcommunity.microsoft.com/t5/azure-sentinel/what-s-new-powershell-azure-sentinel-notebooks-to-supercharge/ba-p/1695969 Happy threat hunting and investigation with PowerShell+Notebooks!  

SecretManagement Module Preview Design Changes
Sep 16, 2020
Post comments count 2
Post likes count 0

SecretManagement Module Preview Design Changes

Paul Higinbotham
Paul Higinbotham

Design changes to SecretManagement module preview

SecretManagement Preview 3
Sep 16, 2020
Post comments count 6
Post likes count 0

SecretManagement Preview 3

Sydney Smith
Sydney Smith

We are excited to announce two modules are now available on the PowerShell Gallery: To install the modules and register the SecretStore vault, open any PowerShell console and run: NOTE: This version of the module has a major breaking changing, if you have used past preview versions of the SecretManagement module, secrets previously stored will not be accessible in this version. Please migrate your secrets before updating. Your old secrets will not be removed after updating so they can be accessed by explicitly importing an earlier version of the module. If you see an error indicating the a depe...

PowerShellGet 3.0 Preview 10 Release
Sep 10, 2020
Post comments count 2
Post likes count 0

PowerShellGet 3.0 Preview 10 Release

Sydney Smith
Sydney Smith

In this blog post we are excited to share: PowerShellGet 3.0 Preview Updates PowerShellGet 3.0 preview 10 is now available on the PowerShell Gallery. This blog post will cover all of the feature updates since we last published a blog post ( preview 6). These versions include completed functionality for updating PSResources, input-object support for installing PSResources as well as several bug fixes. To install the latest version of the module, open any console any run: Install-Module PowerShellGet -AllowPrerelease -Force -Repository PSGallery -SkipPublisherCheck   What's new in the prev...

PowerShell 7.1 Preview 6
Aug 17, 2020
Post comments count 2
Post likes count 0

PowerShell 7.1 Preview 6

Steve Lee
Steve Lee

Update on PowerShell 7.1 release

Semantic Highlighting in the PowerShell Preview extension for Visual Studio Code
Jul 31, 2020
Post comments count 4
Post likes count 0

Semantic Highlighting in the PowerShell Preview extension for Visual Studio Code

Justin Chen
Justin Chen

Semantic Highlighting now supported in VS Code for PowerShell scripts

Public Preview of Notebook Mode in the PowerShell Preview extension for Visual Studio Code
Jul 30, 2020
Post comments count 8
Post likes count 1

Public Preview of Notebook Mode in the PowerShell Preview extension for Visual Studio Code

Tyler Leonhardt
Tyler Leonhardt

Opening PowerShell script files (.ps1) in Notebook Mode in the PowerShell extension for Visual Studio Code

PSScriptAnalyzer 1.19.1
Jul 28, 2020
Post comments count 1
Post likes count 0

PSScriptAnalyzer 1.19.1

Sydney Smith
Sydney Smith

PSScriptAnalyzer 1.19.1 is now available on the PowerShell Gallery. This minor update fixes a few user-reported bugs and introduces a new rule (which is disabled by default) for avoiding using double quotes for constant strings. To install this version of the module, open any PowerShell console and run:  New Rule AvoidUsingDoubleQuotesForConstantString (disabled by default) Severity Level: Information Rule Description When the value of a string is constant (i.e. not being interpolated by injecting variables or expression into such as e.g. ), then single quotes should be used to express the constant nature ...

PowerShellGet 3.0 Preview 6 Release
Jul 7, 2020
Post comments count 2
Post likes count 0

PowerShellGet 3.0 Preview 6 Release

Sydney Smith
Sydney Smith

Since our last blog post we have released two preview versions (previews 4 and 6) of the PowerShellGet 3.0 module. These releases have introduced publish functionality, repository wildcard search, and fixed error handling when a repository is not accessible in Find-PSResource. Note that preview 5 was unlisted due to a packaging error discovered post-publish. To install the latest version module, open any PowerShell console and run: Highlights of the releases Preview 4 (3.0.0-beta4) Highlights New Feature Wildcard search for the -Repository parameter in . This allows the user to return results from al...

Native Commands in PowerShell – A New Approach – Part 2
Jun 26, 2020
Post comments count 7
Post likes count 1

Native Commands in PowerShell – A New Approach – Part 2

Jim Truher
Jim Truher

How to wrap native commands to take better advantage of the PowerShell environment

Native Commands in PowerShell – A New Approach
Jun 22, 2020
Post comments count 3
Post likes count 0

Native Commands in PowerShell – A New Approach

Jim Truher
Jim Truher

In this two part blog post I'm going to investigate how PowerShell can take better advantage of native executables. In the first post, I'm going to discuss a few of the ways that PowerShell can better incorporate native executables into our object oriented world and how we can use these tools to better fit into our model of more discrete operations. In the second post, I'll be exploring some of the work to more easily convert the use of native tools into the cmdlet/object output model of PowerShell. PowerShell provides a number of benefits to its users Some of these are not unique ...

Resolving PowerShell Module Assembly Dependency Conflicts
Jun 16, 2020
Post comments count 11
Post likes count 1

Resolving PowerShell Module Assembly Dependency Conflicts

Robert Holt
Robert Holt

When writing a PowerShell module, especially a binary module (i.e. one written in a language like C# and loaded into PowerShell as an assembly/DLL), it's natural to take dependencies on other packages or libraries to provide functionality. Taking dependencies on other libraries is usually desirable for code reuse. However, PowerShell always loads assemblies into the same context, and this can present issues when a module's dependencies conflict with already-loaded DLLs, preventing two otherwise unrelated modules from being used together in the same PowerShell session. If you've been hit by this yourself, you w...

PowerShell Team May 2020 Update
May 19, 2020
Post comments count 2
Post likes count 0

PowerShell Team May 2020 Update

Steve Lee
Steve Lee

Previously, I published a blog on our investments plans during the PowerShell 7.1 release timeframe. We've made progress across many of those investments with more work ahead of us. PowerShell 7.1 preview 3 We are now able to ship simultaneously with each new .NET 5 preview release! This means that you can start leveraging new capabilities in .NET 5 and assess the new performance improvements. For PowerShell it means we can find issues early during integration with .NET and get those issues resolved much more quickly. Because we will be able to simultaneously release with .NET, it also means users will g...

PowerShellGet 3.0 Preview 3
May 18, 2020
Post comments count 0
Post likes count 0

PowerShellGet 3.0 Preview 3

Sydney Smith
Sydney Smith

PowerShellGet 3.0 preview 3 is now available on the PowerShell Gallery. The focus of this release is the  parameter for  which now allows for json, hashtable, or .json files as input. For a full list of the issues addressed by this release please refer to this GitHub project. Note: For background information on PowerShellGet 3.0 please refer to the blog post for the first preview release and the second preview release. How to install the module To install this version of PowerShellGet open any PowerShell console and run:  New Features of this release New Features Bug Fix Wha...

PowerShell 7 Video Series
May 11, 2020
Post comments count 3
Post likes count 1

PowerShell 7 Video Series

Sydney Smith
Sydney Smith

As a part of our PowerShell 7 release, the PowerShell Team put together a series of videos explaining and demoing aspects of the release. The intent of these videos was for User Groups to host events celebrating and discussing PowerShell 7, however, in light of the current guidance against group gatherings, we have decided to make these videos available publicly on the PowerShell Team YouTube channel. The content is broken down into 10 videos with a total runtime of 58 minutes. We have included links to the videos below, along with links to other related resources. ...

PSScriptAnalyzer (PSSA) 1.19.0 has been released
May 4, 2020
Post comments count 0
Post likes count 0

PSScriptAnalyzer (PSSA) 1.19.0 has been released

Jim Truher
Jim Truher

TL;DR; (Too Long; Didn't Read) This new minor version brings 5 new rules, the formatter is much faster and other enhancements and fixes. You can get it from the PSGallery here. At the same time the PowerShell extension for VS Code has released a new preview version. This ships with this new version of PSSA so that you can also take advantage of all the new configuration options. Therefore, whenever we reference the next version of the extension below, we mean the recently updated preview version or the next, upcoming release of the GA version. You can still take advantage of the new PSSA release in the GA versio...

PowerShellGet 3.0 Preview 2
Apr 30, 2020
Post comments count 0
Post likes count 0

PowerShellGet 3.0 Preview 2

Sydney Smith
Sydney Smith

PowerShellGet 3.0 preview 2 is now available on the PowerShell Gallery. The focus of this release is the Install-PSResource parameter, error messages, and warnings. For a full list of the issues addressed by this release please refer to this GitHub project. Note: For background information on PowerShellGet 3.0 please refer to the blog post for the first preview release. How to install the module To install this version of PowerShellGet open any PowerShell console and run: New Features of this release What is next GitHub is the best place to track the bugs/feature re...

PowerShell Gallery TLS Support
Apr 9, 2020
Post comments count 3
Post likes count 0

PowerShell Gallery TLS Support

Sydney Smith
Sydney Smith

Summary To provide the best-in-class encryption to our customers, the PowerShell Gallery has deprecated Transport Layer Security (TLS) versions 1.0 and 1.1 as of April 2020. The Microsoft TLS 1.0 implementation has no known security vulnerabilities. But because of the potential for future protocol downgrade attacks and other TLS vulnerabilities, we are discontinuing support for TLS 1.0 and 1.1 in the PowerShell Gallery. For information about how to remove TLS 1.0 and 1.1 dependencies, see the whitepaper Solving the TLS 1.0 problem. More information As of April 2020, TLS 1.2 is set to be the default for the...

Depending on the right PowerShell NuGet package in your .NET project
Apr 7, 2020
Post comments count 3
Post likes count 0

Depending on the right PowerShell NuGet package in your .NET project

Robert Holt
Robert Holt

Alongside the executable packages published with each PowerShell release, the PowerShell team also maintain several NuGet packages that are available on NuGet to allow targeting PowerShell as an API platform in .NET. As a .NET application that both provides APIs and expects to load .NET libraries implementing its own (binary modules), it's essential that PowerShell be available in the form of a NuGet package. Currrently there are several NuGet packages that provide some representation of the PowerShell API surface area, and which to use with a particular project hasn't always been made clear. This blog...

PowerShellGet 3.0 Preview 1
Mar 30, 2020
Post comments count 1
Post likes count 0

PowerShellGet 3.0 Preview 1

Sydney Smith
Sydney Smith

We are excited to announce that our first preview release of PowerShellGet 3.0 is now available on the PowerShell Gallery. This is a major update to PowerShell's experience for discovering, installing, updating and publishing PowerShell resources like modules, DSC resources, role capabilities and scripts. This was first proposed in RFC PR #185 and superseded by RFC PR #237. Thanks for all the community feedback! For a detailed view of the update to PowerShellGet please refer to the RFC. This early preview release of the module is not feature complete and has breaking changes intended to improve the user ex...

PowerShell 7.1 Team Investments and Preview.1 Release
Mar 26, 2020
Post comments count 5
Post likes count 0

PowerShell 7.1 Team Investments and Preview.1 Release

Steve Lee
Steve Lee

The PowerShell 7 release marks a huge milestone for PowerShell, the community, and the team! Today we released the first preview for PowerShell 7.1! This release includes a number of changes that did not make it in time for the 7.0 release. It also includes .NET 5 preview 1! The PowerShell team is not resting on our laurels and are committed to continuous improvement of PowerShell as we plan out our 7.1 release. This blog post details the areas of investment that the PowerShell team is funding. As we've done in the past, we'll also be working with contributors interested in implementing new features as ...

Secret Management Preview 2 Release
Mar 19, 2020
Post comments count 10
Post likes count 0

Secret Management Preview 2 Release

Sydney Smith
Sydney Smith

Note this blog post is the third in a series on the releases of this module: We are excited to release a second preview of the Secret Management Module. Thanks to the tremendous feedback we received from the first preview release of this module, you will notice a number of breaking changes to the module. This release is still a preview release meaning that it is not feature complete, future releases will face breaking changes, and we are still iterating based on your feedback. It is important to also note that this version of the module is still Windows only as we are currently implementing Linux sup...

A new kind of GridView right in your console: Introducing the early preview of ConsoleGuiTools
Mar 6, 2020
Post comments count 2
Post likes count 1

A new kind of GridView right in your console: Introducing the early preview of ConsoleGuiTools

Tyler Leonhardt
Tyler Leonhardt

Yes. This is yet another post about GridViews. We love them. You love them. What's not to like? If you're not familiar with , it can be used to interactively view objects as a table allowing sorting and filtering. Many PowerShell users like to use it within a pipeline for interactive selection of objects that get processed later in the pipeline. Let's recap where we're at with respect to GridViews: Today, I have the exciting opportunity to talk about a new . Introducing the module now in Preview The is a module that will contain a set of cmdlets that enable console-based GUIs. Today...

Visual Studio Code for PowerShell 7
Mar 5, 2020
Post comments count 3
Post likes count 0

Visual Studio Code for PowerShell 7

Sydney Smith
Sydney Smith

We are excited to announce that we have released a major update to the PowerShell extension for Visual Studio Code. This release contains months of architectural work that first shipped in our PowerShell Preview extension in November of 2019, along with incremental bug fixes in the intervening months. If you are new to Visual Studio Code this article is helpful for getting started. If you already use Visual Studio Code with the PowerShell extension, read on to find out what is new. What's new ISE Compatibility Module We took the documentation from our "How to replicate the ISE experience in Visual Studio C...

Announcing PowerShell 7.0
Mar 4, 2020
Post comments count 31
Post likes count 1

Announcing PowerShell 7.0

Joey Aiello
Joey Aiello

Today, we're happy to announce the Generally Available (GA) release of PowerShell 7.0! Before anything else, we'd like to thank our many, many open-source contributors for making this release possible by submitting code, tests, documentation, and issue feedback. PowerShell 7 would not have been possible without your help. What is PowerShell 7? For those unfamiliar, PowerShell 7 is the latest major update to PowerShell, a cross-platform (Windows, Linux, and macOS) automation tool and configuration framework optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. ...

Secrets Management Module Vault Extensions
Feb 6, 2020
Post comments count 1
Post likes count 0

Secrets Management Module Vault Extensions

Paul Higinbotham
Paul Higinbotham

Secrets Management Module Vault Extensions A new PowerShell Secrets Management module has been published on PowerShell Gallery. It is currently in a pre-release state and still in active development. Even though the module is not complete, we have released it to gather early community feedback. Most of the functionality is implemented, but currently the module only works on Windows with Linux support coming next, followed by macOS. This article describes the Secrets Management module in general, but is mostly about how vault extensions work. For a full overview of Secrets Management see this article. The Sec...

Public Preview of PowerShell Support in Jupyter Notebooks
Feb 6, 2020
Post comments count 3
Post likes count 0

Public Preview of PowerShell Support in Jupyter Notebooks

Tyler Leonhardt
Tyler Leonhardt

Public Preview of PowerShell Support in Jupyter Notebooks Today, the .NET team shipped an exciting new preview of .NET Interactive. If you're unfamiliar, .NET Interactive (within a Jupyter environment) provides the ability to write .NET Jupyter Notebooks which are a powerful tool that combines documentation and the ability to execute and see the output of code all in the same file. It's especially exciting to us because it includes a preview of PowerShell support! NOTE: We want to be super clear. This is an early preview which has the main goal of getting early feedback from real usage so we can make infor...

Secrets Management Development Release
Feb 6, 2020
Post comments count 5
Post likes count 0

Secrets Management Development Release

Sydney Smith
Sydney Smith

Secrets Management Development Release At Ignite 2019 we gave a preview of our PowerShell Secrets Management Module. This Secrets Management module, first proposed in RFC #234, creates an extensible abstraction layer in PowerShell for interacting with Secrets and Secrets Vaults. We are excited to publish a development release of this module to the PowerShell Gallery to get feedback on the cmdlet interface and to enable an iterative development experience. While the current release of this module is Windows only, we plan to support Linux, and eventually MacOS, in coming releases. We made the decision to publish...

Announcing the PowerShell 7.0 Release Candidate
Dec 16, 2019
Post comments count 4
Post likes count 0

Announcing the PowerShell 7.0 Release Candidate

Joey Aiello
Joey Aiello

After 6 previews, we're happy to announce the release of the PowerShell 7 Release Candidate (RC). Whether you've been running PowerShell Core since our first alpha releases or you've been clinging to Windows PowerShell for backwards compatibility, 7.0 delivers a host of improvements to make your life better. This is a "go live" release, which means that it is officially supported in production until the release of PowerShell 7 General Availability (GA) next month. (Note: we reserve the right to move this day if any significant issues arise that require us to ship an RC2.) We hope this encourages more folks...

Improvements in Windows PowerShell Container Images
Dec 9, 2019
Post comments count 3
Post likes count 0

Improvements in Windows PowerShell Container Images

Joey Aiello
Joey Aiello

Beginning with Windows Server 20H1 Insider builds, Windows Server Core Insider images have been reduced in size from ~2.1 GBs to ~1.1 GBs. How did the Server Core images get over 40% smaller? Traditionally, Windows 10 and Windows Server have always included a set of .NET native binaries that were pre-compiled using the Native Image Generator tool (Ngen.exe). This native pre-compilation makes these binaries faster on default installations of the OS, but it also makes the image size grow: managed/IL .NET binaries are typically smaller and slower initially (until JIT compilation happens) than their native coun...

PowerShell 7 Preview 6
Nov 21, 2019
Post comments count 7
Post likes count 0

PowerShell 7 Preview 6

Steve Lee
Steve Lee

Today we shipped PowerShell 7 Preview.6! This release contains a number of new features and many bug fixes from both the community as well as the PowerShell team. See the Release Notes for all the details of what is included in this release. This will be the last preview release as we head towards a Release Candidate in December. For the Release Candidate, there will be no more new features although small changes to cmdlets may still be accepted depending on risk of the change. Bug fixes will still be accepted but also accessed for their risk of causing a regression. Finally, we expect General Availability...

PowerShell Extension Roadmap
Nov 4, 2019
Post comments count 3
Post likes count 0

PowerShell Extension Roadmap

Sydney Smith
Sydney Smith

Over the last year we have committed to making the PowerShell editing experience in Visual Studio Code a rich and productive cross-platform alternative for the PowerShell ISE. To that end, we have focused on two primary areas: bringing the PSReadLine experience to the Integrated Console, and improving the stability of the extension while editing and debugging. The goal of this blog post is to walk through how we have made efforts in these key areas, and what our next steps are to follow through on these efforts. Investments in the reliability of PowerShell in Visual Studio Code Our number one user request f...

DSC Resource Kit Release October 2019
Oct 30, 2019
Post comments count 0
Post likes count 0

DSC Resource Kit Release October 2019

Michael Greene
Michael Greene

This release includes updates to 9 DSC resource modules. In the past 6 weeks, 91 pull requests have been merged and 41 issues have been closed, all thanks to our amazing community!

PowerShell 7 Preview 5
Oct 23, 2019
Post comments count 12
Post likes count 0

PowerShell 7 Preview 5

Steve Lee
Steve Lee

Today we shipped PowerShell 7 Preview5! This release contains a number of new features and many bug fixes from both the community as well as the PowerShell team. See the Release Notes for all the details of what is included in this release. We are still on track to have one more preview release next month in November. Then, barring any quality concerns, a Release Candidate in December aligned with the .NET Core 3.1 final release. Finally, we expect General Availability of PowerShell 7 in January as our first Long Term Servicing release. Between the Release Candidate and General Availability, we will onl...

DSC Resource Kit Release September 2019
Sep 19, 2019
Post comments count 1
Post likes count 0

DSC Resource Kit Release September 2019

Michael Greene
Michael Greene

We just released the DSC Resource Kit! This release includes updates to 15 DSC resource modules. In the past 6 weeks, 160 pull requests have been merged and 68 issues have been closed, all thanks to our amazing community!

PowerShell 7 Preview 4
Sep 19, 2019
Post comments count 4
Post likes count 0

PowerShell 7 Preview 4

Steve Lee
Steve Lee

We continue to make progress towards our PowerShell 7 release which currently is targeting December 2019 for a Release Candidate and January 2020 for General Availability and will be our first LTS (Long Term Servicing) release! Please see the previous blog post on Preview 3 for more details about LTS and also Windows PowerShell compatibility. Preview 4 contains a number of bug fixes, but also new features which I'll cover in this blog post. New Experimental Features in Preview 4 This is just a small part of the entire changelog. New experimental features in this preview from the community and also the...

Updating Help for older versions of PowerShell
Sep 17, 2019
Post comments count 3
Post likes count 0

Updating Help for older versions of PowerShell

Sean Wheeler
Sean Wheeler

UPDATE: We are now publishing updated help for PowerShell 5.1 and higher. See the announcement. PowerShell's Updatable Help system was introduced in PowerShell 3.0. It was designed to assure that you always have the newest help topics on your local computer so that you can read them at the command line. Help was updated with every new release and periodically between releases. For you, the end user, the  cmdlet makes it easy to download and install the latest version. However, you may have noticed that the updated help hasn't changed for a long time and does not match the documentation available on docs.microsof...

Release of PowerShell Script Analyzer (PSScriptAnalyzer) 1.18.2
Sep 10, 2019
Post comments count 6
Post likes count 0

Release of PowerShell Script Analyzer (PSScriptAnalyzer) 1.18.2

Jim Truher
Jim Truher

In keeping with the tradition of releasing improvements to  more often, we're happy to announce that 1.18.12 is now available! As a dependency of PowerShell Editor Services (a module used by editor extensions like the PowerShell Visual Studio Code extension), this release is motivated by a desire to further stabilize our editor experience. At the moment, the Visual Studio Code PowerShell extension still ships with PSScriptAnalyzer . After fixing some undesirable edge cases between  and , we intend to ship an update to the Visual Studio Code extension that will include . The blocking issue that it resolves is qui...

PowerShell ForEach-Object Parallel Feature
Sep 4, 2019
Post comments count 13
Post likes count 3

PowerShell ForEach-Object Parallel Feature

Paul Higinbotham
Paul Higinbotham

PowerShell ForEach-Object Parallel Feature PowerShell 7.0 Preview 3 is now available with a new Experimental feature. This feature is a great new tool for parallelizing work, but like any tool, it has its uses and drawbacks. This article describes this new feature, how it works, when to use it and when not to. What is ForEach-Object -Parallel? is a new parameter set added to the existing PowerShell ForEach cmdlet. Normally, when you use the cmdlet, each object piped to the cmdlet is processed sequentially. But with the new parameter set, you can run all script in parallel for each piped ...

New Telemetry in PowerShell 7 Preview 3
Aug 20, 2019
Post comments count 4
Post likes count 0

New Telemetry in PowerShell 7 Preview 3

Sydney Smith
Sydney Smith

Beginning in PowerShell 7 Preview 3, PowerShell will be sending some additional data points to Microsoft. This data will allow us to better understand usage of PowerShell and enable us to prioritize our future investments. These additional points of data were reviewed with the PowerShell community and approved by the PowerShell Committee through the PowerShell RFC process. What we added We will continue to use Application Insights to collect the following new telemetry points: We will continue to share portions of our aggregated data with the PowerShell community through the Public PowerBi report. Wh...

PowerShell 7 Preview 3
Aug 20, 2019
Post comments count 7
Post likes count 0

PowerShell 7 Preview 3

Steve Lee
Steve Lee

PowerShell 7 Preview 3 In May, we published our PowerShell 7 Roadmap. We have been making progress on our roadmap and are currently on track to have a Generally Available (GA) release by end of this calendar year. Long Term Servicing PowerShell 7 GA will also be our first Long Term Servicing (LTS) release which is a change from our current Modern Lifecycle support for PowerShell Core 6. We will support PowerShell 7 GA for as long as .NET Core 3.1 is supported before you must upgrade to a newer version to continue to be supported by Microsoft. Windows PowerShell compatibility One of the main goals of Power...

Out-GridView Returns
Aug 14, 2019
Post comments count 5
Post likes count 0

Out-GridView Returns

Jack Zeiders
Jack Zeiders

Out-GridView Returns! It's been almost 3 years since PowerShell Core debuted for Linux and Mac, and as we've increased our cmdlet coverage more and more, one cmdlet has always stood out as a top, cross-platform request. Today, we are excited to announce that is debuting on all Core-supported platforms through the GraphicalTools Module. Installation If you want to get right to it: Features Out-GridView is a visualization tool to help you deep dive into objects returned from PowerShell. Piping Get-Process into Out-GridView Quick Search Easily locate data points matching a query. Filters Disp...

DSC Resource Kit Release July 2019
Aug 7, 2019
Post comments count 0
Post likes count 0

DSC Resource Kit Release July 2019

Michael Greene
Michael Greene

We just released the DSC Resource Kit! This release includes updates to 11 DSC resource modules. In the past 6 weeks, 96 pull requests have been merged and 45 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our latest community call for the DSC Resource Kit was last Wednesday, July 31. A recording of the call is posted on the PowerShell YouTube channel. You can join us for the next...

Introducing PowerShell as .NET Global Tool
Jul 18, 2019
Post comments count 3
Post likes count 1

Introducing PowerShell as .NET Global Tool

Aditya Patwardhan
Aditya Patwardhan

PowerShell is very suitable for CI/CD scenarios due to its easy and well understood scripting paradigm, and its cross-platform support makes it great for building and testing cross-platform applications. A .NET Global Tool is a special NuGet package that contains a console application. A application can be developed for various platforms like Windows, various distributions of Linux and macOS, while the same PowerShell scripts can be used for building, testing and deployment across all platforms. Installing PowerShell Global tool If you already have the .NET Core SDK installed, it's easy to install Pow...

DSC Resource Kit Release June 2019
Jun 26, 2019
Post comments count 0
Post likes count 0

DSC Resource Kit Release June 2019

Katie Kragenbrink [MSFT]
Katie Kragenbrink [MSFT]

We just released the DSC Resource Kit! This release includes updates to 8 DSC resource modules. In the past 6 weeks, 95 pull requests have been merged and 55 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our latest community call for the DSC Resource Kit was last Wednesday, June 19. A recording of the call with be posted on the PowerShell YouTube channel soon. You can join us for the next ca...

Release of PowerShell Script Analyzer 1.18.1
Jun 13, 2019
Post comments count 0
Post likes count 0

Release of PowerShell Script Analyzer 1.18.1

Jim Truher
Jim Truher

Overview  ()  is now available on the PSGallery and fixes not only a lot of the issues reported for  but has also been made twice as faster compared to . Additionally, the  switch on has been improved to be platform agnostic and should now also work on Linux systems if DSC has been set up. A long standing concurrency bug related to analysing module manifest has also been fixed. Analysis showed that  is not thread-safe due to a bug either in the cmdlet or in the PowerShell engine itself, we resolved it by having a lock around calls to this cmdlet. Formatter Fixes This applies especially to its usage within th...

DSC Planning Update – June 2019
Jun 7, 2019
Post comments count 13
Post likes count 0

DSC Planning Update – June 2019

Michael Greene
Michael Greene

It has been almost a year since the last DSC Planning update. There has been a lot going on, many decisions being made, and it just didn’t make sense to post earlier in this calendar year. In this post we will review what has been shipped and the high-level direction we are heading. 

Azure Policy Guest Configuration – Service
Jun 7, 2019
Post comments count 0
Post likes count 0

Azure Policy Guest Configuration – Service

Michael Greene
Michael Greene

This post builds upon the introduction published yesterday to the PowerShell blog. In this post we are going to explore the Azure Policy Guest Configuration service. 

Azure Policy Guest Configuration – Client
Jun 7, 2019
Post comments count 2
Post likes count 0

Azure Policy Guest Configuration – Client

Michael Greene
Michael Greene

This post builds upon the introduction published earlier to the PowerShell blog. In this post we are going to explore the Azure Policy Guest Configuration client and how configuration content is consumed. 

Using PowerShellGet with Azure Artifacts
Jun 4, 2019
Post comments count 9
Post likes count 0

Using PowerShellGet with Azure Artifacts

Sydney Smith
Sydney Smith

We have improved the experience with PowerShellGet and private NuGet feeds by focusing on pain points using an Azure Artifacts feed. We addressed pain points by enabling/documenting the following features: These improvements will effect the following cmdlets: What is Azure Artifacts and Why would I use it? Azure Artifacts is an Azure DevOps service which introduces the concept of multiple feeds that you can use to organize and control access to your packages. In other words it is a place for storing and sharing packages with controlled access through Azure DevOp...

PowerShell 7 Roadmap
May 30, 2019
Post comments count 11
Post likes count 0

PowerShell 7 Roadmap

Steve Lee
Steve Lee

Last month we announced that PowerShell 7 will be the next release of PowerShell. Here I will provide more details of areas we'll be investing in for the PowerShell 7 release. When will I get it?! Today, we're releasing our first preview of PowerShell 7. Keeping with our monthly cadence, expect new preview releases approximately every month. This first preview contains some of the changes that didn't make it in time for the 6.2 GA release, and marks our move to .NET Core 3.0. For more details on what's new, check out our changelog on GitHub. As mentioned in the PowerShell 7 announcement blog, we wi...

DSC Resource Kit Release May 2019
May 15, 2019
Post comments count 0
Post likes count 0

DSC Resource Kit Release May 2019

Katie Kragenbrink [MSFT]
Katie Kragenbrink [MSFT]

We just released the DSC Resource Kit! This release includes updates to 14 DSC resource modules. In the past 6 weeks, 87 pull requests have been merged and 36 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our latest community call for the DSC Resource Kit was last Wednesday, May 8. A recording of the call is available here. You can join us for the next call at 12PM (Paci...

Public Preview of PowerShell in Azure Functions 2.x
Apr 29, 2019
Post comments count 1
Post likes count 0

Public Preview of PowerShell in Azure Functions 2.x

Joey Aiello
Joey Aiello

Over the last six months, we've been hard at work integrating PowerShell Core with Azure Functions 2.x. Today, I'm happy to announce that we're releasing public preview of PowerShell support for Azure Functions 2.x for Windows (Consumption, Premium, and App Service pricing plans). I already know I want this, give me the good stuff! Learn how to create your first PowerShell function in Azure Functions, or dive right into the Azure Functions PowerShell developer guide. What's Azure Functions? For those that haven't experienced the joy of using Azure Functions yet, it's an event-based serverless platform tha...

Using PSScriptAnalyzer to check PowerShell version compatibility
Apr 18, 2019
Post comments count 4
Post likes count 0

Using PSScriptAnalyzer to check PowerShell version compatibility

Robert Holt
Robert Holt

PSScriptAnalyzer version 1.18 was released recently, and ships with powerful new rules that can check PowerShell scripts for incompatibilities with other PowerShell versions and environments. In this blog post, the first in a series, we'll see how to use these new rules to check a script for problems running on PowerShell 3, 5.1 and 6. Wait, what's PSScriptAnalyzer? PSScriptAnalzyer is a module providing static analysis, or linting, and some dynamic analysis (based on the state of your environment) for PowerShell. It's able to find problems and fix bad habits in PowerShell scripts as you create them, simil...

PowerShell Core Release Improvements
Apr 5, 2019
Post comments count 7
Post likes count 0

PowerShell Core Release Improvements

Travis Plunk
Travis Plunk

For PowerShell Core, we basically had to build a new engineering system to build and release it. How we build it has evolved over time as we learn and our other teams have implemented features that make some tasks easier. We are finally at a state that we believe we can engineer a system that builds PowerShell Core for release with as little human interaction as necessary.

The Next Release of PowerShell – PowerShell 7
Apr 5, 2019
Post comments count 31
Post likes count 0

The Next Release of PowerShell – PowerShell 7

Steve Lee
Steve Lee

Recently, the PowerShell Team shipped the Generally Available (GA) release of PowerShell Core 6.2. Since that release, we've already begun work on the next iteration! We're calling the next release , the reasons for which will be explained in this blog post. Why 7 and not 6.3? PowerShell Core usage has grown significantly in the last two years. In particular, the bulk of our growth has come from Linux usage, an encouraging statistic given our investment in making PowerShell viable cross-platform.  This chart represents the number of times pwsh.exe (or just pwsh on Linux/macOS) was started (unless telemet...

DSC Resource Kit Release April 2019
Apr 3, 2019
Post comments count 2
Post likes count 0

DSC Resource Kit Release April 2019

Katie Kragenbrink [MSFT]
Katie Kragenbrink [MSFT]

We just released the DSC Resource Kit! This release includes updates to 13 DSC resource modules. In the past 6 weeks, 87 pull requests have been merged and 90 issues have been closed, all thanks to our amazing community! The modules updated in this release are: xWebAdministration is also in the pipeline for release as soon as it passes all tests. For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our latest community call for the DSC Resource Kit was last Wednesday, March 27...

The PowerShell Gallery is now more Accessible
Apr 1, 2019
Post comments count 1
Post likes count 0

The PowerShell Gallery is now more Accessible

Sydney Smith
Sydney Smith

Over the past few months, the team has been working hard to make the PowerShell Gallery as accessible as possible. This blog details why it matters and what work has been done. Why making the PowerShell Gallery more accessible was a priority Accessible products change lives and allow everyone to be included in our product. Accessibility is also a major component of striving toward Microsoft's mission to "Empower every person and every organization on the planet to achieve more." Improvements in accessibility mean improvements in usability which makes the experience better for everyone. In doing accessibility te...

LiveFyre commenting will no longer be available on the PowerShell Gallery
Mar 29, 2019
Post comments count 3
Post likes count 0

LiveFyre commenting will no longer be available on the PowerShell Gallery

Sydney Smith
Sydney Smith

Commenting on the PowerShell Gallery is provided by LiveFyre--a third-party comment system. LiveFyre is no longer supported by Adobe and therefore we are unable to service issues as they arise. We have gotten reports of authentication failing for Twitter and Microsoft AAD and unfortunately we are unable to bring back those services. As we cannot predict when more issues will occur, and we cannot fix issues as they arise we must depreciate use of LiveFyre on the PowerShell Gallery. As of May 1st 2019 LiveFyre commenting will no longer be available on the PowerShell Gallery. Unfortunately we are unable to migra...

General Availability of PowerShell Core 6.2
Mar 28, 2019
Post comments count 3
Post likes count 0

General Availability of PowerShell Core 6.2

Steve Lee
Steve Lee

We're proud to announce that the latest version of PowerShell has been released! This is the third minor supported release of PowerShell Core, the open-source edition of PowerShell that works on Linux, macOS, and Windows! Thanks to everyone that made this release possible, including our contributors, users, and anyone who filed issues and submitted feedback. So How Do I Install It? For info on installing PowerShell Core 6.2, check our installation docs. A reminder that PowerShell Core works side-by-side with Windows PowerShell, so you can use both independently of each other. This means that you c...

PowerShell ScriptAnalyzer Version 1.18.0 Released
Mar 22, 2019
Post comments count 2
Post likes count 0

PowerShell ScriptAnalyzer Version 1.18.0 Released

Jim Truher
Jim Truher

 ()  is now available on the PSGallery and brings a lot of improvements in the following areas: There are some minor breaking changes such as e.g. requiring the minimum version of PowerShell Core to 6.1 as 6.0 has reached the end of its support lifecycle. With this, it was possible to update the used version of  to . On Windows PowerShell, the minimum required runtime was upped from to, which is the lowest version that is still supported by Microsoft but Windows update will have taken care of upgrading the to this patched version anyway, therefore no disruption is ...

The PowerShell Extension is now in the Azure Data Studio Marketplace
Mar 18, 2019
Post comments count 0
Post likes count 0

The PowerShell Extension is now in the Azure Data Studio Marketplace

Sydney Smith
Sydney Smith

We are excited to announce the PowerShell Extension is available in the Azure Data Studio (ADS) marketplace! Now you can write PowerShell scripts with the full benefits of PowerShell Editor Services using the excellent IDE-like interface that Azure Data Studio provides. Key Features this Brings to PowerShell Editing in Azure Data Studio How to get the PowerShell extension in Azure Data Studio If you don't already have Azure Data Studio, start here. Once you have Azure Data Studio open, click to open the extensions marketplace. Next, type in the search ba...

Invoke-Sqlcmd is Now Available Supporting Cross-Platform
Mar 11, 2019
Post comments count 0
Post likes count 0

Invoke-Sqlcmd is Now Available Supporting Cross-Platform

Steve Lee
Steve Lee

The official SqlServer module now includes a version of the Invoke-Sqlcmd cmdlet that runs in PSCore 6.2 and above. The version of the SqlServer module which contains this cmdlet is 21.1.18095-preview and is available in the PowerShell Gallery. In order to install this preview version of the module, you must run  (or  if you already have it installed) with the -AllowPrerelease. (Without that parameter you will receive the previous version of the module.) Why is Invoke-Sqlcmd Important Invoke-Sqlcmd is probably the most crucial cmdlet in the SQL PowerShell space because of its broad capabilities. This cmdlet h...

Generating PowerShell Cmdlets from OpenAPI/Swagger with AutoRest
Feb 22, 2019
Post comments count 0
Post likes count 1

Generating PowerShell Cmdlets from OpenAPI/Swagger with AutoRest

Garrett Serack, MSFT
Garrett Serack, MSFT

Announcing the availability of the beta version of our new PowerShell cmdlet generator for AutoRest.

DSC Resource Kit Release February 2019
Feb 20, 2019
Post comments count 0
Post likes count 0

DSC Resource Kit Release February 2019

Katie Kragenbrink [MSFT]
Katie Kragenbrink [MSFT]

We just released the DSC Resource Kit! This release includes updates to 14 DSC resource modules. In the past 6 weeks, 126 pull requests have been merged and 102 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our latest community call for the DSC Resource Kit was last Wednesday, February 13. We were not able to record the call this time, apologies. We will fix this for ...

Parsing Text with PowerShell (3/3)
Jan 28, 2019
Post comments count 1
Post likes count 1

Parsing Text with PowerShell (3/3)

Steve Lee
Steve Lee

This is the third and final post in a three-part series. In the previous posts, we looked at the different operators what are available to us in PowerShell. When analyzing crashes at DICE, I noticed that some of the C++ runtime binaries where missing debug symbols. They should be available for download from Microsoft's public symbol server, and most versions were there. However, due to some process errors at DevDiv, some builds were released publicly without available debug symbols. In some cases, those missing symbols prevented us from debugging th...

Parsing Text with PowerShell (2/3)
Jan 24, 2019
Post comments count 0
Post likes count 1

Parsing Text with PowerShell (2/3)

Steve Lee
Steve Lee

This is the second post in a three-part series. The operator The operator splits one or more strings into substrings. The first example is a name-value pattern, which is a common parsing task. Note the usage of the Max-substrings parameter to the operator. We want to ensure that it doesn't matter if the value contains the character to split on. When the line to parse contains fields separated by a well known separator, that is never a part of the field values, we can use the operator in combination with multiple assignment to get the fields into v...

The PowerShell-Docs repositories have been moved
Jan 23, 2019
Post comments count 0
Post likes count 0

The PowerShell-Docs repositories have been moved

Sean Wheeler (PowerShell)
Sean Wheeler (PowerShell)

The PowerShell-Docs repositories have been moved from the PowerShell organization to the MicrosoftDocs organization in GitHub. The tools we use to build the documentation are designed to work in the MicrosoftDocs org. Moving the repository lets us build the foundation for future improvements in our documentation experience. Impact of the move During the move there may be some downtime. The affected repositories will be inaccessible during the move process. Also, the documentation processes will be paused. After the move, we need to test access permissions and automation scripts.After these tasks are comp...

Announcing the PowerShell Preview Extension in VSCode
Jan 23, 2019
Post comments count 0
Post likes count 0

Announcing the PowerShell Preview Extension in VSCode

Sydney Smith [MSFT]
Sydney Smith [MSFT]

Preview builds of the PowerShell extension are now available in VSCode We are excited to announce the PowerShell Preview extension in the VSCode marketplace! The PowerShell Preview extension allows users on Windows PowerShell 5.1, Powershell 6.0, and all newer versions to get and test the latest updates to the PowerShell extension and comes with some exciting features. The PowerShell Preview extension is a substitute for the PowerShell extension so both the PowerShell extension and the PowerShell Preview extension should not be enabled at the same time. Features of the PowerShell Preview extension The PowerSh...

Parsing Text with PowerShell (1/3)
Jan 18, 2019
Post comments count 2
Post likes count 3

Parsing Text with PowerShell (1/3)

Steve Lee
Steve Lee

This is the first post in a three part series. A task that appears regularly in my workflow is text parsing. It may be about getting a token from a single line of text or about turning the text output of native tools into structured objects so I can leverage the power of PowerShell. I always strive to create structure as early as I can in the pipeline, so that later on I can reason about the content as properties on objects instead of as text at some offset in a string. This also helps with sorting, since the properties can have their correct type, so that n...

Windows Security change affecting PowerShell
Jan 10, 2019
Post comments count 0
Post likes count 0

Windows Security change affecting PowerShell

PowerShell Team
PowerShell Team

Windows Security change affecting PowerShell January 9, 2019 The recent (1/8/2019) Windows security patch CVE-2019-0543, has introduced a breaking change for a PowerShell remoting scenario. It is a narrowly scoped scenario that should have low impact for most users. The breaking change only affects local loopback remoting, which is a PowerShell remote connection made back to the same machine, while using non-Administrator credentials. PowerShell remoting endpoints do not allow access to non-Administrator accounts by default. However, it is possible to modify endpoint configurations, or create new cust...

DSC Resource Kit Release January 2019
Jan 9, 2019
Post comments count 0
Post likes count 0

DSC Resource Kit Release January 2019

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 14 DSC resource modules. In the past 6 weeks, 41 pull requests have been merged and 54 issues have been closed, all thanks to our amazing community! The modules updated in this release are: Several of these modules were released to remove the hidden files/folders from this issue. This issue should now be fixed for all modules except DFSDsc which is waiting for some fixes to its tests. For a detailed list of the resource modules and fixes in this release, see the Include...

DSC Resource Kit Release November 2018
Nov 28, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release November 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 9 DSC resource modules. In the past 6 weeks, 61 pull requests have been merged and 67 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our latest community call for the DSC Resource Kit was supposed to be today, November 28, but the public link to the call expired, so the call was cancelled. I will update the link for n...

PowerShell Constrained Language mode and the Dot-Source Operator
Nov 26, 2018
Post comments count 0
Post likes count 0

PowerShell Constrained Language mode and the Dot-Source Operator

PowerShell Team
PowerShell Team

PowerShell Constrained Language mode and the Dot-Source Operator PowerShell works with application control systems, such as AppLocker and Windows Defender Application Control (WDAC), by automatically running in ConstrainedLanguage mode. ConstrainedLanguage mode restricts some exploitable aspects of PowerShell while still giving you a rich shell to run commands and scripts in. This is different from usual application white listing rules, where an application is either allowed to run or not. But there are times when the full power of PowerShell is needed, so we allow script files to run in FullLanguage mode ...

Announcing General Availability of the Windows Compatibility Module 1.0.0
Nov 15, 2018
Post comments count 0
Post likes count 0

Announcing General Availability of the Windows Compatibility Module 1.0.0

Bruce Payette
Bruce Payette

Announcing General Availability of the Windows Compatibility Module 1.0.0 The Windows Compatibility module () is a PowerShell module that lets PowerShell Core 6 scripts access Windows PowerShell modules that are not yet natively available on PowerShell Core. (Note: the list of unavailable commands is getting smaller with each new release of PowerShell Core. This module is just for things aren’t natively supported yet.) You can install the module from the PowerShell Gallery using the command and the source code is available on GitHub. (This is where you should open issues or make suggestions.) Once y...

DSC Resource Kit Release October 2018
Oct 25, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release October 2018

PowerShell Team
PowerShell Team

We just released the DSC Resource Kit! This release includes updates to 9 DSC resource modules. In the past 6 weeks, 126 pull requests have been merged and 79 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. xPSDesiredStateConfiguration is also in the pipeline for a release, but the xArchive resource is failing its tests, so that module is currently on hold and will be released when all the...

Announcing PowerShell Core 6.1
Sep 13, 2018
Post comments count 0
Post likes count 0

Announcing PowerShell Core 6.1

Joey Aiello
Joey Aiello

We're proud to announce that the latest version of PowerShell has been released! This marks our second <a href="https://aka.ms/pslifecycle" rel="nofollow">supported</a> release of <a href="https://github.com/powershell/powershell">PowerShell Core</a>, the open-source edition of PowerShell that works on Linux, macOS, and Windows!

Desired State Configuration (DSC) Planning Update – September 2018
Sep 13, 2018
Post comments count 0
Post likes count 0

Desired State Configuration (DSC) Planning Update – September 2018

Michael Greene
Michael Greene

2018 has been the most active year ever for the DSC community. We are taking on major new areas of work in Azure, and have made significant progress in development of the new DSC platform. In this Planning Update for DSC, I want to cover these topics in detail and share major changes to the timing of our Open Source plans for the DSC platform.

New Look and Features for PowerShell Gallery
Sep 12, 2018
Post comments count 0
Post likes count 0

New Look and Features for PowerShell Gallery

PowerShell Team
PowerShell Team

The PowerShell Gallery and PowerShellGet have just been updated to provide new features, performance improvements, and a new modern design. NOTE: This post has important information for publishers in the “Accounts and publishing” section.

DSC Resource Kit Release September 2018
Sep 5, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release September 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 11 DSC resource modules. In the past 6 weeks, 146 pull requests have been merged and 105 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was on August 29. A recording of our updates will be available on YouTube soon. Join us for the next call at 12PM (Pacific tim...

PowerShell Module Function Export in Constrained Language
Aug 14, 2018
Post comments count 1
Post likes count 0

PowerShell Module Function Export in Constrained Language

PowerShell Team
PowerShell Team

PowerShell Module Exporting Functions in Constrained Language PowerShell offers a number of ways to expose functions in a script module. But some options have serious performance or security drawbacks. In this blog I describe these issues and provide simple guidance for creating performant and secure script modules. Look for a module soon in PSGallery that helps you update your modules to be compliant with this guidance. When PowerShell is running in Constrained Language mode it adds some restrictions in how module functions can be exported. Normally, when PowerShell is not running in Constrained Language, all ...

PowerShell Standard Library: Build single module that works across Windows PowerShell and PowerShell Core
Aug 6, 2018
Post comments count 4
Post likes count 0

PowerShell Standard Library: Build single module that works across Windows PowerShell and PowerShell Core

Steve Lee
Steve Lee

This is the first of a series of blog posts that will help you take advantage of a new NuGet package PowerShellStandard Library 5.1.0. This package allows developers to create modules that are portable between Windows PowerShell 5.1 and PowerShell Core 6.0. This means that you can create PowerShell modules that run on Windows, Linux, and macOS with a single binary! The version of PowerShell Standard Library indicates the lowest version of PowerShell that it is compatible with. The community promise is that it is always forward compatible. So a module built against PowerShell Standard Library v3 is compatible w...

PowerShell Injection Hunter: Security Auditing for PowerShell Scripts
Aug 3, 2018
Post comments count 0
Post likes count 0

PowerShell Injection Hunter: Security Auditing for PowerShell Scripts

PowerShell Team
PowerShell Team

At the DEFCON security conference last year, we presented the session: "<a href="https://www.youtube.com/watch?v=ahxMOAAani8">Get $pwnd: Attacking Battle Hardened Windows Server</a>". In this talk, we went through some of the incredibly powerful ways that administrators can secure their high-value systems (for example, Just Enough Administration) and also dove into some of the mistakes that administrators sometimes make when exposing their PowerShell code to an attacker. The most common form of mistake is script injection, where a script author takes a parameter value (supplied by an attacker) and runs it in a...

Increased Windows Modules coverage with PowerShell Core 6.1
Jul 31, 2018
Post comments count 0
Post likes count 0

Increased Windows Modules coverage with PowerShell Core 6.1

Steve Lee
Steve Lee

During the May 2018 Community Call and a tweet a few weeks later, we mentioned that PowerShell team was spending significant time in the Windows codebase. We even demoed using the Active Directory PowerShell Module from PowerShell Core 6 during the PowerShell Community Call. We started investigating some of the top requested modules that ship with Windows to see how to get them working in PowerShell Core 6. Our eventual goal is to have near 100% parity with Windows PowerShell for the in-box modules, but we expect this effort to span across multiple releases of Windows as there are many modules and PowerShell tea...

DSC Resource Kit Release July 2018
Jul 25, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release July 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 12 DSC resource modules. In the past 6 weeks, 128 pull requests have been merged and 90 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was on July 18. A recording of our updates will be available on YouTube soon. Join us for the next call at 12PM (Pacific ti...

PowerShell Core now available as a Snap package
Jul 20, 2018
Post comments count 0
Post likes count 1

PowerShell Core now available as a Snap package

Joey Aiello
Joey Aiello

The goal of PowerShell Core is to be the ubiquitous language for managing your assets in the hybrid cloud. That's why we've worked to make it available on many operating systems, architectures, and flavors of Linux, macOS, and Windows as possible. Today, we're happy to announce an addition to our support matrix: PowerShell Core is now available as a Snap package. What's a Snap package? Snap packages are containerized applications that can be installed on many Linux distributions. For more info, check out Canonical's blog on our Snap announcement. What does this do for me? Snap packages have a number of benefit...

PowerShell Script Analyzer 1.17.1 Released!
Jun 14, 2018
Post comments count 0
Post likes count 0

PowerShell Script Analyzer 1.17.1 Released!

James.W.Truher
James.W.Truher

Summary: A new version of PSScriptAnalyzer is now available with many new features, rules, fixes and improvements. You might remember me from my previous cross-platform remoting blog post, but just to introduce myself: I am Christoph Bergmeister, a full stack .Net developer in the London area and since the start of this year I am now also an official PSScriptAnalyzer maintainer although I do not work at Microsoft. On GitHub, you can find me as @bergmeister. After half a year, a new version of PSScriptAnalyzer (also known as PSSA) has been published and is now available on the PSGallery. Some of you might have b...

DSC Resource Kit Release June 2018
Jun 13, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release June 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This is our biggest release yet! It takes the records for the most merged pull requests in a release and the most modules we have ever released at once from GitHub! This release includes updates to 27 DSC resource modules. In the past 6 weeks, 165 pull requests have been merged and 115 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release...

DSC Resource Kit Release May 2018
May 2, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release May 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 12 DSC resource modules. In these past 6 weeks, 52 pull requests have been merged and 63 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was on April 25. A recording of our updates will be available on YouTube soon. Join us for the next call at 12PM (Pacific time) on June 6 to ask ...

Windows Pull Server Planning Update – April 2018
Apr 19, 2018
Post comments count 0
Post likes count 0

Windows Pull Server Planning Update – April 2018

Michael Greene
Michael Greene

In the next Current Branch release of Windows Server a new feature will be released to provide support for SQL Server as the database platform to support Windows Pull Server for DSC. This capability will open new scenarios: If you are a member of Windows Server Insiders you can test this now by downloading a preview build. If you are unfamiliar with the pull service role for DSC, the documentation page has been updated with details regarding how to setup Windows Pull Server environments using the latest versions of the xDSCWebService resource. The key changes are introduction of properties SQLPro...

DSC Resource Kit Release March 2018
Mar 21, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release March 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 7 DSC resource modules. In these past 6 weeks, 43 pull requests have been merged and 37 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was on March 14. A recording of our updates will be available on YouTube soon. Join us for the next call at 12PM (Pacific time) on April 25 to ask questions and ...

DSC Resource Kit Release February 2018
Feb 7, 2018
Post comments count 0
Post likes count 0

DSC Resource Kit Release February 2018

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 12 DSC resource modules. In these past 7 weeks, 83 pull requests have been merged and 70 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was on January 31. A recording of our updates is coming soon. Join us for the next call at 12PM (Pacific time) on March 14 to ask q...

Desired State Configuration (DSC) Planning Update – January 2018
Jan 26, 2018
Post comments count 0
Post likes count 0

Desired State Configuration (DSC) Planning Update – January 2018

Michael Greene
Michael Greene

In September 2017 we communicated some of our plans for PowerShell Desired State Configuration (DSC). Over the past few months, we have been executing on these plans and collecting feedback from customers and partners. The intent of this blog is to provide an update on the plans we shared back in September. I will have additional posts in the near future to discuss updates for Azure DSC Extension and Windows Pull Server. Specifically: We appreciate the continued feedback and look forward to working with the DSC community to make incremental improvements as we progress together. What Are We Tr...

PowerShell Core 6.1 Roadmap
Jan 24, 2018
Post comments count 0
Post likes count 0

PowerShell Core 6.1 Roadmap

Steve Lee
Steve Lee

The release of PowerShell Core 6.0 is only the beginning and we are already thinking about the next leg of our journey. Most of the effort of the team with PowerShell Core 6.0 was in these areas: The community did some amazing work to add new capabilities in both the engine as well as cmdlets! If you participated in the January 2018 Community Call you already got an early preview of this content. Timeline First, we're publishing PowerShell Core 6.0.1 as a servicing release by the end of January in order to update to .NET Core 2.0.5.  There are no other changes in the 6.0.1 release. After that, th...

PowerShell Core 6.0: Generally Available (GA) and Supported!
Jan 10, 2018
Post comments count 0
Post likes count 0

PowerShell Core 6.0: Generally Available (GA) and Supported!

Joey Aiello
Joey Aiello

PowerShell Core 6.0 is a new edition of PowerShell that is cross-platform (Windows, macOS, and Linux), open-source, and built for heterogeneous environments and the hybrid cloud. First and foremost, thank you to all of our amazing community, especially our open-source contributors (the most recent of which you can find on our community dashboard at https://aka.ms/PSGitHubBI) for donating your time and energy to PowerShell Core. Whether you contributed code, tests, documentation, issues, or even just your feedback and opinions, we are extremely grateful for the sweat and tears that you've invested in PowerShell...

DSC Resource Kit Release December 2017
Dec 20, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release December 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 16 DSC resource modules. In these past 5 weeks, 68 pull requests have been merged and 59 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was today on December 20. A recording of our updates as well as summarizing notes will be available soon. ...

Using the OpenSSH Beta in Windows 10 Fall Creators Update and Windows Server 1709
Dec 15, 2017
Post comments count 6
Post likes count 0

Using the OpenSSH Beta in Windows 10 Fall Creators Update and Windows Server 1709

Joey Aiello
Joey Aiello

I'm thrilled to share that a Beta OpenSSH client and server daemon are available as a Feature-on-Demand in Windows 10 Fall Creators Update and Windows Server 1709. Since our last update blog, we've been working hard on a Win32 port of OpenSSH and working closely with members of the OpenSSH Portable and OpenBSD projects with the eventual goal of bringing Win32 support upstream into OpenSSH Portable. Until then, you should expect OpenSSH support in Windows to continue to improve in future updates of Windows, including upcoming Windows Insider builds. You can track our progress on GitHub where you can find ou...

DSC Resource Naming Guidelines
Dec 8, 2017
Post comments count 0
Post likes count 0

DSC Resource Naming Guidelines

Michael Greene
Michael Greene

When DSC was announced at TechEd 2013, one of the goals was to "Create an ecosystem". The ecosystem for DSC has grown tremendously in the last 4 years. At worldwide events for PowerShell (PowerShell + DevOps Global Summit, PowerShell Conference EU, PowerShell Conference Asia) there have been presentations lead by people actively using DSC to discuss real world, success, challenges, and community projects to resolve common issues. In addition there are community projects to build solutions for DSC entirely driven by the community, such as Datum to manage configuration data at scale, BaselineManagement to...

Prerelease Versioning Added to PowerShellGet and PowerShell Gallery
Dec 5, 2017
Post comments count 1
Post likes count 0

Prerelease Versioning Added to PowerShellGet and PowerShell Gallery

J. Keith Bankston
J. Keith Bankston

With the release of PowerShellGet 1.6.0, PowerShellGet cmdlets and the PowerShell Gallery have added support for prerelease strings for prerelease versions of modules and scripts. You can now publish items to the PowerShell Gallery with a version like 1.0.0-alpha, and you can download items identified as a prerelease. Items can be filtered using prerelease version strings, in both the Gallery UI and via Find-* cmdlets. Before this feature, if publishers wished to publish a prerelease version of an item, they had to use a version lower than 1.0.0 (ex. 0.0.1). This meant it was not possible to publish a prerelea...

PowerShell Core 6 Release Candidate
Nov 17, 2017
Post comments count 0
Post likes count 0

PowerShell Core 6 Release Candidate

Steve Lee
Steve Lee

PowerShell Core 6 Release Candidate Last year, we announced that PowerShell was not only Open Source, but also cross platform.  The finish line is in sight and we recently published the Release Candidate for PowerShell Core 6! PowerShell Team ♥ Community It has been an amazing experience for the team working with the community on PowerShell Core 6!  Being able to work openly and transparently meant that we could address customer concerns much more quickly than in the days of Windows PowerShell.  The contributions from the community have also enabled PowerShell Core 6 to be more agile and richer in capability, par...

DSC Resource Kit Release November 2017
Nov 15, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release November 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 10 DSC resource modules. In these past 6 weeks, 53 pull requests have been merged and 50 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was last week on Novemeber 8. A recording of our updates as well as summarizing notes will be available soon. Join us for the next...

Azure Automation DSC Pricing Flexibility
Nov 14, 2017
Post comments count 0
Post likes count 0

Azure Automation DSC Pricing Flexibility

Michael Greene
Michael Greene

Today we would like to share a new flexible pricing strategy for managing server nodes using Azure Automation to deliver PowerShell Desired State Configuration, giving you greater control over costs of managing on-premises nodes. As you might already know, Azure Automation DSC (Azure DSC) is a managed service that is free when used to manage virtual machines running in Microsoft Azure. This provides the functionality of the in-box DSC Pull server without needing to maintain a server to host the capability, plus a lot of additional features. Some of the goodies that you get with Azure DSC are as follows: Fea...

PowerShell Constrained Language Mode
Nov 2, 2017
Post comments count 3
Post likes count 0

PowerShell Constrained Language Mode

PowerShell Team
PowerShell Team

PowerShell Constrained Language Mode Update (May 17, 2018) In addition to the constraints listed in this article, system wide Constrained Language mode now also disables the ScheduledJob module. The ScheduledJob feature uses Dot Net serialization that is vulnerable to deserialization attacks. So now whenever an application whitelisting solution is applied such as DeviceGuard or AppLocker, PowerShell will run in Constrained Language mode and also disable the ScheduledJob module. Use the Windows Task Scheduler or PowerShell ScheduledTasks module as an alternative. For more information see CVE-2018-0958. What i...

Defending Against PowerShell Attacks
Oct 23, 2017
Post comments count 0
Post likes count 0

Defending Against PowerShell Attacks

PowerShell Team
PowerShell Team

[Updated Feb 20th, 2020 with latest guidance] The security industry is ablaze with news about how PowerShell is being used by both commodity malware and attackers alike. Surely there’s got to be a way to defend yourself against these attacks! There absolutely is. PowerShell is - by far - the most securable and security-transparent shell, scripting language, or programming language available. Our recommendations are: Some security professionals recommend disabling PowerShell as a method of risk mitigation. Microsoft’s guidance on this falls into two areas: For further...

Require License Acceptance Support in PowerShellGet
Oct 22, 2017
Post comments count 0
Post likes count 0

Require License Acceptance Support in PowerShellGet

Fareha Rashid[MSFT]
Fareha Rashid[MSFT]

PowerShellGet version 1.5.0 has added support for module publishers to require explicit license acceptance from users before installing a module. This feature has been requested by several of our partners, in order to meet their legal requirements. If a user installs, updates, or saves a module using PowerShellGet, and the publisher of that module requires the user to agree to a license, the user must indicate they accept the license or the operation fails. This works whether the module is installed directly or if it is installed because it is a dependency for another module. Publishing Requirements for Modules...

Navigate Azure Resources Just Like a File System
Oct 19, 2017
Post comments count 0
Post likes count 0

Navigate Azure Resources Just Like a File System

JeniTao
JeniTao

At Microsoft Ignite (around 8:15 min), we announced the Public Preview of PowerShell in Azure Cloud Shell.  A unique feature of PowerShell experience in Azure Cloud Shell is navigation of Azure resources via the Azure drive (Azure:).  Today, we are making this feature available on PowerShell Gallery as well as making the source code available on GitHub. This enables you to navigate Azure resources from any machine running Windows PowerShell 5 or higher. Simple Hierarchy in PowerShell (SHiPS) - An Easier Way to Build PowerShell Providers AzurePSDrive is built on top of an abstraction layer - SHiPS, which sim...

Polaris – simple Microservices using only PowerShell
Oct 16, 2017
Post comments count 0
Post likes count 0

Polaris – simple Microservices using only PowerShell

Tyler Leonhardt [MSFT]
Tyler Leonhardt [MSFT]

Polaris - Simple Microservices using only PowerShell Polaris is a cross-platform, minimalist web framework for PowerShell Core 6. With 6 lines of code, you have your very own webserver running and ready to accept requests - all within PowerShell:   Disclaimer We open sourced this as an experiment. It's not an officially supported Microsoft library and there is no plan yet to do so. However, we are listening to the community to determine if this work is important enough to continue investing in. Why we made Polaris PowerShell is evolving and we want to experiment with other use cases for Pow...

DSC Resource Kit Release October 2017
Oct 5, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release October 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit!This release includes updates to 6 DSC resource modules. In these past 6 weeks, 52 pull requests have been merged and 39 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was last week on September 27. A recording of our updates as well as summarizing notes will be available soon. Join us for the next call at 12PM (Pacif...

PowerShell in Azure Cloud Shell (Preview) is now publically available in Azure Portal
Sep 26, 2017
Post comments count 0
Post likes count 0

PowerShell in Azure Cloud Shell (Preview) is now publically available in Azure Portal

PowerShell Team
PowerShell Team

Yesterday, at IGNITE 2017, we announced the public availability of PowerShell in Azure Cloud Shell. With the addition of PowerShell in Cloud Shell, alongside Bash in Azure Cloud Shell, you now have the flexibility to choose the shell experience that works best for you. Thank you to our private preview users who helped shape the current experience by providing valuable feedback via issues and feature requests. We encourage you to continue your support by sharing your thoughts, experience, and input through the Azure Cloud Shell UserVoice. Hemant Mahawar - @HemanMahawar Principal Program Manager PowerShell Team

DSC Future Direction Update
Sep 12, 2017
Post comments count 1
Post likes count 0

DSC Future Direction Update

Mark Gray [MSFT]
Mark Gray [MSFT]

PowerShell Core and DSC PowerShell is open sourced and moving over to .Net Standard 2.0 for the reasons outlined in Jeffrey's blog post. Like PowerShell, PowerShell Desired State configuration (DSC) needs to meet customers in this multi-platform, multi-cloud, multi-OS world where they live. In Joey's blog post, he outlined what this means to the future of PowerShell. What does all of this mean for DSC going forward? In this post, we will discuss what direction we plan to take DSC including: Editions Windows PowerShell Desired State Configuration is included as part of Windows PowerShell ...

Windows PowerShell 2.0 Deprecation
Aug 24, 2017
Post comments count 0
Post likes count 0

Windows PowerShell 2.0 Deprecation

Joey Aiello
Joey Aiello

We recently announced that Windows PowerShell 2.0 is being deprecated in the Windows 10 Fall Creators Update. Deprecation is a process whereby technologies or applications are marked as legacy, signalling to users that they may be removed in the future, and that should move away from them and towards newer alternatives. We do not currently have a timeline to remove Windows PowerShell 2.0, but as we continue to evaluate its usage in the PowerShell ecosystem, we will be working to remove it in a future release. When this decision is made, we will give plenty of notice via official Windows deprecation channel...

DSC Resource Kit Release August 2017
Aug 23, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release August 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

DSC Resource Kit Release We just released the DSC Resource Kit! This release includes updates to 10 DSC resource modules. In these past 6 weeks, 91 pull requests have been merged and 74 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was last week on August 16. A recording of our updates as well as summarizing notes are available. Join us...

PSSwagger – Automatically generate PowerShell cmdlets from OpenAPI (f.k.a Swagger) specification
Aug 15, 2017
Post comments count 0
Post likes count 0

PSSwagger – Automatically generate PowerShell cmdlets from OpenAPI (f.k.a Swagger) specification

Manikyam Bavandla [MSFT]
Manikyam Bavandla [MSFT]

As a PowerShell enthusiast or DevOps professional, have you ever thought of having a tool that automatically generates PowerShell cmdlets to manage or access a RESTful Web Service? We are happy to share PSSwagger - the PowerShell Cmdlet generator for OpenAPI based web services. At PowerShell Conference Europe 2017, Jeffrey first showcased PSSwagger, and today we are open-sourcing the PSSwagger module and releasing its preview version to the PowerShell Gallery! Some of the benefits of PSSwagger are: • One module that works cross-platform - generated modules supports both PowerShell Core and Windows PowerShell 5.1...

PowerShell Documentation Migration
Jul 28, 2017
Post comments count 0
Post likes count 0

PowerShell Documentation Migration

Zachary Alexander
Zachary Alexander

  Hi, I’m Zach Alexander and I’m a PM on the PowerShell Team working on documentation. I wanted to let you know that there will be a brief downtime for online PowerShell documentation. This downtime will occur on August 2nd and shouldn’t last more than a few hours. We will start around 4:30pm Pacific and estimate we will be back up by 7:30pm. This downtime is needed so we can move our content off MSDN and onto https://docs.microsoft.com/! Moving to docs.microsoft.com means better community tools, better navigation, and a better reading experience. This migration will not break most existing links. We wi...

PowerShell 6.0 Roadmap: CoreCLR, Backwards Compatibility, and More!
Jul 14, 2017
Post comments count 0
Post likes count 0

PowerShell 6.0 Roadmap: CoreCLR, Backwards Compatibility, and More!

Joey Aiello
Joey Aiello

As we've made progress on open-source PowerShell, it's time to start talking more in-depth about: PowerShell Editions There are two editions of PowerShell: Windows PowerShell is the edition of PowerShell built on top of .NET Framework (sometimes referred to colloquially as "FullCLR"): PowerShell Core is the edition of PowerShell built on top of .NET Core (sometimes simplified to "CoreCLR", though it technically includes CoreFX as well). Note: while PowerShell Core 6.0 is cross-platform, there is also a PowerShell Core 5.0/5.1 released exclusively as part of Nano Server. Com...

DSC Resource Kit Release July 2017
Jul 12, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release July 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit!This release includes updates to 12 DSC resource modules. In these past 6 weeks, 106 pull requests have been merged and 115 issues have been closed, all thanks to our amazing community! This is by far the most issues we have ever had closed for a single release! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was last week on July 5. A recording of our upd...

Getting Started with PowerShell Core on Windows, Mac, and Linux
Jun 9, 2017
Post comments count 0
Post likes count 0

Getting Started with PowerShell Core on Windows, Mac, and Linux

Ashley McGlone
Ashley McGlone

Today we have a guest post from Honorary Script Guy and Microsoft Premier Field Engineer Ashley McGlone, also known as GoateePFE. This is deeper than Coke vs. Pepsi or Ford vs. Chevy. We are breaking down the barriers. Cats and dogs living together. Are you ready for this? What is PowerShell Core? The next release of PowerShell (6.0) was open-sourced last year and is currently in beta. However, it is PowerShell Core designed to run cross-platform on Windows, Mac, and Linux. PowerShell Core runs on top of .NET Core, a cross-platform, open-source version of the code base powering most of the Windows world. This ve...

DSC Resource Kit Release May 2017
May 31, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release May 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 10 DSC resource modules including 3 new resources. In these past 6 weeks, 60 pull requests have been merged and 58 issues have been closed, all thanks to our amazing community! The modules updated in this release are: UPDATE - xDFS has now also been released. Release notes can be found on the PowerShell Gallery here. xStorage, xNetworking, and xCertificate have also just been released again to fix a conflict when using the modules together. PSDscResources is also in the pipeline for release, but it is curre...

Coming Soon – PowerShell in Azure Cloud Shell
May 23, 2017
Post comments count 0
Post likes count 0

Coming Soon – PowerShell in Azure Cloud Shell

PowerShell Team
PowerShell Team

At BUILD 2017, we announced the preview of Azure Cloud Shell supporting the Bash shell. We are adding PowerShell support to Azure Cloud Shell, which gives you a choice of shell to get work done. Sign-up today to participate in a limited preview of PowerShell in Azure Cloud Shell. We look forward to sharing this awesome new PowerShell experience with you! Hemant Mahawar - @HemanMahawar Principal Program Manager PowerShell Team

Windows 10 Creators Update and PowerShell DSC
May 15, 2017
Post comments count 0
Post likes count 0

Windows 10 Creators Update and PowerShell DSC

Mark Gray [MSFT]
Mark Gray [MSFT]

For those of you who are using or planning to update the Windows 10 Creators Update, we want to make you aware of some issues that we have discovered in DSC. The following scenario is an issue in this release: We have a fix for this issue and are working diligently to get it released as soon as possible. We will let you know in a few days when you can expect to get your hands on the fix.  We are also investigating some other potential issues with DSC while running in Strict Mode and will reply to this post when we know more. Mark Gray Senior Program Manager The PowerShell Team

Announcing PowerShell for Visual Studio Code 1.0!
May 10, 2017
Post comments count 0
Post likes count 0

Announcing PowerShell for Visual Studio Code 1.0!

David Wilson [MSFT]
David Wilson [MSFT]

Today we are extremely excited to announce that the PowerShell extension for Visual Studio Code has reached version 1.0! We are shipping this update to line up with the PowerShell Core 6.0 Beta.1 release to provide the official PowerShell development experience for all supported platforms: Feature Overview We've been working hard over the last year and a half to put together a first-class development experience for PowerShell that includes the following features: You can find instructions for installing VS Code and the PowerShell extension at our GitHub repo. You can also watc...

PowerShell Core 6 Beta.1 Release
May 9, 2017
Post comments count 0
Post likes count 0

PowerShell Core 6 Beta.1 Release

Steve Lee
Steve Lee

Approximately 9 months ago, we announced PowerShell Core 6 on GitHub being not only Open Source, but also cross platform. Today, I'm proud to announce we are moving out of alpha and into beta! We realize that moving a technology that started in Windows to Linux has to fit in properly to be accepted and provide a great experience across all platforms.  We appreciate all the great feedback -- keep it coming! You can download and read the change log from our usual release page. If you've previously followed the steps to register the packages.microsoft.com Linux repository (see distro specific links below), you ...

OpenSSH Security Testing Kick Off
May 1, 2017
Post comments count 0
Post likes count 0

OpenSSH Security Testing Kick Off

PowerShell Team
PowerShell Team

Over the past while, we’ve been very busy porting OpenSSH to Win32. We’ve been working with the OpenSSH community in our GitHub repository, and are nearing a point where we are taking steps to make it production ready. Security is obviously something that we have focused on during every phase of the project. As part of this production readiness phase, however, we are additionally funding an extensive penetration test. We have engaged Casaba Security as part of this effort, who will be digging deep into the implementation over the next 1-2 months. As with all aspects of this project, one of our main goals is t...

DSC Configuration Sharing
Apr 28, 2017
Post comments count 0
Post likes count 0

DSC Configuration Sharing

Michael Greene
Michael Greene

The community around DSC Resources has been inspiring. The PowerShell Gallery now includes more than 2000 modules/scripts. 181 of those are modules focused on DSC, that collectively include 766 DSC Resources. With this many building blocks available, it has become easier and faster to get a DSC project through the proof of concept phase to production-ready Windows Servers built using Configuration As Code. When the author is new to DSC, their first configuration is a complex learning experience. The modules containing DSC Resources often have an /Examples folder with Configuration scripts showing how to use...

DSC Resource Kit Release April 2017
Apr 19, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release April 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 5 DSC resource modules, including 3 new DSC resources. In these past 6 weeks, 57 pull requests have been merged and 46 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. Our last community call for the DSC Resource Kit was last week on April 12. A recording of our updates as well as summarizing notes are available. Join us next time on May 24 to ask que...

A Comparison of Shell and Scripting Language Security
Apr 10, 2017
Post comments count 0
Post likes count 1

A Comparison of Shell and Scripting Language Security

PowerShell Team
PowerShell Team

PowerShell Security is a topic on everybody's mind. Most of all - ours. As PowerShell has become more popular with Administrators, it has also become more popular for unauthorized administrators - also known as "Attackers". In any operating system or platform, the power and efficiency you provide to authorized administrators is also available to unauthorized administrators. For example, Unix, Linux, and Mac all have dozens of powerful built in compilers, scripting languages, and debuggers. It's a power user's dream, but also a liability. The PowerShell team has recognized this double-edged sword since the intro...

Regular cadence for PowerShell Core Community Call
Mar 30, 2017
Post comments count 0
Post likes count 0

Regular cadence for PowerShell Core Community Call

Joey Aiello
Joey Aiello

tl;dr: PowerShell Core Community Calls are on the third Thursday of every month at 9:30am Pacific Time (note, this is currently PDT). Use this .ics file (right-click and select in order to download the file correctly) to avoid missing one. Hi everyone! After three successful PowerShell Core Community Calls, we're switching to a more standard cadence so that you can plan ahead and join us! For those of you that haven't heard of the PowerShell Core Community Call, it's a one hour meeting where the PowerShell Committee gets together to talk with you to help us make decisions on the evolving design of PowerShell ...

Windows Management Framework (WMF) 5.1 now in Microsoft Update Catalog
Mar 28, 2017
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 5.1 now in Microsoft Update Catalog

PowerShell Team
PowerShell Team

The Windows Management Framework (WMF) 5.1 is now available in the Microsoft Update catalog for Windows Server 2012, Windows Server 2012 R2, and Windows 8.1. These updates are listed in the catalog as KB3191564 and KB3191565.  Those who use WSUS to manage updates for their systems are now able to install WMF 5.1 for most of the WMF-supported Windows versions. The packages for Windows 7 and Windows Server 2008 R2 are only available via the Download Center at this time.   As previously announced, WMF 5.1 is a required update for WMF 5.0, and may be installed directly over WMF 5.0. As of June 1, 2017, users ...

DSC Resource Kit Release March 2017
Mar 8, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release March 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 10 DSC resource modules, including 19 new DSC resources. In these past 6 weeks, 155 pull requests (the most ever!) have been merged and 71 issues have been closed, all thanks to our amazing community! A few weeks ago we also released a new DSC resource module called SecurityPolicyDsc with resources to configure local security policies through secedit. Thank you to Jason Walker for this great new module! The modules updated in this release are: For a detailed list of the resource modules and fixes in this r...

Using PowerShell Modules in Azure Functions
Feb 24, 2017
Post comments count 0
Post likes count 0

Using PowerShell Modules in Azure Functions

Steve Lee
Steve Lee

Previously, I blogged about how I created PowerShell GitHub Dashboard using Azure Functions to run a PowerShell script and didn't use PowerShell Modules as I didn't find an easy way to do it with Azure Functions.  Stefan informed me that you can easily do it using FTP!  Today, I'm publishing a guest blog post that Stefan authored that walks you through how to use PowerShell Modules in Azure Functions!   Steve Lee published a couple of blog posts about how he created a PowerShell Open Source Community Dashboard in PowerBi. In his last blog post he explained how he used PowerShell, Azure StorageTable, Azur...

Code Coverage – Part 2
Feb 22, 2017
Post comments count 0
Post likes count 0

Code Coverage – Part 2

James.W.Truher
James.W.Truher

In my last post on code coverage, I shared the process for you to collect coverage for your environment. This week, I'll be describing a way to use our tools to create new tests and show how you can measure the increase of coverage for PowerShell Core after adding new tests. To recap, we can collect code coverage with the OpenCover module, and then inspect the coverage. In this case I would like to know about coverage for a specific cmdlet. For this post, we're going to focus on the Clear-Content Cmdlet because coverage is ok, but not fantastic and it is small enough to go over easily. Here's a partial capture f...

Managing Security Settings on Nano Server with DSC
Feb 21, 2017
Post comments count 0
Post likes count 0

Managing Security Settings on Nano Server with DSC

Zachary Alexander
Zachary Alexander

We have released DSC resources building upon the previously released security and registry cmdlets for applying security settings. You can now implement Microsoft-defined security baselines using DSC. AuditPolicyDsc SecurityPolicyDsc GPRegistryPolicy Install all 3 from the Gallery with the command: A sample configuration, below, takes the Security Baselines for Windows Server 2016 and extracts the .inf, .csv and .pol containing the desired security settings from the exported Group Policy Objects. (You can find information on extracting the necessary files in the Registry cmdlets blogpost.) Simply pass the files ...

Building a GitHub Dashboard using PowerShell, AzureStorageTable, AzureFunction, and PowerBI
Feb 9, 2017
Post comments count 0
Post likes count 0

Building a GitHub Dashboard using PowerShell, AzureStorageTable, AzureFunction, and PowerBI

Steve Lee
Steve Lee

Last week, I published a PowerShell Community Dashboard and today, I'm going to share the code and cover some of the learnings.The code is published as a module on the PowerShell Gallery. Make sure you get v1.1 as I found an issue where if you're not a member of the PowerShell Org on GitHub, you won't have permission to query the members so I changed the code to accommodate that.You can install the module using:   (and it works on PowerShell Core 6.0 including Linux! I only tested it with alpha.15, though...) Once installed, you can just run it manually: The is something you would gener...

Installing latest PowerShell Core 6.0 Release on Linux just got easier!
Feb 1, 2017
Post comments count 0
Post likes count 0

Installing latest PowerShell Core 6.0 Release on Linux just got easier!

Steve Lee
Steve Lee

As we continue our journey from Alpha releases and eventually to Beta, you can continue to download the latest releases from our GitHub repository. However, our goal has always been to enable installation through popular existing Linux package management tools like apt-get and yum.I am pleased to announce that we have now published PowerShell Core 6.0 alpha.15 to https://packages.microsoft.com! Install PowerShell Core on Ubuntu 14.04   Install PowerShell Core on Ubuntu 16.04   Install PowerShell Core on CentOS   After registering the Microsoft repository once as supe...

PowerShell Open Source Community Dashboard
Jan 31, 2017
Post comments count 0
Post likes count 0

PowerShell Open Source Community Dashboard

Steve Lee
Steve Lee

Since going cross-platform and open source on GitHub, I've wanted to know how we are doing as a community and who the top contributors we should recognize are. The available GitHub graphs are not sufficient as they focus on commits, and there are many other ways for the community to contribute to PowerShell. Certainly receiving Pull Requests (PRs) has a direct impact on the code base, but opening issues, commenting on issues, and commenting on PRs (aka code reviews) are also immensely appreciated and valuable to help improve PowerShell.In addition, PowerShell is not a single repository, but several repositories t...

DSC Resource Kit Release January 2017
Jan 25, 2017
Post comments count 0
Post likes count 0

DSC Resource Kit Release January 2017

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! This release includes updates to 8 DSC resource modules, including 11 new DSC resources. In these past 6 weeks, 71 pull requests have been merged and 37 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. [UPDATE 01/26/17 2:40PM PST] - xHyper-V has now been released with a new resource. [UPDATE 02/03/17 2:20PM PST] - PSDscResources has now also been releas...

Windows Management Framework (WMF) 5.1 Released
Jan 19, 2017
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 5.1 Released

PowerShell Team
PowerShell Team

Update March 28, 2017: WMF 5.1 in Microsoft Update Catalog Update January 27, 2017: .Net version info updated. We are pleased to announce that we are releasing the Windows Management Framework (WMF) 5.1 via the Microsoft download center.  Update 3/28/2017: WMF 5.1 is also available for most supported Windows versions in the Microsoft Update Catalog, see this blog for additional details.    WMF 5.1 upgrades Windows 7, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, and Windows Server 2012 R2 to the PowerShell, WMI, WinRM and SIL components that were released with Windows Server 2016 and Windows 10 An...

PowerShell Core Community Call #2 – Jan 26, 2016
Jan 11, 2017
Post comments count 0
Post likes count 0

PowerShell Core Community Call #2 – Jan 26, 2016

Joey Aiello
Joey Aiello

tl;dr: Our next PowerShell Community Call is January 26th, 2017 @ 9am PST. Hit the bottom of this page for an .ics and a link to the Skype meeting. Hi everyone! I'm proud to announce the 2nd PowerShell Core Community Call. As with the first call, this is a chance for the PowerShell Committee to have a direct conversation with you, PowerShell users who give us feedback to make PowerShell 6.0 great. It's also an opportunity for you to gain some insight into how we think about design problems, as well as to learn new features and additions to PowerShell at the earliest stages of their development. In our last co...

Code Coverage now available for PowerShell Core!
Jan 11, 2017
Post comments count 0
Post likes count 0

Code Coverage now available for PowerShell Core!

James.W.Truher
James.W.Truher

This is the first of a series of posts on PowerShell Core and the tools we use to test it. If you’ve looked at the main project for PowerShell (https://github.com/PowerShell/PowerShell, you may have noticed a new badge down in the Build status of nightly builds: We are supplying code coverage numbers for our test pass via the OpenCover project (https://github.com/OpenCover/opencover) and we visualize our code coverage percentage via coveralls.io (https://coveralls.io/github/PowerShell/PowerShell?branch=master). This means you can see some details about our testing and how much of PowerShell is covered by our t...

DSC Resource Kit Release December 2016
Dec 14, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit Release December 2016

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit!Since our last release on November 2, we have added 1 new module, AuditPolicyDsc, which allows you to edit your audit policy subcategories and options. Thank you to Adam Haynes for this great new module! Outside of the DSC Resource Kit, we also recently published an update to GPRegistryPolicy in the PowerShell Gallery. The latest version now includes a DSC resource to help you locally manage policy registry keys. We have also added two new maintainers to the DSC Resource Kit: These guys have shown outstanding dedication to their modules and continue to ...

Azure DSC extension for Nano Server
Dec 7, 2016
Post comments count 0
Post likes count 0

Azure DSC extension for Nano Server

Zachary Alexander
Zachary Alexander

NOTE: For information on OS support, and other features, please refer to our release history.   We are proud to announce that the Azure DSC extension now works on Nano Server! You will need to use extension version 2.21 or above, but the functionality and cmdlets remain the same. The extension will take care of adding the DSC package to Nano Server. Nano’s smaller footprint should speed up your end-to-end deployment time. Look at our existing documentation to get started. You can also use use Azure Tools for Visual Studio to help your deployments along!

WMF 5.1 Releasing January 2017
Dec 6, 2016
Post comments count 0
Post likes count 0

WMF 5.1 Releasing January 2017

PowerShell Team
PowerShell Team

Update January 19, 2017: WMF 5.1 has been released via the download center. There is more information on the release in this blog.   We previously announced that the Windows Management Framework (WMF) 5.1 would release shortly after the GA release of Windows Server 2016, however the PowerShell team found some issues with upgrades that could affect a small set of our customers.  We are resolving these issues now, and target early January for the release of WMF 5.1 to the public. We understand there is pent-up demand for this release. WMF 5.1 provides important enhancements over WMF 5.0, and removes WMF5.0...

Join our first PowerShell Core Community Call – Dec 8, 2016
Dec 1, 2016
Post comments count 0
Post likes count 0

Join our first PowerShell Core Community Call – Dec 8, 2016

Joey Aiello
Joey Aiello

tl;dr: We're having a PowerShell Core Community Call with the PowerShell Committee and you should join us! Hit the bottom of this page for an .ics and a link to the Skype meeting. The PowerShell Team loves feedback. Whether it's fielding your Windows PowerShell suggestions and bugs through our Windows Server UserVoice, answering your quick questions via the @PowerShell_Team account on Twitter, fixing your PowerShell Core 6.0 issues on GitHub, or even discussing entirely new designs--yours and our own--on the PowerShell-RFC repository, our peer-to-peer engagement with YOU has never been stronger. As part of st...

Tips and Tricks from PowerShell Core Validation
Nov 29, 2016
Post comments count 0
Post likes count 0

Tips and Tricks from PowerShell Core Validation

Michael Greene
Michael Greene

It has been a privilege for the CAT team to work with customers and the PowerShell team to validate early builds and experiences with PowerShell Core. Some of the customers involved were key influences on the whitepaper, The Release Pipeline Model Applied to Windows Server and Microsoft Cloud. As a result, validation has included many experiences from outside the traditional Microsoft tool chain, such as Vagrant and Jenkins. For this blog post, I wanted to share some of the learnings that I gained during the validation experience. This is not meant to be a complete picture of PowerShell Core. Rather, a glimpse...

Join the PowerShell 10th Anniversary Celebration!
Nov 8, 2016
Post comments count 0
Post likes count 0

Join the PowerShell 10th Anniversary Celebration!

PowerShell Team
PowerShell Team

Update: For those of you looking for the videos of this event, you can find all of them on the PowerShell 10 Year Anniversary event page on Channel9. This coming Monday, November 14th, PowerShell will have been shipping for 10 years, so the team is going to celebrate with a day-long event, running from 8:00 am to 4:00 pm (PST). This will be streaming live and shown world-wide on the home page for Channel9.msdn.com.   We’ll have segments on PowerShell and SQL, PowerShell and Azure Automation, and the future directions for PowerShell, and … well you get the idea. In addition, we're planning several presentation...

DSC Resource Kit November 2016 Release
Nov 2, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit November 2016 Release

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! Since our last release on September 21, we have added 1 new repository, PSDscResources, which will serve as the new home of the in-box DSC resources from the PSDesiredStateConfiguration module. This new module now has over 75,000 downloads from the PowerShell Gallery! Wow! Read more about PSDscResources in our blog post here. This release includes updates to 12 DSC resource modules, including 13 new DSC resources. In these past 6 weeks, 62 pull requests have been merged and 43 issues have been closed, all thanks to our amazing community! The modules updated in this rele...

PSScriptAnalyzer Community Call – Oct 18, 2016
Oct 13, 2016
Post comments count 0
Post likes count 0

PSScriptAnalyzer Community Call – Oct 18, 2016

Kapil Borle
Kapil Borle

Please join PSScriptAnalyzer community call on Tuesday, October 18, 2016 10:00 AM PDT via Skype or telephone. You can find the meeting agenda here. Skype Click the following link to join the meeting via Skype. Join online meeting Phone Dial +1-323-849-4874 to join the meeting via telephone. OR To join the meeting through a local number follow this link: Find a local number Conference ID: 94231049 For any additional help regarding joining the meeting, follow this link: Help

New Home for In-Box DSC Resources
Oct 7, 2016
Post comments count 0
Post likes count 0

New Home for In-Box DSC Resources

Katie Keim [MSFT]
Katie Keim [MSFT]

We have just released a new DSC module called PSDscResources. The aim of this module is to serve as the new home of the in-box PSDesiredStateConfiguration module open-sourced on GitHub. This allows us to accept contributions for the in-box resources from our wonderful DSC community and release these resources more frequently outside of the Windows Management Framework (WMF). The current release of PSDscResources contains 5 of the resources available in the in-box module: These resources are a combination of those in-box as well as community contributions from our experimental xPSDesiredStateConf...

New Social Features on Gallery
Sep 30, 2016
Post comments count 0
Post likes count 0

New Social Features on Gallery

Yuting Chen
Yuting Chen

We are excited to announce new social features on the PowerShell Gallery: share buttons and discussion boards.   Share Buttons We have added share buttons on each item page. You can now share items in the gallery on your social networks. The buttons are located on the side panel of the page. Click on the share button and a new share window will open:   Discussion Boards We have also added a discussion board at the bottom of each item page. This feature is being added to allow customers to share information about the item, and give feedback on it. It is expected that the comments are given...

PowerShellGet and PackageManagement in PowerShell Gallery and GitHub
Sep 29, 2016
Post comments count 0
Post likes count 0

PowerShellGet and PackageManagement in PowerShell Gallery and GitHub

PowerShell Team
PowerShell Team

As of today, PowerShellGet is an open source project, and both the PowerShellGet and PackageManagement modules are available in the PowerShell Gallery. Moving PowerShellGet to Open Source PowerShellGet is now a repo under github.com/PowerShell. Of course, the PackageManagement module is already open-sourced as it is part of the OneGet project.  Check out the new PowerShellGet repo at github.com/PowerShell/PowerShellGet. You will find information about how to contribute to PowerShellGet in the readme.md file that is in the root of the repo. This project currently follows the model used by OneGet for handling ...

PowerShell Security at DerbyCon
Sep 27, 2016
Post comments count 0
Post likes count 0

PowerShell Security at DerbyCon

PowerShell Team
PowerShell Team

Many people have commented over the past couple of years that they’d love to see a PowerShell Security conference. Well, that conference arrived: DerbyCon 2016. DerbyCon is an incredible security conference, held in Louisville Kentucky each year. Despite the calibre of all that attend, the humbleness and approachability of everyone there is outstanding. Perhaps to a fault. It’s only after talking to somebody and looking them up on Twitter do you realize it’s THAT person, and openly wonder if asking for an autograph would have been too awkward. It’s probably best to stop talking about how great of a conference i...

DSC Resource Kit September Release
Sep 21, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit September Release

Katie Keim [MSFT]
Katie Keim [MSFT]

We just released the DSC Resource Kit! Since our last release on August 10, we have added 2 brand new modules from the community: Thanks Brian and Daniel for all your hard work! This release includes updates to 14 DSC resource modules, including 15 new DSC resources. In these past 6 weeks, 94 pull requests have been merged and 81 issues have been closed, all thanks to our amazing community! The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Re...

PowerShell DSC and implicit remoting broken in KB3176934
Aug 23, 2016
Post comments count 0
Post likes count 0

PowerShell DSC and implicit remoting broken in KB3176934

PowerShell Team
PowerShell Team

On August 23, Windows update KB3176934 released for Windows Client. Due to a missing .MOF file in the build package, the update breaks DSC. All DSC operations will result in an “Invalid Property” error. In addition, due to a missing binary in the build package the update breaks PowerShell implicit remoting. Implicit remoting is a PowerShell feature where PowerShell commands work on a remote session instead of locally. Specifically, importing a remote session no longer works: $remoteSession = New-PSSession -Cn TargetComputer Import-PSSession -Session $remoteSession Import-PSSession : Could not load type 'System.M...

PowerShell on Linux and Open Source!
Aug 18, 2016
Post comments count 0
Post likes count 0

PowerShell on Linux and Open Source!

PowerShell Team
PowerShell Team

Since its inception in 2002 PowerShell has been deeply influenced and improved by the passion and needs of our community. As an example, 80 contributors filed bugs and issues on the “alpha” release. Since that time we, together, have built a strong PowerShell community that supports each other, provides Summits and Conferences and gives great feedback to the product team at Microsoft. Satya’s new leadership and customer-focused mindset has encouraged and empowered us to do even more with our community. Last year we started a number of successful community initiatives, such as the PowerShell Home Page, the PowerS...

Windows PowerShell is now “PowerShell”: An Open Source Project with Linux support – How did we do it?
Aug 17, 2016
Post comments count 0
Post likes count 0

Windows PowerShell is now “PowerShell”: An Open Source Project with Linux support – How did we do it?

PowerShell Team
PowerShell Team

Hello everyone, My name is Angel Calvo, I am Microsoft’s Group Software Engineering Manager for PowerShell and Desired State Configuration (DSC). I'd like to take this opportunity to proudly represent the engineering team behind this project, and share a few thoughts about yesterday’s historic announcement for PowerShell and our Community I am so excited about the availability of PowerShell on Linux and as an open source project!  https://GitHub.com/PowerShell/PowerShell -- I can’t think of a better way to celebrate the 10th year anniversary of PowerShell than by enabling everyone on the planet to help innovate...

DSC Resource Kit August Release
Aug 10, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit August Release

Katie Keim [MSFT]
Katie Keim [MSFT]

The DSC Resource Kit has been released! This release includes 14 updated DSC resource modules and 10 new DSC resources. Since the last release on June 29, there have been 126 merged pull requests and 41 closed issues. The modules updated in this release are: For a detailed list of the resource modules and fixes in this release, see the Included in this Release section below. This release includes our second high quality resource module, WebAdministrationDsc. This is a partial, high quality version of xWebAdministration. It currently includes three high quality reso...

DSC Resource Kit Community Call August 3
Jul 29, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit Community Call August 3

Katie Keim [MSFT]
Katie Keim [MSFT]

We will be hosting a community call for the DSC Resource Kit 1-2PM on Wednesday, August 3 (PDT). Call in to ask questions or give feedback about the DSC Resource Kit! How to Join Skype for Business Join Skype Meeting This is an online meeting for Skype for Business, the professional meetings and communications app formerly known as Lync. Phone +14257063500 (USA - Redmond Campus) English (United States) +18883203585 (USA - Redmond Campus) English (United States) Find a local number Conference ID: 88745041 Forgot your dial-in PIN? | Help Agenda The community call agenda is posted on GitHub here.

Announcing Windows Management Framework (WMF) 5.1 Preview
Jul 16, 2016
Post comments count 0
Post likes count 0

Announcing Windows Management Framework (WMF) 5.1 Preview

PowerShell Team
PowerShell Team

Update 08/08/2016: Removed the note on container support. That is not part of WMF, as it installs on older versions of Server. Today we are pleased to announce that the Windows Management Framework (WMF) 5.1 Preview release is now available on the Download Center. WMF provides users with the ability to update previous releases of Windows Server and Windows Client to the management platform elements released in the most current version of Windows. This enables a consistent management platform to be used across the organization, and eases adoption of the latest Windows release. WMF 5.1 Preview includes the Power...

DSC Resource Kit June Release
Jun 29, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit June Release

PowerShell Team
PowerShell Team

The June release of the DSC Resouce Kit is out! This release includes 12 updated DSC resource modules and 20 new DSC resources. Since the last release on May 18, there have been 106 merged pull requests and 42 closed issues. The modules updated in this release are: We also have our first ever community call for the DSC Resource Kit tomorrow 1-3PM PT! Join us to ask questions and give feedback about your experience with the DSC Resource Kit. You can read more about the call in the blog post here. For a detailed list of what resources and fixes ha...

DSC Resource Kit Community Call
Jun 27, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit Community Call

Katie Keim [MSFT]
Katie Keim [MSFT]

We will be hosting a community call for the DSC Resource Kit 1-3PM on Thursday, June 30 (Pacific Time). Call in to ask questions or give feedback about the DSC Resource Kit! For this call, we will be focusing on the DSC Resource Kit overall as well as the new plans for experimental High Quality Resource Modules (HQRMs). Comments, questions, and feedback about the call can be submitted on GitHub in the PowerShell/DSCResources repository under issue #146. How to Join You can access the call through Skype or by phone: Join online meeting Join by Phone +14257063500 (USA - Redmond Campus) English (United States)...

Azure DSC Extension versions 2.4 up to 2.13 will retire in August
May 24, 2016
Post comments count 0
Post likes count 0

Azure DSC Extension versions 2.4 up to 2.13 will retire in August

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. In August, we will remove Azure DSC Extension versions 2.4 up to 2.13. These versions use WMF 5.0 PP whose signing certificates will expire in August. These versions will continue to run on existing VMs, but you will no longer be able to install them on new VMs. Now would be a good time to start thinking about upgrading to one of the latest versions which installs WMF 5.0 RTM. If you are using Azure Powershell SDK cmdlets, you can use the -Version parameter. If you are using ARM template, update the '...

End of Support for Windows Management Framework (WMF) 5.0 Production Preview is Approaching, Upgrade to RTM bits!
May 23, 2016
Post comments count 0
Post likes count 0

End of Support for Windows Management Framework (WMF) 5.0 Production Preview is Approaching, Upgrade to RTM bits!

PowerShell Team
PowerShell Team

On 1st June 2016, support for the WMF 5.0 Production Preview, released back in August 2015, will end and it’s time to upgrade to the WMF 5.0 RTM. We would like to give a huge THANK YOU to all of you who used the WMF 5.0 Production Preview and provided us with feedback. Your input and feedback helped contribute to make WMF 5.0 RTM even better. The end of support for the Production Preview means that starting 6/1, Thank you, Windows PowerShell Team

New Policy Cmdlets for Nano Server
May 20, 2016
Post comments count 0
Post likes count 0

New Policy Cmdlets for Nano Server

PowerShell Team
PowerShell Team

We have just released another set of new cmdlets intended for use on Nano Server for managing local policy. Although Nano Server doesn't support Group Policy, it does support local policy. Previously, we released Security cmdlets to deal with .INF and .CSV files. Today, we released the GPRegistryPolicy cmdlets which will deal with .POL files containing registry policy settings. .POL files can be generated from GPO Backups, or they can be generated with . POL files will have either Local Machine or Local User registry keys, which must be specified to the and cmdlets. For Nano Server, all relevant settings wil...

DSC Resource Kit – Anniversary Release
May 18, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit – Anniversary Release

PowerShell Team
PowerShell Team

We've just updated the DSC Resource Kit to celebrate our 1 year open-source anniversary! The DSC Resource Kit has come a long way in a year. Originally, DSC started with only in-box resources. To make these resources easier to update, some were moved to TechNet's Script Center and became the DSC Resource Kit. Finally in April 2015, the DSC Resource Kit was open-sourced to the community on GitHub with all modules available to download in the PowerShell Gallery. Now, the DSC Resource Kit has passed it's first anniversary as open-source, and what a year it's been! We now have 302 DSC Resources across 52 modules!...

New Security Cmdlets in Nano Server
May 9, 2016
Post comments count 0
Post likes count 0

New Security Cmdlets in Nano Server

PowerShell Team
PowerShell Team

In Windows Server 2016 TP5, we included two new cmdlets to help manage security policy settings. While they are present on every install option of Windows Server, these are mostly useful on Nano Server because Nano Server does not support Group Policy. Security-related settings include two different kinds of artifacts. • .INF files containing security policy template settings. These are handled by the "securityCmdlets"(*) module that ships in Technical Preview 5 • .CSV files containing advanced audit settings. these are handled by the "securityCmdlets"(*) module that ships in Technical Preview ...

Understanding the PowerShell UserVoice
May 9, 2016
Post comments count 0
Post likes count 0

Understanding the PowerShell UserVoice

Zachary Alexander
Zachary Alexander

The PowerShell Team been using UserVoice to take in requests, feedback and bug reports for a few months now.  It’s been really great seeing feedback come in directly from the PowerShell community. I wanted to give some details around how your feedback gets used and what happens to something after it gets posted to UserVoice. We recently added some status definitions to our UserVoice forum. I’m going to walk through UserVoice to show how we do things, and give more detail on what those definitions actually mean in practice. Suppose I want to share my deepest desire - an open source version of the Archive module....

Developing PowerShell Cmdlets for Nano Server using the PowerShell Core SDK
May 4, 2016
Post comments count 0
Post likes count 0

Developing PowerShell Cmdlets for Nano Server using the PowerShell Core SDK

PowerShell Team
PowerShell Team

Looking to develop PowerShell cmdlets for Nano Server? Try out our new PowerShell SDK for Nano on the PowerShell Gallery. Or, if you already have Windows 10 or Windows Management Framework 5.0 installed, simply run: If you've been watching the Server & Cloud Blog, you'll know that we recently announced the availability of Technical Preview 5 of Windows Server 2016. And if you've also been following the Windows Server Blog, you will have noticed that last week marked the latest installment of the "10 Reasons You'll Love Windows Server" series. Not surprisingly, in Jeffrey's Top Ten for Windows Server 2016 ...

The Archive module is now open-source
Apr 25, 2016
Post comments count 0
Post likes count 0

The Archive module is now open-source

Joey Aiello
Joey Aiello

Over the past year, the PowerShell Team has released and developed a ton of open-source code. Many of our open-source projects started and have grown out in the open, like our DSC resources, PowerShell Script Analyzer, PowerShell Editor Services, and the PowerShell VS Code plugin. Others are existing open-source projects where we've started to contribute new code like OpenSSH, Pester, or PSReadline. However, until now, we have not open-sourced any core components of PowerShell that originally started as closed-source. Today, we're proud to announce that Microsoft.PowerShell.Archive, a module that shipped as...

View File Content Feature is Available on the Gallery
Apr 21, 2016
Post comments count 0
Post likes count 0

View File Content Feature is Available on the Gallery

Yuting Chen
Yuting Chen

We are excited to let you know that you can now view files and their contents directly from the PowerShellGallery! We have received a lot of feedback that you want to see the file contents in the items and scripts before downloading them, so we enabled browsing item content on the Gallery. This feature includes two parts: listing the files within the item, and displaying file contents for supported file types. Currently we support displaying the contents of the following file extensions: .ps1, .psm1, .psd1, .ps1xml, .xml and .txt.   Listing the Files in the Item/Script On the item details page you can f...

AWS DSC Toolkit
Apr 20, 2016
Post comments count 0
Post likes count 0

AWS DSC Toolkit

PowerShell Team
PowerShell Team

We have just released a brand new module called the AWS DSC Toolkit! This module allows you to register AWS EC2 instances as DSC Nodes in Azure Automation. You can then control your EC2 instances in Azure Automation using PowerShell DSC configurations. The 4 new cmdlets provided by this module are: An example of these cmdlets is available here. This module is currently in preview. It is provided as is and is not supported through any Microsoft support program or service. Installation The AWS DSC Toolkit is available on the PowerShell Gallery. You can install it using PSGet: The source code is als...

Windows Management Framework 5.0 Updates and WMF 5.1
Apr 6, 2016
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Updates and WMF 5.1

PowerShell Team
PowerShell Team

Thanks to all of you, the Windows Management Framework (WMF) 5.0 release has been a huge success. WMF 5.0 RTM has had over 130,000 downloads in the first 5 weeks after release! We will be servicing WMF 5.0, providing fixes as necessary.  We will also continue to make small improvements to features and components as we move toward the release of Windows Server 2016 later this year.  When Windows Server 2016 ships we will release WMF 5.1, which includes all the changes and responses to your feedback that have been made since WMF 5.0 shipped. Many of these improvements are currently included in the Windows 10 Ins...

DSC Resource Kit Update
Apr 4, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit Update

PowerShell Team
PowerShell Team

We've just updated the DSC Resource Kit for April! Since our last update in February, there have been 107 merged pull requests with 49 closed issues. Thanks to our wonderful community, the DSC Resource Kit now consists of 279 resources! We have updated 21 DSC modules which include 6 new resources. The updated modules are: For a detailed list of what resources and fixes have been implemented, see the "What Has Recently Been Released?" section below. We strongly encourage you to update to the newest version of all modules using the PowerShell Gallery, and don't forge...

Bash for Windows: Why it’s awesome and what it means for PowerShell
Apr 1, 2016
Post comments count 0
Post likes count 1

Bash for Windows: Why it’s awesome and what it means for PowerShell

Joey Aiello
Joey Aiello

This week at Build, Microsoft announced that we will be enabling you to run "Bash on Ubuntu on Windows" as a developer tool for Windows 10. It will natively support Ubuntu userspace and GNU/Linux utilities, including the apt-get package manager that you can use to pull down additional tools like Ruby, emacs, etc. from Canonical's official repositories.We're really excited to run Bash on Windows 10. I'm personally a huge fan of GNU/Linux, and many members of the PowerShell team also have a strong *nix background. While working with OSS projects, there are numerous quick scenarios where it's immensely useful to dro...

Windows Management Framework (WMF) 5.0 RTM is now available via the Microsoft Update Catalog
Mar 21, 2016
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 5.0 RTM is now available via the Microsoft Update Catalog

PowerShell Team
PowerShell Team

The PowerShell Team is happy to announce the availability of WMF 5.0 RTM via the Microsoft Update Catalog, bringing the improvements delivered in WMF 5.0 to large-scale deployments. IT Administrators can now use existing tools such as Windows Server Update Services (WSUS), or System Center Configuration Manager (SCCM) to install WMF 5.0 RTM across all of the systems. You can to search for the WMF 5.0 packages in the Microsoft Update Catalog using the following KB numbers:       Important Note: Before installing the WMF 5.0 packages, please ensure: We hope that this new delivery channel will remove...

Debugging PowerShell DSC Class Resources
Mar 14, 2016
Post comments count 0
Post likes count 0

Debugging PowerShell DSC Class Resources

Paul Higinbotham [MSFT]
Paul Higinbotham [MSFT]

Update: I neglected to mention that the DSC resource debugging enabling Cmdlet, Enable-DscDebug, is available only in the Technical Preview 5 release and this was not available when this blog was first published. My sincerest apologies for that. Fortunately this release is now available at: System Center 2016 Preview and Windows Server 2016 Technical Preview 5 released   Traditionally PowerShell script debugging has been limited to script running inside the PowerShell console or ISE (Integrated Script Environment), which means you are limited to debugging script that you can see and is running in...

Package Management Preview – March 2016 for PowerShell 4 & 3 is now available
Mar 8, 2016
Post comments count 0
Post likes count 0

Package Management Preview – March 2016 for PowerShell 4 & 3 is now available

Manikyam Bavandla [MSFT]
Manikyam Bavandla [MSFT]

We’re excited to announce the availability of Package Management related PowerShell modules targeted for PowerShell 4 and PowerShell 3. The MSI based installer can be downloaded from Microsoft Download Center! This preview consists of modules PackageManagement (formerly known as OneGet) and PowerShellGet. The versions of these modules include the functionality of those that shipped with WMF 5.0 RTM. Since this preview contains only PowerShell modules, you do not need to reboot after installation. This preview installs exclusively on systems running PowerShell 4 or PowerShell 3 only. This preview will not instal...

Announcing the Underhanded PowerShell Contest
Mar 7, 2016
Post comments count 0
Post likes count 0

Announcing the Underhanded PowerShell Contest

PowerShell Team
PowerShell Team

In an effort to improve the validation capability of PowerShell Script Analyzer, we are running a series of contests. We want you - the community members - to help us identify underhanded PowerShell scripts, and then create rules to catch them. There are specific areas where Script Analyzer rules are needed and we need your skills to help us hone them. What is underhanded PowerShell code? Basically, code that is designed to do something the user would not intend, or takes actions that are not apparent to someone who would casually read the code. For example, an underhanded approach to running ‘[System.Runtime.Int...

ARM DSC Extension Settings
Feb 26, 2016
Post comments count 0
Post likes count 0

ARM DSC Extension Settings

PowerShell Team
PowerShell Team

Update for the latest information regarding DSC Extension, refer to the product documentation. .......... Overview This is the schema for the settings portion of the Azure DSC extension in an ARM template. Fast Reference Details Settings vs. ProtectedSettings All of these settings will be saved in a settings text file on your VM. Properties under 'settings' are considered public properties because they will not be encrypted in the settings text file. Properties under 'protectedSettings' will be encrypted with a certificate and will not be shown in plain text in this file on your VM. So, if your configur...

The PowerShell Gallery Is Public
Feb 25, 2016
Post comments count 0
Post likes count 0

The PowerShell Gallery Is Public

PowerShell Team
PowerShell Team

We are excited to announce that, as of today, the PowerShell Gallery has changed from Preview to Public. In July 2015, we announced and opened the PowerShell Gallery for public contributions. Since then, we have seen rapid growth in the number of modules, scripts, and users using the gallery - Thank you to those who contributed so far! We’d like to share with you some of the current gallery community stats: 1856 registered users 567 unique modules and scripts 97,400 page views per month 180,000 downloads last month 821,000 downloads total As part of this update, we added features to scan submissions using...

Windows Management Framework (WMF) 5.0 RTM packages has been republished
Feb 24, 2016
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 5.0 RTM packages has been republished

PowerShell Team
PowerShell Team

Today, we have republished the Windows Management Framework (WMF) 5.0 RTM packages for Windows Server 2012 R2, Windows Server 2012, Windows 2008 R2 SP1, Windows 8.1, and Windows 7 SP1 to Microsoft Download Center. These packages replace previously released WMF 5.0 RTM packages and WMF 5.0 Production Preview packages. Important Note: For systems running Windows 7 SP1 or Windows Server 2008 R2 SP1, you’ll need WMF 4.0 and .NET Framework 4.5 or higher installed to run WMF 5.0. We want to extend our sincere thanks to the PowerShell Community for your continued patience and support while we were addressing the PSModul...

PSScriptAnalyzer v1.4.0 release and support on PSv3.0
Feb 18, 2016
Post comments count 0
Post likes count 0

PSScriptAnalyzer v1.4.0 release and support on PSv3.0

Raghu Shantha [MSFT]
Raghu Shantha [MSFT]

Hello All. The first ScriptAnalyzer release of year 2016 added the ability to run on platforms containing PowerShell versions 3.0 and above. This means that Windows Management Framework (WMF) 5.0 is no longer a dependency to use ScriptAnalyzer. ScriptAnalyzer v1.4.0 (available in PowerShellGallery), ships with binaries compatible on systems containing PSv3.0/4.0 and PSv5.0 and loads the correct supported version. Rule functionality  automatically adapts to underlying PowerShell . For example - Rules that validate PowerShell Classes get triggered only on PSv5.0. In the latest release - v1.4.0 we have added new ...

DSC Resource Kit gets even bigger
Feb 11, 2016
Post comments count 0
Post likes count 0

DSC Resource Kit gets even bigger

Karol Kaczmarek [MSFT]
Karol Kaczmarek [MSFT]

In the last couple of weeks we’ve seen lots of activity from our contributors and collaborators across DSC repositories and are excited to announce what’s the biggest update to DSC Resource Kit yet! The total number of merged pull requests exceeded one hundred (105) and 53 issues have been closed. You will find updates in 24 DSC modules, 9 of those have new resources added (44 new resources to be exact!). Those modules are: xAdcsDeployment, xDhcpServer, xDnsServer, xNetworking, xPSDesiredStateConfiguration, xSharePoint, xSqlPs, xSqlServer and xWebAdministration. Thanks to all your hard work, after the latest re...

Azure DSC Extension Data Collection
Feb 2, 2016
Post comments count 0
Post likes count 0

Azure DSC Extension Data Collection

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Overview In order to improve the quality of the DSC Extension, the DSC Extension will start automatically sending information to Microsoft containing operational and reliability data about the DSC Extension in a future version of the DSC Extension. While we strongly encourage you to participate in improving the quality of our software, participation is voluntary, so we are adding the ability to disable it through the Azure PowerShell SDK and Azure Resource Manager (ARM) templates. We encourage you to leave this fea...

Cloud Deployment Survey
Jan 22, 2016
Post comments count 0
Post likes count 0

Cloud Deployment Survey

PowerShell Team
PowerShell Team

Occasionally, our team will run open public surveys to gather data on trends in the industry. Right now, we are running a survey on cloud deployment projects. This is a short survey for people currently thinking about, or running, deployments to public clouds. Please take a look, and share broadly! This will help us get the best data possible, so we can make the best products possible! https://www.surveymonkey.com/r/cloudDeploy

Introducing the Windows PowerShell ISE Preview
Jan 20, 2016
Post comments count 1
Post likes count 1

Introducing the Windows PowerShell ISE Preview

David Wilson [MSFT]
David Wilson [MSFT]

Today I'm pleased to share some exciting new plans that will change how we develop the PowerShell ISE so that it keeps up with the evolving needs of our users.  Those of you who saw the teaser at the end of the announcement of PowerShell for Visual Studio Code, this is the follow-up you've been patiently waiting for! Here are the details: A new preview release model for the PowerShell ISE The biggest news is that we've developed a new strategy to ship a separate preview edition of the PowerShell ISE. This enables us to add new features and release them to all of you much faster than before.  Previo...

Windows Management Framework (WMF) 4.0 Update now available for Windows Server 2012, Windows Server 2008 R2 SP1, and Windows 7 SP1
Jan 19, 2016
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 4.0 Update now available for Windows Server 2012, Windows Server 2008 R2 SP1, and Windows 7 SP1

PowerShell Team
PowerShell Team

As part of the November 2014 Update (KB3000850), we released updates to PowerShell 4.0 for Windows 8.1 and Windows Server 2012 R2. We are now pleased to make these same PowerShell 4.0 updates available for Windows Server 2012 (KB3119938), Windows Server 2008 R2 SP1 (KB3109118), and Windows 7 SP1 (KB3109118) via WMF 4.0 Update packages. At this time, these update packages are only available by request through the aforementioned links. As previously communicated, these updates substantially improve stability, diagnosability, and reliability of PowerShell Desired State Configuration (DSC) in Windows PowerShell ...

ScriptAnalyzer v1.2.0 Released
Dec 17, 2015
Post comments count 0
Post likes count 0

ScriptAnalyzer v1.2.0 Released

PowerShell Team
PowerShell Team

Improving the PowerShell feedback experience with UserVoice
Dec 14, 2015
Post comments count 0
Post likes count 0

Improving the PowerShell feedback experience with UserVoice

Joey Aiello
Joey Aiello

Since the early days of PowerShell 1.0, the PowerShell Team has been using Connect to manage customer feedback, feature requests, and bug reports, enabling us to have a continued pulse on the needs of the PowerShell community. However, in responding to your feedback, we also realize that Connect is starting to show its age and that our cloud cadence demands a feedback platform that drives rapid and direct engagement with the PowerShell Team. Starting today, we're joining the rest of Windows Server by opening the doors on the PowerShell forum within the Windows Server UserVoice. The move to UserVoice will allow u...

PowerShell Tests released on GitHub
Dec 7, 2015
Post comments count 0
Post likes count 0

PowerShell Tests released on GitHub

PowerShell Team
PowerShell Team

The PowerShell team is excited to make its first release of our test code on GitHub. This project represents a selection of tests that the PowerShell team uses when testing PowerShell. In the more than 12 years of active development on PowerShell, we have created (and continue to use) many different script based test frameworks. As part of an effort to simplify our test infrastructure, early in 2015 we started the migration process of our internal script based framework tests to the Pester (https://github.com/pester/Pester) framework; the release of this project represents the early fruits of that labor. Our plan...

Recent updates to DSC Resource Kit
Dec 4, 2015
Post comments count 0
Post likes count 0

Recent updates to DSC Resource Kit

PowerShell Team
PowerShell Team

We would like to share with you a summary of changes which happened in DSC Resource Kit over last few weeks. Since we’ve posted about the updates here last time, we’ve accepted 38 pull requests, closed 33 issues, updated 7 modules and added 4 new resources! Two resources were added to xNetworking module (xDNSConnectionSuffix and xNetConnectionProfile), one to xActiveDirectory (xADGroup), and yet another one to xCertificate module (xPfxImport). These new additions bring us to the total of 229 DSC resources! This would not be possible without the great help and support we are receiving from our commun...

PowerShell Language Design – Request for Comments
Dec 2, 2015
Post comments count 0
Post likes count 0

PowerShell Language Design – Request for Comments

Steve Lee
Steve Lee

For a while now, we've been thinking about how to better incorporate the community into the PowerShell language design process.  We believe this would improve PowerShell by:  A Request for Comments (RFC) is a type of document used broadly in the industry, in various forms, as a way to collect feedback from customers and partners.  We are adopting this concept as a way to get feedback on language design documents.  This is something that is new to us, so we are starting smal...

Announcing PowerShell language support for Visual Studio Code and more!
Nov 16, 2015
Post comments count 1
Post likes count 0

Announcing PowerShell language support for Visual Studio Code and more!

PowerShell Team
PowerShell Team

Today I am very happy to announce Developer Preview releases of two new projects that I hope will take your PowerShell development experience to the next level. Write and debug PowerShell scripts in Visual Studio Code! The first release is a new extension for Visual Studio Code which provides improved PowerShell language support including IntelliSense, code navigation, real-time script analysis, and local script debugging.  Previous releases of Visual Studio Code have provided basic PowerShell syntax highlighting support and code snippets.  This summer I started working with a PowerShell team intern,&...

Compromising Yourself with WinRM’s “AllowUnencrypted = True”
Oct 27, 2015
Post comments count 0
Post likes count 1

Compromising Yourself with WinRM’s “AllowUnencrypted = True”

PowerShell Team
PowerShell Team

One thing that’s a mixed blessing in the world of automation is how often people freely share snippets of code that you can copy and paste to make things work. Sometimes, this is a snippet of code / functionality that would have been hard or impossible to write yourself, and saves the day. Sometimes, this is a snippet that changes some configuration settings to finally make something work. For both types of code, you should really understand what’s happening before you run it. Configuration snippets are particularly important in this regard, as they permanently change the posture of the system. One disappointi...

Azure DSC Extension – Versions 1.0-2.3 no longer available
Oct 26, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension – Versions 1.0-2.3 no longer available

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Today we retired versions 1.0 to 2.3 of the Azure DSC Extension. These versions use preview versions of WMF 5.0 whose signing certificates have expired, so it is no longer possible to install them. If any of these versions are already installed on your VMs they will continue to run, but you will not be able to install them on new VMs. Our PowerShell cmdlet, Set-AzureVMDscExtension still uses version 1.* as the default; you can install a different version with the –Version parameter: Starting with the soon-to-be-rel...

DSC Resource Kit updates are here!
Oct 23, 2015
Post comments count 0
Post likes count 0

DSC Resource Kit updates are here!

Karol Kaczmarek [MSFT]
Karol Kaczmarek [MSFT]

You may be wondering what’s happening in the area of DSC Resource Kit and if that’s the case, read on. Over the last month we’ve accepted 47 pull requests, fixed 16 issues, updated 9 modules and added 5 new resources! The new resources are xExchMaintenanceMode, xExchMailboxServer, xExchTransportService and xExchEventLogLevel in the xExchange module as well as xDefaultGatewayAddress shipped as part of the  Networking module. These new additions bring us to the total of 225 DSC resources! For details about the updates and bug fixes available in the recent releases, please scroll to the &ldquo...

Azure DSC Extension 2.8 & How to map downloads of the extension dependencies to your own location.
Oct 21, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension 2.8 & How to map downloads of the extension dependencies to your own location.

Travis Plunk
Travis Plunk

NOTE: For information on OS support, and other features, please refer to our release history. Overview Today, we released version 2.8 of the Azure DSC Extension, we added support to map downloads of the extension dependencies to your own location. This could be useful, if you want to configure the network, of a VM not to allow direct access to the Internet and host these files somewhere else. This blog will show you how to use this feature in Azure Cloud Service Manager (ASM). This assumes you already know how to use the DSC Extension as described in How to use WMF 4 with Azure DSC Extension in Azure Resour...

OpenSSH for Windows Update
Oct 19, 2015
Post comments count 0
Post likes count 0

OpenSSH for Windows Update

Steve Lee
Steve Lee

Back in June, we announced our intentions to bring SSH to Windows by supporting and contributing to the OpenSSH community.  Our objective was to not only port OpenSSH so that it worked well on Windows, but to openly contribute those changes back into the portable version of OpenSSH.  Of the many options available, one clearly stood out: the previous work that NoMachine had already published in bringing OpenSSH to Windows.  The NoMachine port was based on OpenSSH 5.9, so we’ve spent the time since our initial announcement working with NoMachine to bring this port in sync with OpenSSH 7.1.&nbsp...

Package Management Preview for PowerShell 4 & 3 is now available
Oct 9, 2015
Post comments count 0
Post likes count 0

Package Management Preview for PowerShell 4 & 3 is now available

Krishna C Vutukuri [MSFT]
Krishna C Vutukuri [MSFT]

We’re excited to announce the availability of Package Management related PowerShell modules targeted for PowerShell 4 and PowerShell 3. The MSI based installer can be downloaded from Microsoft Download Center! This preview consists of modules PackageManagement (formerly known as OneGet) and PowerShellGet. The versions of these modules exactly match those that shipped with WMF 5.0 August Production Preview. Since this preview contains only PowerShell modules, you do not need to reboot after installation. This preview installs exclusively on systems running PowerShell 4 or PowerShell 3 only. This preview will...

Desired State Configuration + Puppet
Oct 6, 2015
Post comments count 0
Post likes count 0

Desired State Configuration + Puppet

PowerShell Team
PowerShell Team

Our goal with PowerShell Desired State Configuration is to make Windows easy to manage, regardless of what tool you’re using. We view DSC as a platform technology to manage Windows, and this technology can be extended with the creation of new resources as well as the reuse of PowerShell DSC functionality in different solutions. As Microsoft partners make their components configurable via DSC, their customers will be able to choose from a wide range of configuration management tools that support DSC. To that end, we are pleased to share that Puppet Labs has launched their support for PowerShell Desired Stat...

The New Home of DSC Documentation
Oct 3, 2015
Post comments count 0
Post likes count 0

The New Home of DSC Documentation

Joey Aiello
Joey Aiello

I’m pleased to announce that our official PowerShell Desired State Configuration (DSC) documentation now has a new home on MSDN. We heard your feedback loud and clear, and began working on a documentation platform that reflects our customer-focused approach to addressing that feedback with improvements to the content and structure of the DSC documentation. These changes were enabled and continue to be driven by the fact that this documentation is now available in Markdown format on GitHub via the PowerShell-Docs repository. Furthermore, we have leveraged a continuous integration and deployment system to all...

How to use WMF 4 with Azure DSC Extension in Azure Resource Manager (ARM)
Oct 2, 2015
Post comments count 0
Post likes count 0

How to use WMF 4 with Azure DSC Extension in Azure Resource Manager (ARM)

Travis Plunk
Travis Plunk

Overview In version 2.7 of the Azure DSC Extension, we added support to leave your Virtual Machine on the latest supported version of WMF 4.0. This blog will show you how to use this feature in Azure Resource Manager (ARM) templates. For this, I will use the Azure Resource Manger Tools, that were released with Azure SDK 2.6 for .NET. I will assume you already have Visual Studio 2015 setup. I also assume you have read 'How to use WMF 4 with Azure DSC Extension in Azure Cloud Service Manager (ASM)', as it describes the meaning of some of the terms. The MSDN topic 'Creating and Deploying Azure Resource Group Depl...

PowerShell DSC FAQ: Sorting Out Certificates
Oct 1, 2015
Post comments count 0
Post likes count 0

PowerShell DSC FAQ: Sorting Out Certificates

Michael Greene
Michael Greene

Today's blog post is by guest author Mr. Ashley McGlone, also known as GoateePFE. Ashley is a Microsoft Premier Field Engineer who teaches and supports PowerShell for Microsoft Premier customers. You can find more content from Ashley at his blog on TechNet. Certificates, Oh No! One of the most common questions I get regarding PowerShell Desired State Configuration is about certificates. What kind do I need? How many? Where do they go? Most people enjoy working with certificates as much as they enjoy going to the dentist. Exactly. Many of us only touch the certificate server when we have no other choice. It i...

How to use WMF 4 with Azure DSC Extension in Azure Cloud Service Manager (ASM)
Oct 1, 2015
Post comments count 0
Post likes count 0

How to use WMF 4 with Azure DSC Extension in Azure Cloud Service Manager (ASM)

Travis Plunk
Travis Plunk

Overview In version 2.7 of the Azure DSC Extension, we added support to leave your Virtual Machine on the latest supported version of WMF 4.0. This blog will show you how to use this feature in Azure Cloud Service Manager (ASM). This assumes you already know how to create a VM in the Azure PowerShell SDK. If you don't please see MSDN. We are working to add this feature into the Azure Powershell SDK DSC extension Cmdlets directly. Currently, the WMF 4 feature is only available if you form the JSON yourself and send it to the extension using the generic extension Cmdlet. In this Example I will show you: ...

Azure DSC Extension v2.7 released
Oct 1, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension v2.7 released

Travis Plunk
Travis Plunk

NOTE: For information on OS support, and other features, please refer to our release history. Summary Today, we released version 2.7 of the Azure DSC Extension, which adds support to leave your Virtual Machine on the latest supported version of WMF 4.0. We have a blog posted with examples of how to use this in Azure Cloud Service Manager (ASM) and Azure Resource Manager (ARM.) Use "Set-AzureVMDscExtension -Version 2.7" to install this version on your VM. Please feel free to reach to us posting comments to this post, or by posting feedback on Connect.

PowerShell DSC for Linux version 1.1 is Now Available! And New Linux Resources!
Sep 29, 2015
Post comments count 0
Post likes count 0

PowerShell DSC for Linux version 1.1 is Now Available! And New Linux Resources!

Kris Bash
Kris Bash

We are pleased to announce the availability of PowerShell DSC for Linux version 1.1. You can download this release here, or grab the source code here. This release implements the following new scenarios: Version 1.1 also includes all cumulative fixes in resources made to date. For more information on this release, please review the DSC for Linux v1.1. release notes. New Linux Resources The following new DSC for Linux resources are now available. These are available on the PowerShell gallery, included in the DSC for Linux download package, and available as source code. The additional modules can be distribute...

Azure DSC Extension v2.6 released
Sep 20, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension v2.6 released

PowerShell Team
PowerShell Team

// <![CDATA[ document.write("", "\n")); document.write("@font-face {\ font-family: fontawesome-mini;\ src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAzUABAAAAAAFNgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABwAAAAcZMzaOEdERUYAAAGIAAAAHQAAACAAOQAET1MvMgAAAagAAAA+AAAAYHqhde9jbWFwAAAB6AAAAFIAAAFa4azkLWN2dCAAAAI8AAAAKAAAACgFgwioZnBnbQAAAmQAAAGxAAACZVO0L6dnYXNwAAAEGAAAAAgAAAAIAAAAEGdseWYAAAQgAAAFDgAACMz7eroHaGVhZAAACTAAAAAwAAAANgWEOEloaGVhAAAJYAAAAB0AAAAkDGEGa2htdHgAAAmAAAAAEwAAADBEgAAQbG9jYQAACZQAAAAaAAAAGgsICJBtYXhwAAAJsAAAACAAAAAgASgBD25hbWUAAAnQAAACZwAABOD4no+3cG9zdAAADDgAAABsAAAAmF+yXM9wcmV...

Azure DSC Extension v2.5 released
Sep 16, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension v2.5 released

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Today we released version 2.5 as a minor update that includes additional debug information helpful to diagnose some network issues. This version of the Extension does not include any additional changes. Use "Set-AzureVMDscExtension -Version 2.5" to install this version on your VM (or you can use 2.* if you wish your VM to auto-update when a new version is released.) Please feel free to reach to us posting comments to this post, or by posting feedback on Connect.

Updated DSC Resource Kit available in the PowerShell Gallery
Sep 15, 2015
Post comments count 0
Post likes count 0

Updated DSC Resource Kit available in the PowerShell Gallery

Karol Kaczmarek [MSFT]
Karol Kaczmarek [MSFT]

We’ve been focusing on improving the quality of DSC Resource Kit during last few weeks and are glad to announce that all the fixes are now available in the newest versions of modules on the PowerShell Gallery. We’ve accepted 95 pull requests, fixed 29 issues and updated 20 modules! In addition to that, xWindowsUpdate module got a new resource - xMicrosoftUpdate – allowing to enable or disable Microsoft Update on your target nodes. For detailed list of changes, please scroll to the table at the bottom of this post. We encourage you to install the newest versions from the PowerShell Gallery and st...

PowerShell Runspace Debugging:  Part 1
Sep 8, 2015
Post comments count 0
Post likes count 0

PowerShell Runspace Debugging: Part 1

Paul Higinbotham [MSFT]
Paul Higinbotham [MSFT]

This is the fourth in a series of blogs discussing the new PowerShell 5.0 script debugging features.  These new features are available through the PowerShell 5.0 preview, which is part of the WMF (Windows Management Foundation) 5.0 preview that you can get from HERE. In my last article I talked about the Debug-Job command.  In this blog I will discuss Runspace debugging which is similar to debugging a job.  Runspace debugging is an advanced activity, but is incredibly useful in the right circumstances. A Runspace is an instance of the PowerShell engine within a process.  It defines the context in which a Po...

Azure DSC Extension v2.4 released
Sep 1, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension v2.4 released

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Today we released version 2.4 of the Azure DSC Extension, which adds support for WMF 5.0 Production Preview. This version of the Extension does not include any additional changes. Use "Set-AzureVMDscExtension -Version 2.4" to install this version on your VM (or you can use 2.* if you wish your VM to auto-update when a new version is released.) Please feel free to reach to us posting comments to this post, or by posting feedback on Connect.

Windows Management Framework 5.0 Production Preview is now available
Aug 31, 2015
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Production Preview is now available

PowerShell Team
PowerShell Team

We’re excited to announce Windows Management Framework 5.0 Production Preview, a new package introducing new and exciting management technologies, is now available for download on the Microsoft Download Center! As announced earlier, WMF 5.0 Production Preview differs from older previews of WMF 5.0 in the following ways: The following table provides an overview of all scenarios enabled by WMF 5.0 Production Preview. You can read more about these improvements, and other content in WMF 5.0 Production Preview, in the release notes (included in the download with the packages).   WMF 5.0 Productio...

Development builds for DSC Resources are available
Aug 27, 2015
Post comments count 0
Post likes count 0

Development builds for DSC Resources are available

PowerShell Team
PowerShell Team

Note: This blog post is intended to people who participate in the development of DSC Resources on GitHub. We are pleased to announce that we've made developments builds available for all DSC Resource modules on GitHub. From now on, every time Pull Request gets merged, we produce a package with latest changes and upload it on a module-specific NuGet feed. The process is fully automated which means that early adopters/contributors can install and try newest versions of modules right after they are updated! It’s worth pointing out that PowerShell Gallery is still the “Go To” place for all releas...

Azure DSC Extension 2.2 & Updates to Publish-AzureVMDscConfiguration cmdlet for ASM & ARM in Azure PowerShell SDK version 0.9.7
Aug 6, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension 2.2 & Updates to Publish-AzureVMDscConfiguration cmdlet for ASM & ARM in Azure PowerShell SDK version 0.9.7

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Today we released version 2.2 of the Azure DSC Extension to support new functionality in the Publish-AzureVMDscConfiguration cmdlet. To get the latest changes in the publish cmdlet download Azure Powershell SDK version 0.9.7 In Azure Powershell SDK version 0.9.5 we introduced new set of cmdlets for deploying the Azure DSC Extension with Azure Resource Manager (ARM). You can read more on the DSC Extension ARM cmdlets here. Changes in Publish-AzureVMDscConfiguration cmdlet In the previous blog, we talked about addi...

Windows Management Framework (WMF) 5.0 Roadmap
Aug 6, 2015
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 5.0 Roadmap

PowerShell Team
PowerShell Team

In the next few weeks (August 2015) we will be releasing a supported “Production Preview” of Windows Management Framework (WMF) 5.0. Later, in Q4 of 2015, you should be able to download the RTM version of WMF 5.0. WMF 5.0 Production Preview will differ from previous previews of WMF 5.0 in the following ways: Both of the upcoming supported versions of WMF 5.0 (Production Preview and RTM) will incorporate feedback regularly provided by our community of WMF 5.0 Preview users. Please deploy WMF 5.0 Production Preview and provide early feedback to make WMF 5.0 RTM even better. Relation between PowerS...

PowerShell Gallery – New Security Scan
Aug 6, 2015
Post comments count 0
Post likes count 0

PowerShell Gallery – New Security Scan

PowerShell Team
PowerShell Team

Quality and trust of PowerShell Gallery content have been a concern since the beginning.  These issues were somewhat addressed with peer-monitoring via the Report Abuse and Contact Support links on each module details page.  We even implemented a new cmdlet, Save-Module, which allowed users to assess a module’s contents before installing it.  However, all these scenarios put the onus on the consumer to determine if a module is safe and of high quality. To improve further, we have begun checking that all modules on the Gallery meet a basic quality bar. Starting June 26, 2015, all modules i...

What's new in DSC Resource Kit
Jul 30, 2015
Post comments count 0
Post likes count 0

What's new in DSC Resource Kit

Karol Kaczmarek [MSFT]
Karol Kaczmarek [MSFT]

It’s been another busy month and we’ve seen lots of enthusiasm from many of you to help improve the DSC Resource Kit. In only the last couple of weeks we’ve merged 90 pull requests, 8 new resources have been added to 4 modules (xDefender, xExchange, xWebAdministration, xWindowsUpdate) and another 15 resources across 13 modules were updated! That brings the total number of resources in DSC Resource Kit to 220! We are also very happy to see incoming feedback in the form of new GitHub issues and want you to know that we are looking at all of them - since our last update, 18 issues were addressed an...

Windows Management Framework (WMF) 4.0 Update is coming your way …
Jul 28, 2015
Post comments count 0
Post likes count 0

Windows Management Framework (WMF) 4.0 Update is coming your way …

PowerShell Team
PowerShell Team

Updated 05/03/2016 – On Jan 19th 2016, we had published the Windows Management Framework (WMF) 4.0 update packages for Windows Server 2012 (KB3119938), Windows Server 2008 R2 SP1 (KB3109118), and Windows 7 SP1 (KB3109118) . At this time, these update packages are only available by request through the aforementioned links. See WMF 4.0 Update blog for additional details. As part of the November 2014 Update Rollup (KB3000850) for Windows RT 8.1, Windows 8.1 and Windows Server 2012 R2, we substantially improved stability, diagnosability, and reliability of PowerShell Desired State Configuration (DSC). We also enhance...

Azure DSC Extension v2.1 released
Jul 21, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension v2.1 released

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Today we released version 2.1 of the Azure DSC Extension, with a bug fix for ARM deployments. The bug we fixed would produce this error message in some ARM deployments: “File lock (C:\Packages\Plugins\Microsoft.Powershell.DSC\1.10.1.0\bin\..\DSCWork\ExtensionHandler.Lock.dsc) exists: another instance of the extension is already running." The error would occur right after reboot. If you see this error message in your deployments we recommend upgrading to version 2.1. Please feel free to reach to us posting comment...

Welcoming the new home of PowerShell
Jul 20, 2015
Post comments count 0
Post likes count 0

Welcoming the new home of PowerShell

Joey Aiello
Joey Aiello

It's been our intent for a while now to establish a single home of PowerShell that reflects the myriad of properties we have spread across the web. Between the Gallery, our blog, Connect, our GitHub repositories, and TechNet documentation, PowerShell is in a lot of places. Today we are proud to announce the launch of the new online home of PowerShell: https://microsoft.com/powershell We've worked hard to establish a new online home for PowerShell and our first release gives users a centralized portal for official PowerShell resources, content, and documentation. The PowerShell homepage modernizes our online bra...

Introducing Azure Resource Manager cmdlets for Azure PowerShell DSC Extension
Jul 20, 2015
Post comments count 0
Post likes count 0

Introducing Azure Resource Manager cmdlets for Azure PowerShell DSC Extension

PowerShell Team
PowerShell Team

Last August we introduced Azure Service Management (ASM) cmdlets for PowerShell Desired State Configuration (DSC). Through these cmdlets released in the Azure PowerShell SDK, you can upload and apply a PowerShell DSC Configuration to an Azure VM. Now, we are introducing new set of cmdlets for deploying DSC Extension with Azure Resource Manager (ARM). You can read more on using Azure PowerShell with ARM here If you already have the Azure PowerShell SDK installed, you will need to update to version 0.9.5   Key differences in ASM and ARM cmdlets   Let’s look at each cmdlet and the ...

Validate PowerShell DSC Debug
Jul 10, 2015
Post comments count 0
Post likes count 0

Validate PowerShell DSC Debug

Michael Greene
Michael Greene

This is part five of a blog series introduced in Validate the new features of PowerShell DSC. New Capability DSC has a new debugging mode that helps with troubleshooting by making it possible to interact with scripts being run by DSC, as they are being applied. When this mode is enabled, as the machine applies the configuration, progress will stop at the first script action to wait for a remote connection to open. Once connected, the person doing the troubleshooting can interact with the session as well as use breakpoints to debug.   What is the purpose of this feature? Customers have requested ad...

Validate PowerShell DSC WaitFor
Jul 9, 2015
Post comments count 0
Post likes count 0

Validate PowerShell DSC WaitFor

Michael Greene
Michael Greene

This post is part four of a blog series introduced here: Validate the new features of PowerShell DSC. New Capability WaitFor is a new set of built-in configuration resources. Including the WaitFor resources in a configuration tells the configuration target machine that it should communicate with the Local Configuration Manager on a remote machine to verify that the remote has returned success, before the target machine continues its deployment. The WaitFor resources need to know which nodes to check, which DSC resource must complete successfully, how often to check, and how long to wait between checks. W...

Validate PowerShell DSC Partial Configurations
Jul 8, 2015
Post comments count 0
Post likes count 0

Validate PowerShell DSC Partial Configurations

Michael Greene
Michael Greene

This post is part three of a blog series introduced in Validate the new features of PowerShell DSC.   New Capability   DSC now has the ability to merge partial configurations into one configuration for management.   What is the purpose of this feature? Customers have told us that in some cases, multiple teams contribute to a configuration. It can be organizationally challenging to manage a collective configuration. Customers want to be able to allow individual teams to author the portions of the configuration for which they are responsible, and then use the DSC Local Configuration Ma...

Registration is Now Open to Publish on PowerShell Gallery
Jul 7, 2015
Post comments count 0
Post likes count 0

Registration is Now Open to Publish on PowerShell Gallery

PowerShell Team
PowerShell Team

We are excited to announce that, as of today, the PowerShell Gallery will accept registration from any users who wish to publish PowerShell modules and share their work with the world. For the past year, the PowerShell Gallery has been slowly adding content from our closest community contributors, most of whom are Most Valuable Professionals (MVPs) and internal Microsoft contributors. While we were building the basic features of the PowerShell Gallery, we restricted the set of people who could publish new modules, and required an approval step before allowing users to register. This approach provided the PowerShe...

Validate PowerShell DSC Node Status
Jul 7, 2015
Post comments count 0
Post likes count 0

Validate PowerShell DSC Node Status

Michael Greene
Michael Greene

This is part of a blog series first referenced here: Validate the new features of PowerShell DSC New Capability A new cmdlet is available named Get-DscConfigurationStatus. This cmdlet returns detailed information about the status of a node. What is the purpose of this feature? Customers have told us that they need to be able to get more information about the state of a machine that is managed using DSC. In response, we have introduced a new cmdlet that is meant to begin addressing the issue. What is the easiest way to test it? You can run just the cmdlet with no special settings for basic information, o...

Validate PowerShell DSC RunAsCredential
Jul 6, 2015
Post comments count 0
Post likes count 0

Validate PowerShell DSC RunAsCredential

Michael Greene
Michael Greene

This is the first part of a blog series originally referenced here. - Validate the new features of PowerShell DSC New Capability A new property, PSDSCRunAsCredential, is now available to specify a user credential that should be used to execute all work performed by a DSC resource. This capability is being introduced as a common property that can be used even for existing resources.   What is the purpose of this feature? PowerShell DSC by default executes in the context of the machine System account, LocalSystem. That works well for the most part but there are cases where execution needs to occu...

Validate features of PowerShell DSC
Jul 6, 2015
Post comments count 0
Post likes count 0

Validate features of PowerShell DSC

Michael Greene
Michael Greene

As many readers of the PowerShell blog already know, the next version of PowerShell is currently in preview. It is available in the Windows Management Framework 5 Preview. You can install this package on Windows 7, Server 2008 R2, or later. Your feedback is important to us! After software ships, it is harder to introduce changes. There is a risk that any change could break something for customers who are using the current codebase. If you can get feedback while in preview it is usually easier to make changes. For this reason we are asking anyone who can take a moment to validate new features and functionality, ...

Use DSC to manage WMI namespace security
Jun 29, 2015
Post comments count 0
Post likes count 0

Use DSC to manage WMI namespace security

Steve Lee
Steve Lee

Almost 6 years ago, I wrote some PowerShell scripts in a multi-part series explaining WMI namespace security and also how to manage them using PowerShell. If you're not familiar with WMI namespace security, I recommend reading the blog posts above or even as a refresher. I received some feedback fairly recently about some issues and this presented itself as an opportunity for me to revisit this topic, but rewrite it as a DSC resource using the new PowerShell Classes syntax. Since I'm using PowerShell classes, you'll need either Windows 10, Windows Server 2016 Preview, or Windows Management Framework 5.0 install...

DSC Resource Kit flourishes as open source
Jun 23, 2015
Post comments count 0
Post likes count 0

DSC Resource Kit flourishes as open source

PowerShell Team
PowerShell Team

We are excited to announce the recent updates which were made to DSC Resource Kit since open sourcing it on GitHub! We were working hard on improving coverage and robustness of DSC as well as saw incredible engagement from the community in the recent months. That effort resulted in adding 32 new DSC resources across 8 modules and fixing bugs in 22 resources across 17 modules since last release at the beginning of May! It means that we’ve achieved our next milestone of 200 resources and are now up to a total of 212 DSC resources! For those who love numbers as much as we do, here’s couple other statist...

Want to write a DSC resource where only a single instance can be configured?
Jun 22, 2015
Post comments count 0
Post likes count 0

Want to write a DSC resource where only a single instance can be configured?

Travis Plunk
Travis Plunk

I've heard from a few DSC resource authors that they need a method to implement a resource that has a single instance; a singleton. The problem they encountered is a DSC resource must define a Key property but singleton resources generally should not have a key because there is only one instance that can be updated. The problem can been seen by examining the xTimeZone and xRemoteDesktopAdmin resources. xTimeZone configures the system's current time zone and uses the time zone as the key. The problem is this would let you specify the time zone multiple times during your configuration even though there is on...

Azure DSC Extension v2.0 released
Jun 17, 2015
Post comments count 0
Post likes count 0

Azure DSC Extension v2.0 released

PowerShell Team
PowerShell Team

NOTE: For information on OS support, and other features, please refer to our release history. Today we are releasing version 2.0 of the Azure DSC Extension, with improvements for DSC configurations that reboot the VM, and fixes for ARM deployments. We are releasing this version as a major version change, instead of a minor revision, because you may need to modify your DSC configuration in order to use this release. The changes in this release might affect you if Otherwise, the Extension should have the same behavior as in previous versions and you should have no problem continuing to use the same DSC config...

PowerShell ♥ the Blue Team
Jun 9, 2015
Post comments count 0
Post likes count 3

PowerShell ♥ the Blue Team

PowerShell Team
PowerShell Team

(Warning: Long blog post ahead! If you’d like to read (or share) this as a whitepaper, you can download it here: “Scripting Security and Protection Advances in Windows 10”). At Microsoft, we invest an enormous amount of time and energy managing world-class cloud services and incredibly large enterprise networks. Security is critical for all of these – so what might surprise you is that we also invest enormous amounts of time and energy trying to break into those services. This is called Red Teaming – taking highly specialized groups of security experts and having them adopt the role of sophisticated adversaries...

Looking Forward: Microsoft Support for Secure Shell (SSH)
Jun 3, 2015
Post comments count 0
Post likes count 5

Looking Forward: Microsoft Support for Secure Shell (SSH)

PowerShell Team
PowerShell Team

[UPDATE]: Read more about our detailed plans, roadmap, and where you can play with the in-progress code here. As Microsoft has shifted towards a more customer-oriented culture, Microsoft engineers are using social networks, tech communities and direct customer feedback as an integral part on how we make decisions about future investments. A popular request the PowerShell team has received is to use Secure Shell protocol and Shell session (aka SSH) to interoperate between Windows and Linux – both Linux connecting to and managing Windows via SSH and, vice versa, Windows connecting to and managing Linux via SSH. ...

How to register a node with a DSC pull server
May 29, 2015
Post comments count 0
Post likes count 0

How to register a node with a DSC pull server

PowerShell Team
PowerShell Team

NOTE - The latest information regarding DSC Pull Service can be found in the DSC documentation using the link: https://docs.microsoft.com/en-us/powershell/dsc/pullserver .......... In PowerShell 4.0, each node in a DSC configuration identifies itself to the pull server with its ConfigurationId, a GUID. In the case of pull mode (where a node downloads the configuration from a pull server), this ConfigurationId also maps to the name of the configuration document (the MOF file) stored on the pull server (you can read more about pull vs. push modes in this blog). As the configuration document’s name is a GUID and ...

Azure PowerShell DSC Extension v1.10 released
May 15, 2015
Post comments count 0
Post likes count 0

Azure PowerShell DSC Extension v1.10 released

PowerShell Team
PowerShell Team

NOTE: You can find more information on the DSC Extension in our release history. Today we released a minor update to the Azure DSC Extension: version 1.10.1.0. This update addresses a couple of issues that were producing false error messages on some ARM deployments. Please feel free to give us your feedback as comments to this post, or using Connect: https://connect.microsoft.com/PowerShell/Feedback.

Update JEA for the April WMF 5.0 Preview
May 14, 2015
Post comments count 0
Post likes count 0

Update JEA for the April WMF 5.0 Preview

PowerShell Team
PowerShell Team

This year, at the Ignite Conference, we presented Just Enough Administration (JEA), a PowerShell toolkit for granularly managing administrator privileges.  Older versions of JEA do not work with the recently released  April WMF 5.0 Preview.  This is due to an issue with WinRM when registering a new endpoint.  The latest version (0.2.16.6) of JEA contains a workaround, and is available in the PowerShell Gallery.  Please install this version of the module to use JEA with the April WMF 5.0 Preview. If you are updating an existing system with JEA to the April WMF 5.0 Preview, please take the...

MSIgnite BRK4452 – Writing Windows PowerShell DSC Resources and Configurations
May 11, 2015
Post comments count 0
Post likes count 0

MSIgnite BRK4452 – Writing Windows PowerShell DSC Resources and Configurations

PowerShell Team
PowerShell Team

Recordings of  MS Ignite 2015 session BRK4452: Writing Windows PowerShell DSC Resources and Configurations are now available online. As mentioned in the session you can download the demo modules using the following code:    Find-Module -Tag BRK4452 -OutVariable Modules  $Modules | % {Install-Module -Name $_.Name -Verbose -Force}     Happy Scripting !!!   Narayanan Lakshmanan Principal Software Engineering Manager Windows PowerShell Team    

PowerShell DSC for Linux is now available!
May 5, 2015
Post comments count 0
Post likes count 0

PowerShell DSC for Linux is now available!

Kris Bash
Kris Bash

We are pleased to announce that PowerShell Desired State Configuration for Linux (version 1) is available for download. You can now use the powerful Desired State Configuration (DSC) platform to manage the configuration ofboth Windows and Linux workloads with a familiar PowerShell interface. Bringing DSC to Linux is another step in Microsoft’s broader commitment to common management of heterogeneous assets in your datacenter or the public cloud. After reviewing the Getting Started guide, you can get DSC for Linux (rpm/deb packages) here; DSC depends on OMI server 1.0.8-1, which is available (rpm/deb package...

Desired State Configuration Resources for PackageManagement Providers
May 5, 2015
Post comments count 0
Post likes count 0

Desired State Configuration Resources for PackageManagement Providers

PowerShell Team
PowerShell Team

Introduction You may have heard of, or even already used PackageManagement (aka OneGet). Recently, I was reading the OneGet blog and OneGet in GitHub, and decided to give it a try by installing the Windows Management Framework (WMF) 5.0 Preview April 2015. I found that PackageManagement provides a consistent user experience by exposing the same set of PowerShell Cmdlets for different flavors of software installation technologies, such as PowerShell modules, NuGet packages, MSI, MSU, etc. It’s indeed a unified package management framework. So I decided to write some Desired State Configuration (DSC) resource...

ScriptAnalyzer in GitHub and availability on PowerShell Gallery
Apr 29, 2015
Post comments count 0
Post likes count 0

ScriptAnalyzer in GitHub and availability on PowerShell Gallery

PowerShell Team
PowerShell Team

With the release of Windows Management Framework 5.0 April Preview, we are excited to announce that PowerShell ScriptAnalyzer development has moved to GitHub for greater collaboration & community involvement. https://github.com/PowerShell/PSScriptAnalyzer  Also, we have published v1.0 of ScriptAnalyzer to PSGallery. https://www.powershellgallery.com/packages/PSScriptAnalyzer/  Here are the significant changes in this release: 

Windows Management Framework 5.0 Preview April 2015 is now available
Apr 29, 2015
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Preview April 2015 is now available

PowerShell Team
PowerShell Team

We’re excited to announce Windows Management Framework 5.0 Preview April 2015, a new package introducing new andexciting management technologies, is now available for download on the Microsoft Download Center! This Windows Management Framework (WMF) preview includes everything from WMF 5.0 Preview February 2015 plus some new features. The following table provides an overview of the new and updated features in WMF 5.0 Preview April 2015.     You can read more about these mprovements and all the other content within WMF 5.0 Preview April 2015 in therelease notes (included in the download with the p...

Azure PowerShell DSC Extension v1.8/v1.9 released
Apr 28, 2015
Post comments count 0
Post likes count 0

Azure PowerShell DSC Extension v1.8/v1.9 released

PowerShell Team
PowerShell Team

UPDATE 04/29/2015: We found an issue during install in ARM deployments. A fix is available as v1.9. NOTE: You can find more information on the DSC Extension in our release history. Today we are releasing version 1.8 of the Azure DSC Extension, updated with the latest WMF 5.0 Preview (April 2015). With this update we are adding support for Windows Server 2008 R2 SP1. Please feel free to give it a try and give us your feedback using Connect: https://connect.microsoft.com/PowerShell/Feedback. Windows Server 2012 and 2012 R2 are also supported. Note that, as in previous versions of the Extension, the install process ...

DSC Resource Kit Moved to GitHub
Apr 27, 2015
Post comments count 0
Post likes count 0

DSC Resource Kit Moved to GitHub

Joey Aiello
Joey Aiello

We are proud to announce that the entire DSC Resource Kit has been open-sourced on GitHub. This means that we will be iterating and releasing these DSC resources quicker than ever before. It also means that we will be collaborating more openly with the community by accepting GitHub pull requests into our code.  For those of you who just want to consume the resources: we will no longer be publishing updates to the DSC Resource Kit resources on TechNet. Instead, we will publishing new updates directly to the PowerShell Gallery where they can be downloaded using PowerShellGet (which is now a...

PowerShell Tools for Visual Studio – Now Available
Apr 19, 2015
Post comments count 0
Post likes count 0

PowerShell Tools for Visual Studio – Now Available

PowerShell Team
PowerShell Team

A few days ago Jason Helmick asked Jeffery Snover on the MCP Insider Series when we’d see PowerShell in Visual Studio.  That actually wasn’t the first time the question had been asked.  Well, here’s the answer…  Today at the PowerShell Summit North America 2015, Andre Sayre gave a demo of PowerShell Tools for Visual Studio, an extension for Visual Studio that provides edit, run and debug capabilities for PowerShell scripts and modules in the Visual Studio IDE.  Over the past few months we (at Microsoft) have been working with Adam Driscoll, a Microsoft MVP who sta...

Community Feedback and Microsoft Connect
Apr 16, 2015
Post comments count 0
Post likes count 0

Community Feedback and Microsoft Connect

Joey Aiello
Joey Aiello

Community feedback is an integral part of any software development cycle. That's why we continue to release new preview versions of Windows Management Framework (WMF) 5.0: so that we can hear about and fix real-world problems before they ship with the next version of Windows. Historically, our guidance for filing bugs and feature requests, for both WMF5 and previous versions of PowerShell, has been to use our Microsoft Connect page. Our ability to pick up and address issues on Connect has varied throughout the life of PowerShell. As Microsoft has shifted towards a more customer-oriented culture, we have...

Introducing Get-AzureVMDscExtensionStatus cmdlet for Azure Powershell DSC Extension
Feb 27, 2015
Post comments count 0
Post likes count 0

Introducing Get-AzureVMDscExtensionStatus cmdlet for Azure Powershell DSC Extension

PowerShell Team
PowerShell Team

ast August we introduced PowerShell Desired State Configuration (DSC) Extension for Azure VMs. Through cmdlets released in the Azure PowerShell SDK, you can upload and apply a PowerShell DSC configuration to an Azure VM. Now, we are introducing a new cmdlet This new cmdlet retrieves the status of the DSC Extension in all the VMs deployed in a cloud service or a particular VM. It allows you to monitor the progress of the extension and the current status along with the detailed configuration logs. Once you have updated the DSC Extension to version 1.7 and the Azure Powershell to 0.8.14, you can use the  cmdl...

Invoking PowerShell DSC Resources directly
Feb 27, 2015
Post comments count 0
Post likes count 0

Invoking PowerShell DSC Resources directly

PowerShell Team
PowerShell Team

PowerShell Desired State Configuration (DSC) is a distributed Configuration Management (CM) platform which delivers a uniform way to configure Windows components.  Configuration Management tools should layer on top of DSC and components in the Windows server ecosystem should write DSC providers to ensure that customers can choose any CM tool they want and be confident that it will be able to configure every resource they use.  Just as you don’t investigate what printers a word processor supports before you buy it, you shouldn’t have to check what resources a CM tool supports before you buy ...

PowerShell Script Analyzer: Static Code analysis for Windows PowerShell scripts & modules
Feb 24, 2015
Post comments count 0
Post likes count 0

PowerShell Script Analyzer: Static Code analysis for Windows PowerShell scripts & modules

PowerShell Team
PowerShell Team

Introduction: Windows Management Framework 5.0 Preview February 2015 includes the addition of a new Windows PowerShell Module called PSScriptAnalyzer. This is a static code checker for Windows PowerShell modules and scripts and is installed in $env:ProgramFiles/WindowsPowerShell/Modules.     PSScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. PSScriptAnalyzer generates DiagnosticResults (errors and warnings) to inform users about potential code defects a...

PowerShell Script Analyzer: Static Code analysis for Windows PowerShell scripts & modules
Feb 24, 2015
Post comments count 0
Post likes count 0

PowerShell Script Analyzer: Static Code analysis for Windows PowerShell scripts & modules

PowerShell Team
PowerShell Team

  Introduction: Windows Management Framework 5.0 Preview February 2015 includes the addition of a new Windows PowerShell Module called PSScriptAnalyzer. This is a static code checker for Windows PowerShell modules and scripts and is installed in $env:ProgramFiles/WindowsPowerShell/Modules.       PSScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. PSScriptAnalyzer generates DiagnosticResults (errors and warnings) to inform users about potential code defects and...

ISE Module Browser – A new way to manage your PowerShell modules
Feb 23, 2015
Post comments count 0
Post likes count 0

ISE Module Browser – A new way to manage your PowerShell modules

PowerShell Team
PowerShell Team

[UPDATED] A newer, working version of the ISE Module Browser is now available on the PowerShell Gallery: https://www.powershellgallery.com/packages/ISEModuleBrowserAddon/   High quality reusable modules, like LEGO pieces, enable IT Pros to build automation solutions in minutes! Where can I find those high quality reusable modules? One way is to use PowerShellGet, a set of cmdlets to find, install, and publish modules through the PowerShell Gallery via the console. Today we are also going to introduce a new way of accessing and managing PowerShell modules through a graphical interface: Module Browser for...

Windows Management Framework 5.0 Preview February 2015 is now available
Feb 18, 2015
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Preview February 2015 is now available

PowerShell Team
PowerShell Team

We’re excited to announce that Windows Management Framework 5.0 Preview February 2015, a new package introducing new and exciting management technologies, is now available for download on the Microsoft Download Center! This Windows Management Framework (WMF) preview includes everything from WMF 5.0 Preview November 2014, plus some new features. The following table provides an overview of new and updated features in WMF 5.0 Preview February 2015.  You can read more about these improvements, and all the other content within WMF 5.0 Preview February 2015, in the release notes (included in the download wi...

Introducing DSC Resource Kit Wave 10
Feb 13, 2015
Post comments count 0
Post likes count 0

Introducing DSC Resource Kit Wave 10

PowerShell Team
PowerShell Team

Happy 10th anniversary to the DSC Resource Kit! Wave 10 is now available on TechNet and in the PowerShell Gallery.  We have a few new resources this month and a number of significant bug fixes made to existing resources that are critical in our march towards stability and robustness. All in all, there are 8 new DSC resources across 5 modules and bug fixes made across 10 modules. This means we're now up to a total of 180 resources, enabling declarative deployment, configuration, and management of Active Directory, Azure VMs, Certificate Services, SQL Server, disk drives, DNS, file shares, Failo...

Securely allocating GUIDs in PowerShell Desired State Configuration Pull Mode
Dec 31, 2014
Post comments count 0
Post likes count 0

Securely allocating GUIDs in PowerShell Desired State Configuration Pull Mode

PowerShell Team
PowerShell Team

Nicholas Dille recently posted a good blog on GUID management in PowerShell Desired State Configuration. In that blog, he goes through several approaches to GUID management and talks about the pros and cons of each. When you are deciding how to allocate GUIDs in DSC’s Pull Mode here are the three things you should keep in mind: When we designed this feature, we initially wanted to use the computer / SMBIOS GUID for this identifier and be done with it. However these GUIDs are not generally treated as sensitive data. They get littered in event logs everywhere, fly across the network unencrypted duri...

Another Holiday Present From the PowerShell Team – DSC Reskit Wave 9
Dec 17, 2014
Post comments count 0
Post likes count 0

Another Holiday Present From the PowerShell Team – DSC Reskit Wave 9

PowerShell Team
PowerShell Team

Here’s a holiday gift from the PowerShell team – the DSC Resource Kit wave 9. You can find it right here. This wave has something for everyone, we hope. There are 34 new DSC resources across 13 modules! We have also incorporated your feedback, and made fixes to several existing resources that address issues you have encountered. Last year we delivered the first DSC Resource Kit as a holiday gift, with 11 DSC resources. In case you are counting, we now have 172 DSC resources, enabling use of DSC for deploying and configuring Active Directory, Azure VMs, Certificate Services, SQL Server, DNS, file share...

Tower of Power – December 2014 Update
Dec 15, 2014
Post comments count 0
Post likes count 0

Tower of Power – December 2014 Update

PowerShell Team
PowerShell Team

You may remember Jeffrey posting about the "Tower of Power" in 2008: http://blogs.msdn.com/b/powershell/archive/2008/03/27/tower-of-power-part-2.aspx. For curiosity, I was just doing a little investigation on the number of PowerShell books available, and the number has grown somewhat. I did some web scraping of Amazon for anything with ‘PowerShell’ in the title, and manually attempted to remove duplicates (although kept multiple editions as their own entry).   Quite the selection!   Active Directory with PowerShell Automating Active Directory Administration with Window...

PowerShell Job Debugging
Dec 11, 2014
Post comments count 0
Post likes count 0

PowerShell Job Debugging

PowerShell Team
PowerShell Team

This is the third of a series of blogs discussing the new PowerShell 5.0 script debugging features.  These new features are available through the PowerShell 5.0 preview, which is part of the WMF (Windows Management Foundation) 5.0 preview that you can get from HERE. In my first article I talked about the script debugger Break All command.  Here I will discuss the new Debug-Job Cmdlet.  In a way the Debug-Job Cmdlet is really just a Break All command for PowerShell jobs.  Recall that jobs are PowerShell’s way to run script asynchronously.  Normally you don’t run scripts as jobs...

WMF 5.0 Preview: Defining “experimental designs” and “stable designs”
Dec 10, 2014
Post comments count 0
Post likes count 0

WMF 5.0 Preview: Defining “experimental designs” and “stable designs”

PowerShell Team
PowerShell Team

Over the recent releases of Windows Management Framework 5.0 Preview (find the latest here), we’ve distributed some new functionality and heard some wonderful feedback. As we improve on these features and as more users start to use Windows Management Framework 5.0 Preview, we feel the need to make a distinction in the functionality delivered. The distinction we expect will be most useful is “can I use this code in production?” So we’re marking different scenarios and features in our release notes as having “experimental designs” or “stable designs”. The goal of feat...

PowerShell DSC Azure Extension 1.5 is now available
Nov 20, 2014
Post comments count 0
Post likes count 0

PowerShell DSC Azure Extension 1.5 is now available

PowerShell Team
PowerShell Team

We’re excited to announce version 1.5 of the Azure DSC extension, which now supports Windows Server 2012 (in addition to Windows Server 2012 R2). Version 1.5 uses the Windows Management Framework 5.0 Preview November 2014. You can see the history for previous releases in this post.

Release history for the Azure DSC Extension
Nov 20, 2014
Post comments count 0
Post likes count 0

Release history for the Azure DSC Extension

PowerShell Team
PowerShell Team

On August 2014 we introduced the Azure Desired State Configuration (DSC) Extension, which can be used to upload and apply a DSC configuration on an Azure VM. UPDATE 3/15/2018 Going forward, the DSC Extension release history will be published in the DSC Extension documentation (only). https://docs.microsoft.com/powershell/dsc/azuredscexthistory Previous release notes (republished in documentation) below: Versions 2.4 up to 2.13 use WMF 5.0 PP whose signing certificates will expire in August. See our blog post for more information. Version 2.70 - 2.72 Versi...

PowerShell Remote Script Debugging in the ISE
Nov 19, 2014
Post comments count 0
Post likes count 0

PowerShell Remote Script Debugging in the ISE

PowerShell Team
PowerShell Team

This is the second of a series of blogs discussing the new PowerShell 5.0 script debugging features.  These new features are available through the PowerShell 5.0 preview, which is part of the WMF (Windows Management Foundation) 5.0 preview that you can get from HERE. In this blog I will discuss the new features that support remote script debugging in the PowerShell ISE (Integrated Script Environment).  Remote script debugging support was added to PowerShell 4.0 but only for the PowerShell console and not the ISE.  We have rectified this for PowerShell 5.0 and have also added the ability to open, ed...

PowerShell Break All Command
Nov 19, 2014
Post comments count 0
Post likes count 0

PowerShell Break All Command

PowerShell Team
PowerShell Team

The PowerShell team has added some new script debugging features for version 5.0.  I’ll be talking about these new features in a series of blogs starting with the new PowerShell Break All command.  PowerShell 5.0 has been released as a preview over the last few months.  While PowerShell is in preview new features are continually evolving so if you want to try them out you should ensure you have the latest preview version.  The script debugging features I’ll be discussing require the latest preview release which at this writing is the November 2014 release.  You can down load P...

Introducing: PowerShell Gallery
Nov 19, 2014
Post comments count 0
Post likes count 0

Introducing: PowerShell Gallery

PowerShell Team
PowerShell Team

PowerShellGet is an exciting new feature releasing in WMF 5.0 Preview.  With it, you can easily discover, install, update, and publish PowerShell modules to and from online repositories – simplifying the process of sharing PowerShell content. While we’ve talked about how to set up your own repository in the past, we haven’t said much about PowerShellGet’s default Gallery.  When you run Find-Module, you may have noticed that it automatically searches a “PSGallery” repository.  You may have wondered, “what exactly is this PSGallery repository?" Today, we are ...

Documenting DSC Part 2
Nov 19, 2014
Post comments count 0
Post likes count 0

Documenting DSC Part 2

PowerShell Team
PowerShell Team

In a previous post, we introduced the team of writers working on documenting DSC. (You can always contact them at DSCIX@microsoft.com.) We’ve started out by bringing the existing documentation up to date (the topics for all of the built-in resources have been brought current, for example) and transferring all or parts of most of the posts in this blog concerning DSC into the Technical Library. For your reference, here’s a table that relates the DSC blog posts to the corresponding Technical Library articles:  

Windows Management Framework 5.0 Preview November 2014 is now available
Nov 18, 2014
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Preview November 2014 is now available

PowerShell Team
PowerShell Team

We’re excited to announce Windows Management Framework 5.0 Preview November 2014, a new package publicizing new and exciting management technologies, is now available for download on Download Center! This Windows Management Framework (WMF) preview includes everything from WMF 5.0 Preview September 2014 plus some new improvements.You’ll find improvements in: You can read more about these new improvements and all the other content within WMF 5.0 Preview November 2014 in the release notes (included in the download center link with the packages).  This package installs exclusively on Windows 8...

PowerShell DSC Resource Design and Testing Checklist
Nov 18, 2014
Post comments count 0
Post likes count 0

PowerShell DSC Resource Design and Testing Checklist

PowerShell Team
PowerShell Team

DSC Resource Design and Testing Checklist   Writing Desired State Configuration Resources is not trivial and there’s many things which can go wrong. You should always spend significant amount of time testing resources you create. This task, although critical for quality, is often overlooked or performed carelessly and insufficiently. Below you can find DSC Resource Design and Testing Checklist which will help you design the resource and identify critical areas for testing. Follow it the next time you want to verify quality of your resource and check whether it adheres to DSC best practices. &#...

Documenting DSC
Nov 13, 2014
Post comments count 0
Post likes count 0

Documenting DSC

PowerShell Team
PowerShell Team

We have a new team of content developers focusing on documenting Desired State Configuration (DSC). Led by our manager Steve Kaczmarek, the team comprises Jaime Ondrusek, Corey Plett, and Eric Slesar. A little background:   Steve – I joined Microsoft in 2003 and manage the Management and Automation content development team. In addition to DSC we support management technologies like Group Policy, WSUS and WMI, as well as Core Windows PowerShell, Automation and Orchestration, and the Windows Azure Pack.  Jaime – I’m 14-year veteran of Microsoft. At one time I was a tester in Exchange, bu...

ConvertFrom-String: Example-based text parsing
Oct 31, 2014
Post comments count 1
Post likes count 0

ConvertFrom-String: Example-based text parsing

PowerShell Team
PowerShell Team

    Intro   I’m sure most of you are familiar with the powerful tools for text parsing available in PowerShell. A presentation at the PowerShell Summit a couple of weeks ago provides a good overview of these and mentions a new Powershell cmdlet, ConvertFrom-String, that was introduced in Windows Management Framework 5.0 Preview September 2014. ConvertFrom-String lets you parse a file by providing a template that contains examples of the desired output data rather than by writing a (potentially complex) script.   A Simple Example   The namesAndCities.input.txt attached to this po...

Powershell DSC ResKit Wave 8: Now with 100+ Resources!
Oct 28, 2014
Post comments count 0
Post likes count 0

Powershell DSC ResKit Wave 8: Now with 100+ Resources!

PowerShell Team
PowerShell Team

The DSC Resource Kit Wave 8 has landed! You can find it right here. This wave contains an astounding 48 resources, our largest release ever! We just went from 90 resources released via the Resource Kit to 138, a whopping 53% boost! We didn’t just creep across the 100 resources line, we blew right past it! Special thanks to everyone who has contributed, downloaded, or looked at this blog post. We can’t wait to share even more resources with you in the future! Questions, Comments? If you're looking into using PowerShell DSC, but are blocked by a lack of resources, let us know in the comments or the Tech...

Manage the PowerShell DSC Extension in the Azure Preview Portal
Oct 28, 2014
Post comments count 0
Post likes count 0

Manage the PowerShell DSC Extension in the Azure Preview Portal

PowerShell Team
PowerShell Team

UPDATE 11/21/2014: For information on OS support, and other features, please refer to our release history. If you haven’t yet started using the Azure Preview Portal and are a fan of PowerShell DSC and the Azure PowerShell DSC Extension (announced in August here), now just might be the time to start. We are pleased to announce that you can now manage the extension using the Preview Portal! Before today, you could use the Preview Portal to get information about the PowerShell DSC Extension (version, status, and status text – example below), but you couldn’t add the extension to an existing virtual machine or up...

PowerShell DSC Does Exchange!
Oct 21, 2014
Post comments count 0
Post likes count 0

PowerShell DSC Does Exchange!

PowerShell Team
PowerShell Team

One of the more complex products to deploy and configure has just been made easier with the release of the xExchange PowerShell DSC Resource Module.   Mike Hendrickson, the creator of these resources, has begun documenting how to use PowerShell DSC to deploy & configure Exchange in the article Introducing the xExchange Module for Powershell Desired State Configuration. The xExchange module is available via the DSC Resource Kit download page, and by using Install-Module (if you have WMF 5 installed).  This set of resources is in direct response to requests from customers like yourselves. If...

Heads Up: Hey, Scripting Guy! Blog Series
Oct 20, 2014
Post comments count 0
Post likes count 0

Heads Up: Hey, Scripting Guy! Blog Series

PowerShell Team
PowerShell Team

Microsoft Scripting Guy Ed Wilson here. This week, the week of Oct. 19, I begin a special series of Hey Scripting Guy blog posts where we will be talking about why upgrade to Windows PowerShell 4.0. This series will be way cool, and I have enlisted the help from various MVP's, as well as from the PowerShell team. So, what is in store for you? Here is the lineup: On Sunday I talk about the parade of features we have added to PowerShell over the various versions. The point of the article is to try and get ahead of the learning curve. On Monday PowerShell MVP Richard Siddaway talks about some of the considerations i...

Simple HTTP api for Executing PowerShell Scripts
Sep 29, 2014
Post comments count 2
Post likes count 0

Simple HTTP api for Executing PowerShell Scripts

PowerShell Team
PowerShell Team

[Based on the feedback, I've renamed this to HTTP] There may be scenarios where you don’t need the full interactive experience of PowerShell remoting over PSRP  (PowerShell Remoting Protocol), or have the need to execute some PowerShell scripts from a non-Windows system.  You could directly code against WS-Man as I’ve blogged about a long time ago, however, it’s quite complicated requiring knowledge of SOAP and WS-Man.  In cases where you want to simply invoke a PowerShell script remotely, a REST api is a good choice since all modern programming languages make it simple to perform...

Continuing the DSC Resource Kit Additions – Wave 7 is Live
Sep 26, 2014
Post comments count 0
Post likes count 0

Continuing the DSC Resource Kit Additions – Wave 7 is Live

PowerShell Team
PowerShell Team

The DSC Resource Kit Wave 7 update has been published, and is now available. You can download all of the resources from the DSC Resource Kit (All Resources) topic, and also find them by using PowerShellGet. This wave contains 4 new DSC Resources, which brings the total count of resources over 90 since last December.   In addition to the new resources, we have also made some updates to existing resources based on feedback we have received. Questions, Comments? If you're looking into using PowerShell DSC, but are blocked by a lack of resources, let us know in the comments or the TechNet QA Secti...

Secure credentials in the Azure PowerShell Desired State Configuration (DSC) extension
Sep 10, 2014
Post comments count 0
Post likes count 0

Secure credentials in the Azure PowerShell Desired State Configuration (DSC) extension

PowerShell Team
PowerShell Team

UPDATE 11/21/2014: For information on OS support, and other features, please refer to our release history. We have updated the Azure Extension Handler to v1.1! Release notes for v1.1 If you are not familiar with the Azure PowerShell DSC extension, please start from our first blogpost about it. Desired State Configuration provides a way to securely use credentials in your configuration. When we launched v1.0 of our Azure DSC extension handler, however, you were unable to use a configuration that accepted a password. In v1.1 of the DSC Azure extension, we support using PSCredential as a configuration param...

Windows Management Framework 5.0 Preview September 2014 is now available
Sep 4, 2014
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Preview September 2014 is now available

PowerShell Team
PowerShell Team

We’re excited to announce Windows Management Framework 5.0 Preview September 2014, a new package publicizing new and exciting management technologies, is now available for download on Download Center! This version of the preview includes everything in the WMF 5.0 Preview May 2014 and WMF 5.0 Experimental Release July 2014 and some new improvements and scenarios. The following is a list of all the new scenarios enabled since May 2014:   You can find more details on all of these scenarios in the Release Notes of WMF 5.0 Preview September 2014, which can be downloaded at the same link as t...

PowerShell Summit Europe 2014
Aug 27, 2014
Post comments count 0
Post likes count 0

PowerShell Summit Europe 2014

PowerShell Team
PowerShell Team

If you hadn’t already heard, we are happy to announce that the community will hold the PowerShell Summit Europe 2014 from September 29th to October 1st in Amsterdam. As demonstrated by the successful PowerShell Summit North America, there is a real need for PowerShell focused conferences that offer attendees the opportunity to make connections, learn new techniques, and dig into PowerShell internals and experiences. Jeffrey Snover (inventor of PowerShell), Lee Holmes (author of The PowerShell Cookbook), Dan Harman (Principle Program Manager on PowerShell), Jim Truher (co-designer of...

DSC Resource Kit Wave 6 Is Here
Aug 20, 2014
Post comments count 0
Post likes count 0

DSC Resource Kit Wave 6 Is Here

PowerShell Team
PowerShell Team

The DSC Resource Kit Wave 6 Is Available The DSC Resource Kit Wave 6 has been released! This wave contains 5 new DSC Resources, taking us up over 80 resources between the Resource Kit and what is shipping in Windows 8.1/Server 2012 R2. In addition to these resources we are rolling out today, you may have noticed that the SafeHarbor example was posted after the last Reskit was released. Rather than wait for Reskit Wave 6, we posted SafeHarbor early. We will do this from time to time, but you can count on these monthly Reskit announcements to roll up what has changed. In addition to the new resources, we have also ...

Introducing the Azure PowerShell DSC (Desired State Configuration) extension
Aug 7, 2014
Post comments count 0
Post likes count 0

Introducing the Azure PowerShell DSC (Desired State Configuration) extension

PowerShell Team
PowerShell Team

UPDATE 11/4/2014: For information on using PSCredential objects, please refer to this blog post. UPDATE 11/21/2014: For information on OS support, and other features, please refer to our release history. For the latest information regarding DSC Extension, refer to the product documentation. .......... Earlier this year Microsoft released the Azure VM Agent and Extensions as part of the Windows Azure Infrastructure Services. VM Extensions are software components that extend the VM functionality and simplify various VM management operations; for example, the VMAccess extension can be used to reset a VM’...

Chef with PowerShell DSC Now Public!
Jul 29, 2014
Post comments count 0
Post likes count 0

Chef with PowerShell DSC Now Public!

PowerShell Team
PowerShell Team

Many of you have seen the demos done by our friends at Chef, which show how they planned to leverage PowerShell DSC. Those plans are now public as of the publishing of the PowerShell DSC Cookbook for Chef announced in the recent blog post by Adam Edwards. Check it out here:  http://www.getchef.com/blog/2014/07/24/getting-ready-for-chef-powershell-dsc/ The Chef team has been working hard to get this together, and it’s great to see this going live!   - The PowerShell Team

Creating a Secure Environment using PowerShell Desired State Configuration
Jul 21, 2014
Post comments count 0
Post likes count 0

Creating a Secure Environment using PowerShell Desired State Configuration

PowerShell Team
PowerShell Team

Introduction: Traditionally, IT environments have secured their business critical information against external threats by adding additional layers of security to the org’s network (e.g. firewalls, DMZs, etc.).  However many of today’s attacks are coming from inside the network so a new “assume breach” approach must be adopted. In this blog, we show how to create a secure environment to run a particular application or service inside of an assume-breached network.  This substantially reduces the attack surface of the application or service by configuring a highly customized, application specific environment, by...

PowerShell DSC Resource Kit Wave 5 Arrives
Jul 17, 2014
Post comments count 0
Post likes count 0

PowerShell DSC Resource Kit Wave 5 Arrives

PowerShell Team
PowerShell Team

The PowerShell DSC Resource Kit Wave 5 is now available for your use. This wave contains 10 new DSC resources, taking us up to 77 total resources between the Resource Kits and what is shipping in Windows 8.1/Server 2012 R2. In response to a number of requests, DSC Reskit Wave 5 also includes an end-to-end example, with a configuration for WordPress deployments. Here’s a link to the updates in DSC Resource Kit Wave 5.  You can also find them by using PowerShellGet. In addition to the new resources and the example configurations, we have also made some updates to existing resources based on feedback we ...

DSC Resource Kit Wave 4 is Live!
Jun 6, 2014
Post comments count 0
Post likes count 0

DSC Resource Kit Wave 4 is Live!

PowerShell Team
PowerShell Team

The value and number of PowerShell Desired State Configuration (DSC) resources coming from Microsoft continues to grow. As of the release of DSC Resource Kit Wave 3, we were up to 50 total.   Now, we're happy to announce the DSC Resource Kit Wave 4.  This wave contains 16 new DSC resources, taking us up to 67 total resources between the Resource Kit and what is shipping in Windows 8.1/Server 2012 R2. Here’s a link to the new items in the DSC Resource Kit Wave 4.  You can also find them by using PowerShellGet.   Now, you might be thinking, "That is an awful lot of resources.  Am I ...

PowerShell: predict the future via TechEd
Jun 2, 2014
Post comments count 0
Post likes count 0

PowerShell: predict the future via TechEd

PowerShell Team
PowerShell Team

PowerShell: predict the future via TechEd Summary: Microsoft Scripting Guy Ed Wilson talks about Windows PowerShell and the future of the technology   Microsoft Scripting Guy, Ed Wilson, is here. Where ever I go, people always want to know about what is coming up next. What is our roadmap for management. Or, what is the future of PowerShell. The future of PowerShell? Dude, this one is easy. Windows PowerShell is mission critical, and is central to our management strategy. All enterprise products are adding more and more Windows PowerShell to their systems. A good way to look into the future, is to look at Te...

How to retrieve node information from DSC pull server
May 29, 2014
Post comments count 0
Post likes count 0

How to retrieve node information from DSC pull server

PowerShell Team
PowerShell Team

NOTE - The latest information regarding DSC Pull Service can be found in the DSC documentation using the link: https://docs.microsoft.com/en-us/powershell/dsc/pullserver .......... As described in “Push vs. Pull Mode” blog, DSC configuration can be applied on target nodes using pull or push mechanism.  In this blog I will talk about how to retrieve node information from DSC pull server. When the node pulls a configuration from the pull server and applies it locally, the pull can either succeed or fail. DSC compliance endpoint stores the pull operation status, configuration and node information in a database. Com...

Wish I can author DSC Resource in C#!!
May 29, 2014
Post comments count 0
Post likes count 0

Wish I can author DSC Resource in C#!!

PowerShell Team
PowerShell Team

In previous blog, we learned how one can use their PowerShell skills to author DSC resources very easily. Still there are folks (we met some at TechEd NA) who want to author their DSC resources using C# because they are more productive with it than PowerShell language. Well, you can fully leverage the power of DSC by writing your resources in C#. In this blog, we will explore how you can write a C# based DSC resource and later seamlessly consume it from your DSC Configurations. Authoring DSC resources in C# For the purpose of this blog, we will write a DSC resource named “xDemoFile”. This resource wil...

Setting up an Internal PowerShellGet Repository
May 20, 2014
Post comments count 0
Post likes count 0

Setting up an Internal PowerShellGet Repository

PowerShell Team
PowerShell Team

At TechEd, we announced and released an early version of PowerShellGet: a package manager for PowerShell modules.  The response was positive, and many people asked the same type of question:   “Can I set up my own internal repository for PowerShellGet?”   Many enterprise-oriented houses want the ability to create private module repositories (without sharing them with the world).  Many security minded folks want to curate their own module collections.   The short answer to this question is: yes!  All you need to do is create your own NuGet Server and redefine a couple of ...

Announcing Windows PowerShell Desired State Configuration for Linux
May 19, 2014
Post comments count 0
Post likes count 0

Announcing Windows PowerShell Desired State Configuration for Linux

Kris Bash
Kris Bash

For those of you fortunate enough to be at TechEd North America last week, you might have seen Jeffrey Snover announcing Windows PowerShell Desired State Configuration (DSC) for Linux!  (If you missed that session, you can watch a replay of it online).  We are excited to announce the initial availability of this feature with the release of a CTP of DSC for Linux at GitHub.com. With DSC for Linux, you can now use the same platform to concurrently manage the configuration of your Windows and Linux computers.  We are actively developing DSC for Linux and will continue to improve and extend it going forward. Bring...

Windows Management Framework 5.0 Preview May 2014 is now available
May 14, 2014
Post comments count 0
Post likes count 0

Windows Management Framework 5.0 Preview May 2014 is now available

PowerShell Team
PowerShell Team

We’re excited to announce Windows Management Framework 5.0 Preview May 2014, a new package publicizing new and exciting management technologies, is now available for download on Download Center! This version of the preview includes everything in the Windows Management Framework 5.0 Preview that was released in April of 2014 and a new module called PowerShellGet.   This new package installs exclusively on Windows 8.1 and Windows Server 2012 R2.  If WMF 5.0 Preview (April 2014) is already installed on the machine, WMF 5.0 Preview (April 2014) must be uninstalled in order to install WMF 5.0 Preview ...

Understanding Import-DscResource Keyword in Desired State Configuration
Apr 25, 2014
Post comments count 1
Post likes count 0

Understanding Import-DscResource Keyword in Desired State Configuration

PowerShell Team
PowerShell Team

Desired State Configuration resources are used to model and change the state of different components of the system. In an earlier blog post, we discussed details about deploying and discovering those resources and introduced Import-DscResource dynamic keyword. In this post, we will discuss some more details about the usage and internal working of this dynamic keyword.  This keyword is only available inside configuration block. Its syntax looks like PowerShell cmdlet but it’s not a cmdlet and behaves differently.    When authoring the DSC configuration in ISE, the PowerShell parser, pro...

Debug Mode in Desired State Configuration
Apr 22, 2014
Post comments count 0
Post likes count 0

Debug Mode in Desired State Configuration

PowerShell Team
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...

A World of Scripts at your Fingertips – Introducing Script Browser
Apr 16, 2014
Post comments count 0
Post likes count 0

A World of Scripts at your Fingertips – Introducing Script Browser

PowerShell Team
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...

Collecting the Output of Remoting Commands
Apr 16, 2014
Post comments count 0
Post likes count 0

Collecting the Output of Remoting Commands

PowerShell Team
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...

What’s in a name?  Using prefixes in PowerShell.
Apr 7, 2014
Post comments count 0
Post likes count 0

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

PowerShell Team
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 ...

Windows Management Framework V5 Preview
Apr 4, 2014
Post comments count 0
Post likes count 0

Windows Management Framework V5 Preview

PowerShell Team
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

Configuring an Azure VM using PowerShell DSC
Apr 3, 2014
Post comments count 0
Post likes count 0

Configuring an Azure VM using PowerShell DSC

PowerShell Team
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...

DSC Resource Kit Wave 3
Mar 28, 2014
Post comments count 0
Post likes count 0

DSC Resource Kit Wave 3

PowerShell Team
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...

PowerShell Summit North America
Mar 10, 2014
Post comments count 0
Post likes count 0

PowerShell Summit North America

PowerShell Team
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...

Want to Automatically Configure Your Machines Using DSC at Initial Boot-up?
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
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...

Reusing Existing Configuration Scripts in PowerShell Desired State Configuration
Feb 25, 2014
Post comments count 0
Post likes count 0

Reusing Existing Configuration Scripts in PowerShell Desired State Configuration

PowerShell Team
PowerShell Team

You are an expert in PowerShell DSC (or maybe not an expert, just someone playing around with configurations in DSC) and have already written fairly large and complex configurations for configuring your environment/data center. Everything is working well and you are a great fan of DSC. There’s only one problem: your work is complicated. Before long, you have a configuration that is hundreds or thousands of lines long – people from many different teams are editing it. Finding and fixing problems becomes nearly impossible… your configuration is just too unwieldy. Then comes a day when there arises a need to add...

Configuring a SQL High Availability Group with DSC
Feb 13, 2014
Post comments count 0
Post likes count 0

Configuring a SQL High Availability Group with DSC

PowerShell Team
PowerShell Team

Let's use DSC to configure something complicated!  In past blogs, we’ve shown you how to use Windows PowerShell Desired State Configuration (DSC) to configure relatively simple systems.  However, the technologies you deal with on a day to day basis can sometimes become complicated.  Don’t worry, DSC can still help simplify configuration.  Let’s use SQL AlwaysOn Availability Group (AG) as a example. SQL AG is a new SQL feature that enables replication on top of Windows Server Failover Clustering. While the feature is cool, configuring the environment is quite complex. It involves many steps across multiple machi...

DSC Diagnostics Module– Analyze DSC Logs instantly now!
Feb 11, 2014
Post comments count 0
Post likes count 0

DSC Diagnostics Module– Analyze DSC Logs instantly now!

PowerShell Team
PowerShell Team

Have you ever witnessed a DSC Configuration run where you had no idea about what it might have done behind the scenes? Well, then your worries end here! During any DSC Operation, the DSC engine writes into windows event logs, which are like bread crumbs that the engine leaves along the way during any execution. If you read the blog here about DSC troubleshooting, you could learn how to use the Get-WinEvent cmdlet to debug a DSC failure using event logs. However, something that really simplifies life is the new module that has been published in Wave 2 of the DSC Resource Kit , called xDscDiagnostics. Introducti...

Need more DSC Resources?  Announcing DSC Resource Kit Wave 2
Feb 7, 2014
Post comments count 0
Post likes count 0

Need more DSC Resources? Announcing DSC Resource Kit Wave 2

PowerShell Team
PowerShell Team

Good news everyone! Starting today, you can use Windows PowerShell Desired State Configuration (DSC) to configure Active Directory and SQL Server (including High Availability Groups). We are pleased to release the next wave of the DSC Resource Kit – one that enables you to start using DSC to solve your real world problems and scenarios. When we shipped DSC in Windows Server 2012 R2, we shipped a platform with great infrastructure for configuration.  The next step for any platform like DSC is the creation of resources to make it immediately usable in significant real world scenarios.  With the resources we ship...

How to enable Updatable Help for your PowerShell Module
Feb 4, 2014
Post comments count 0
Post likes count 0

How to enable Updatable Help for your PowerShell Module

PowerShell Team
PowerShell Team

PowerShell 3.0 lets the user update Help content on a per module basis. In this article, I will explain how you can enable this for your own PowerShell module. Prerequisites: Have a new (script/binary) module, help content for the cmdlets of the module, and a server where the help content is located. For this particular exercise I will be using a script module. Here is how my module is organized: C:\Users\frangom\Documents\WindowsPowerShell\modules\TestModule\TestModule.psm1 C:\Users\frangom\Documents\WindowsPowerShell\modules\TestModule\TestModule.psd1 TestModule.psm1 is my script module. There, I defined...

Want to secure credentials in Windows PowerShell Desired State Configuration?
Jan 31, 2014
Post comments count 0
Post likes count 0

Want to secure credentials in Windows PowerShell Desired State Configuration?

PowerShell Team
PowerShell Team

As you start using Windows PowerShell Desired State Configuration (DSC), you might need to specify credentials for resources. In a previous post we showed you how to define a resource that has a credential property.  In this post, I’ll discuss how to properly encrypt credentials when used in a DSC configuration. Prerequisites First, let us discuss the requirements to encrypt a DSC configuration. o   It is important that you keep the private key secure.  Since the public key is all that is needed to encrypt, I recommend you only export the public key to the machine you are writing your configu...

Separating “What” from “Where” in PowerShell DSC
Jan 9, 2014
Post comments count 0
Post likes count 0

Separating “What” from “Where” in PowerShell DSC

PowerShell Team
PowerShell Team

As you already know we introduced PowerShell Desired State Configuration to the world at our TechEd NA 2013 Session. The session also introduced the notion of structural configuration (what) and environmental configuration (where) (at the 25:50 min mark). Structural configuration defines what is needed and does not change based on the environment. For instance, a configuration can require IIS to be installed – whether we have one node, or many nodes, whether it is a development environment or a production environment. It does not matter - we need IIS installed. Environmental configuration defines the environmen...

Using Event Logs to Diagnose Errors in Desired State Configuration
Jan 3, 2014
Post comments count 1
Post likes count 1

Using Event Logs to Diagnose Errors in Desired State Configuration

PowerShell Team
PowerShell Team

Windows PowerShell Desired State Configuration (DSC), just like any other Windows software, records errors and events in logs that can be viewed from the Event Viewer. However, the trick lies in effectively parsing these logs, so we know exactly why a particular operation failed. In this blog, we explain where the DSC event logs are, and how their content is structured. We also discuss how we can use DSC events for diagnosing failures, and how we can play with the events to gather maximum information from a single DSC operation. We use the term “DSC operation” to identify a single operation that DSC performs f...

Holiday Gift – Desired State Configuration (DSC) Resource Kit Wave-1
Dec 26, 2013
Post comments count 0
Post likes count 0

Holiday Gift – Desired State Configuration (DSC) Resource Kit Wave-1

PowerShell Team
PowerShell Team

Continuing with the tradition of holiday gifts to the PowerShell community, the PowerShell team has just released DSC Resource Kit Wave-1 - a set of PowerShell modules that contain DSC resources and example configurations. The various modules that are part of DSC Resource Kit Wave 1 can be found here. When DSC was introduced in PowerShell v4, we shipped a set of built-in resources. However one of the important features of DSC is the ability to create custom resources in PowerShell. Our previous blog posts detail how to author resources and how to deploy resources. In order to encourage the community to create ...

Automatically resuming Windows PowerShell Workflow jobs at logon
Dec 23, 2013
Post comments count 0
Post likes count 0

Automatically resuming Windows PowerShell Workflow jobs at logon

PowerShell Team
PowerShell Team

PowerShell Workflow helps IT Pros automate the long running tasks, or workflows, that can affect multiple managed computers or devices at the same time. Windows PowerShell Workflow is designed to be robust and recoverable. The features that are built into Windows PowerShell allow you to restart the target computers and, if the workflow is not yet complete, to reconnect to the target computers automatically and continue with the workflow commands. You can even restart the computer that is running a workflow, which allows you to run the workflow on the local computer, or include the local computer in the list of ...

Windows PowerShell Script Workflow Debugging
Dec 19, 2013
Post comments count 0
Post likes count 0

Windows PowerShell Script Workflow Debugging

PowerShell Team
PowerShell Team

Script workflow debugging support is one of two major script debugging enhancements added in Windows PowerShell 4.0. The other new feature is script debugging in remote sessions, which is described in “Windows PowerShell Remote Debugging”. We introduced script workflow in Windows PowerShell 3.0. These are workflows written in the Windows PowerShell language that are compiled into XAML and then run in Windows Workflow Foundation. There is a subset of Windows PowerShell cmdlets that can be called inside a workflow and are executed as special Windows PowerShell workflow activities when the workflow runs. For a ni...

Windows PowerShell Remote Debugging
Dec 19, 2013
Post comments count 0
Post likes count 0

Windows PowerShell Remote Debugging

PowerShell Team
PowerShell Team

Windows PowerShell 4.0 includes two major enhancements to the script debugger. First, script debugging now works in remote sessions. Second, we’ve added debugging support for workflow scripts. This blog article describes the new remote debugging support and a following article will describe the new workflow script debugging. Remote Script Debugging in Windows PowerShell Previously, script debugging in Windows PowerShell was limited to scripts running on the local machine. If you tried to set script breakpoints in a remote session it caused an error. Now, in Windows PowerShell 4.0, you can set breakpoints in rem...

PowerShell Security Best Practices
Dec 16, 2013
Post comments count 0
Post likes count 0

PowerShell Security Best Practices

PowerShell Team
PowerShell Team

We get a lot of questions about PowerShell Security Best Practices, and we got the chance to present an overview of them at this year’s (Microsoft internal) BlueHat conference. This was a 20-minute presentation, and focused on two parts:   The video was recorded, and is available here: https://channel9.msdn.com/Events/Blue-Hat-Security-Briefings/BlueHat-Security-Briefings-Fall-2013-Sessions/PowerShell-Best-Practices. Below is a link to the presentation deck, with very detailed speaker notes: PowerShell Security Best Practices.pptx Lee Holmes [MSFT] Windows PowerShell Development

Understanding Meta Configuration in Windows PowerShell Desired State Configuration
Dec 9, 2013
Post comments count 0
Post likes count 0

Understanding Meta Configuration in Windows PowerShell Desired State Configuration

PowerShell Team
PowerShell Team

UPDATE 2/6/2018 - The latest information regarding LCM configuration is available in the documentation at the following link: https://docs.microsoft.com/en-us/powershell/dsc/metaconfig .......... LCM and Meta Configuration To understand the concept of Meta Configuration, first we need to know what Local Configuration Manager (LCM) is, and what its responsibilities are. In short, LCM is the engine of Windows PowerShell Desired State Configuration (DSC), and it runs on every target node. Whenever we send the DSC configuration document to a node, it’s LCM’s job to parse it and call appropriate resources which ...

How to Deploy and Discover Windows PowerShell Desired State Configuration Resources
Dec 5, 2013
Post comments count 0
Post likes count 0

How to Deploy and Discover Windows PowerShell Desired State Configuration Resources

PowerShell Team
PowerShell Team

A Windows PowerShell Desired State Configuration (DSC) resource contains a module file (*.psm1), an optional data file (*.psd1),and a *.schema.mof file. Details about what each of those files should look like, and how you can create those files using a DSC Resource Designer Tool, are discussed in an earlier blog post.  In this blog post, we will explore the following. Deploying DSC resources to the local computer All DSC resources should be deployed in the following folder hierarchy:-             $env: psmodulepath (folder)     &...

Push and Pull Configuration Modes
Nov 26, 2013
Post comments count 0
Post likes count 0

Push and Pull Configuration Modes

PowerShell Team
PowerShell Team

// bw + bsl && x + aw - ah / 2 - cw >= bsl ) { c.style.left = x + aw - ah / 2 - cw; } else { c.style.left = x + ah / 2; } if (y + ch + ah / 2 > bh + bst && y + ah / 2 - ch >= bst ) { c.style.top = y + ah / 2 - ch; } else { c.style.top = y + ah / 2; } c.style.visibility = "visible"; } } } function msoCommentHide(com_id) { if(msoBrowserCheck()) { c = document.all(com_id); if (null != c && null == c.length) { c.style.visibility = "hidden"; c.style.left = -1000; c.style.top = -1000; } } } function msoBrowserCheck() { ms = navigator.appVersion.indexOf("MSIE"); ...

PowerShell DSC Resource for configuring Pull Server environment
Nov 21, 2013
Post comments count 0
Post likes count 0

PowerShell DSC Resource for configuring Pull Server environment

PowerShell Team
PowerShell Team

UPDATE 2/6/2018 - The latest information regarding DSC Pull Service can be found in the DSC documentation using the link - https://docs.microsoft.com/en-us/powershell/dsc/pullserver .......... DSC is a PowerShell extension that is part of Windows Server 2012 R2 and Windows 8.1. DSC enables deploying and managing configuration data for software services and managing the environment in which these services run. A DSC Pull Server is a web-based endpoint, with an OData interface. This server allows nodes to “Pull” Configuration such as providers on a periodic basis. This functionality is useful in environ...

Resource Designer Tool – A walkthrough writing a DSC resource
Nov 19, 2013
Post comments count 0
Post likes count 0

Resource Designer Tool – A walkthrough writing a DSC resource

PowerShell Team
PowerShell Team

At the heart of Windows PowerShell Desired State Configuration are the resources. It is the resources which act behind the scenes for DSC to achieve its “make it so” philosophy. DSC ships with a number of resources in-box and you can take a look here for the complete list. However, once you get started with DSC, you may want to write your own resources (which are PowerShell modules) for your particular use case. This post will walk you through creating a custom DSC resource. You can take a look here to get an understanding of the schema/packaging of DSC resources. Attached with this post is the Resource Designer ...

Hungry for more Windows PowerShell Desired State Configuration Resources?
Nov 15, 2013
Post comments count 0
Post likes count 0

Hungry for more Windows PowerShell Desired State Configuration Resources?

PowerShell Team
PowerShell Team

Now that you understand the value and need of Windows PowerShell Desired State Configuration (DSC), and how to declaratively express the intent of machine configuration via the new configuration keyword, you might be wondering how the configuration happens. Configuration on a machine works because of DSC resources. Windows Server 2012 R2 and Windows Management Framework (WMF) 4.0 come with 12 built-in resources, but that’s not all. Like command extensibility of PowerShell, DSC resources are also extensible–you can create new DSC resources to fill the gap. This blog will walk you through the mechanics ...

Understanding CONFIGURATION keyword in Desired State Configuration
Nov 5, 2013
Post comments count 0
Post likes count 0

Understanding CONFIGURATION keyword in Desired State Configuration

PowerShell Team
PowerShell Team

Desired State Configuration is a new management platform in Windows Powershell that enables devOps scenarios on Windows. It enables system administrators and devOps to configure a system declaratively, enforce the configuration and reuse configuration. One core aspect of it is the language extension for Configuration keyword in Powershell. You can express configurations of your machine using configuration keyword as shown below which is taken from the MSDN documentation Configuration MyWebConfig {    # A Configuration block can have zero or more Node blocks    Node "Server001"    { ...

Seeking Input on PowerShell Summit Sessions
Nov 5, 2013
Post comments count 0
Post likes count 0

Seeking Input on PowerShell Summit Sessions

PowerShell Team
PowerShell Team

One of the best things about PowerShell is its strong community.  Events like the annual PowerShell Summit are a great way to get involved and learn more about PowerShell. As in the past, the PowerShell team will present several sessions at the PowerShell Summit.  This year, we want to get your input on the sessions that we will present. Here is a list of sessions under consideration so far: Which ones catch your interest?  Are there any that we’re missing?  Let us know in the comments. For more information about the Summit: http://powershell.org/wp/community-events/summit/ Th...

Configuration in a DevOps world – Windows PowerShell Desired State Configuration
Nov 1, 2013
Post comments count 0
Post likes count 0

Configuration in a DevOps world – Windows PowerShell Desired State Configuration

PowerShell Team
PowerShell Team

Some background A new breed of configuration management tools has been created to manage the platforms, applications, and infrastructure of the cloud, and keep the cloud running with high availability. The need for these new tools and infrastructure comes from the increase in scale, rapid rate of change, and complexity of the cloud. But existing tools have limited support for Windows. Windows PowerShell Desired State Configuration (DSC) provides a configuration platform built into Windows that is based on open standards. DSC is flexible enough to function reliably and consistently in each stage of t...

PaaP: Windows PowerShell as a Platform – Part 2
Oct 31, 2013
Post comments count 0
Post likes count 0

PaaP: Windows PowerShell as a Platform – Part 2

PowerShell Team
PowerShell Team

In the previous post for this series, we saw how System.Management.Automation.PowerShell class can be used to run PowerShell commands in a C# application. In all those cases, the runspace that we used was created in a default manner. In this post, we'll look at ways to customize the runspace that we create to execute the commands. Why do we need to customize the runspace? For example, there could be scenarios where you don’t want the user to be able to run a particular command that could change the state of the machine. In that case, you can create a runspace without that command and now, the user does not have a...

Using abstract syntax trees (ASTs) with ISE to make scripting more productive
Oct 30, 2013
Post comments count 0
Post likes count 0

Using abstract syntax trees (ASTs) with ISE to make scripting more productive

PowerShell Team
PowerShell Team

One thing I really like about Windows PowerShell ISE is its ability to expose its underlying script object model, to allow users to customize the scripting experience to suit their style and need. At the heart of customizing ISE is the $psISE object. The $psISE object allows you to control the various functional aspects of ISE. You can get a good description of the hierarchical object model for $psISE, and an exhaustive list of available features associated with this object here. This post discusses how you can leverage the power of PowerShell's publicly-available parser APIs, and combine that power with the ISE...

WMF 4.0 – Known Issue: Partial Installation without .NET Framework 4.5
Oct 28, 2013
Post comments count 0
Post likes count 0

WMF 4.0 – Known Issue: Partial Installation without .NET Framework 4.5

PowerShell Team
PowerShell Team

With the release of Windows Management Framework 4.0 (WMF 4.0), our package that lets you use management technologies from Windows 8.1 and Windows Server 2012 R2 on some of Microsoft’s older operating systems, we have been hearing one question fairly often. I’d like to address it here, so that there can be more self-help, and hopefully I can help preempt some occurrences of this issue. Scenario: Installing WMF 4.0 on a computer that is not running .NET Framework 4.5 will report that the installation is successful, but the components of WMF 4.0 (such as Windows PowerShell, WMI, etc.) will not be update...

Windows Management Framework 4.0 is now available
Oct 24, 2013
Post comments count 0
Post likes count 0

Windows Management Framework 4.0 is now available

PowerShell Team
PowerShell Team

Windows Management Framework 4.0, our package that lets you use management technologies from Windows 8.1 and Windows Server 2012 R2 on some of Microsoft’s older operating systems, is now available for you to download and install. This full-release version of Windows Management Framework 4.0 includes even more improvements than our Preview release. Be certain to read this blog post fully before installing, especially because WMF 4.0 is not compatible with certain versions of server products. Windows Management Framework 4.0 Preview was made publicly available in July, and we were very excited to talk with co...

PaaP: Windows PowerShell as a Platform – Part 1
Oct 1, 2013
Post comments count 0
Post likes count 0

PaaP: Windows PowerShell as a Platform – Part 1

PowerShell Team
PowerShell Team

In addition to being a scripting language, Windows PowerShell is also used as a platform in many applications. This is possible because the Windows PowerShell engine can be hosted inside an application. This blog post and the next will deal with the various APIs available for hosting Windows PowerShell in a C# application. The most important type for hosting Windows PowerShell is the System.Management.Automation.PowerShell class. This class provides methods that create a pipeline of commands and then execute those commands in a runspace. AddCommand Let's take a very simple example. Suppose you want to get th...

CIM Cmdlets – Some Tips & Tricks
Aug 19, 2013
Post comments count 0
Post likes count 0

CIM Cmdlets – Some Tips & Tricks

PowerShell Team
PowerShell Team

Common Information Model (CIM) cmdlets have been around for a while, and come in handy when you are performing any CIM operation in PowerShell. They are easy to use, and provide a good user experience. In this blog post, I cover a few tips and tricks that can be useful for users of CIM cmdlets. To get started, let’s get the complete list of cmdlets. The PowerShell module name for these cmdlets is CimCmdlets, and we can use the Get-Command cmdlet to see the cmdlets exposed by this module.    Tip#1: Working with CIM sessions A CIM session is a client-side object representing a connection to a loca...

DAL in action: Managing Network switches using PowerShell and CIM
Jul 31, 2013
Post comments count 0
Post likes count 0

DAL in action: Managing Network switches using PowerShell and CIM

PowerShell Team
PowerShell Team

This post is a part of the nine-part “What’s New in Windows Server & System Center 2012 R2” series that is featured on Brad Anderson’s In the Cloud blog.  Today’s blog post covers management of network switches using CIM and WS-Man standards and how it applies to the larger topic of “Transform the Datacenter.”  To read that post and see the other technologies discussed, read today’s post: “What’s New in 2012 R2: IaaS Innovations.”   We described the role Cloud OS plays is managing the datacenter and the role the Datacenter Abstraction Layer (DAL) vision plays in enabling this on the DAL website lin...

DAL in Action: Introducing PCSV Cmdlets for Out-of-Band Management of Server Hardware
Jul 31, 2013
Post comments count 0
Post likes count 0

DAL in Action: Introducing PCSV Cmdlets for Out-of-Band Management of Server Hardware

PowerShell Team
PowerShell Team

This post is a part of the nine-part “What’s New in Windows Server & System Center 2012 R2” series that is featured on Brad Anderson’s In the Cloud blog.  Today’s blog post covers Out-Of-Band hardware management using new PCSVDevice cmdlets and how it applies to the larger topic of “Transform the Datacenter.”  To read that post and see the other technologies discussed, read today’s post: “What’s New in 2012 R2: IaaS Innovations.” Windows Server is built from Cloud up to make it best Cloud OS. We believe that the issues running Clouds ...

PowerShell Sessions, Slides and Demos from TechEd 2013
Jul 29, 2013
Post comments count 0
Post likes count 0

PowerShell Sessions, Slides and Demos from TechEd 2013

PowerShell Team
PowerShell Team

We presented following sessions at this year’s edition of TechEd(s). At TechEd, we announced the newest feature in Windows PowerShell 4.0 – Desired State Configuration, so do check out the attached demos for it!! Desired State Configuration in Windows PowerShell Advance Automation using Windows PowerShell Windows PowerShell Unplugged Additionally, there were number of other sessions, hands-on-labs (HOLs) and instructor-led-labs (ILLs) showcasing various technology/product administration using of PowerShell automation. You can find those...

Windows Management Framework 4.0 Preview Now Available
Jul 2, 2013
Post comments count 0
Post likes count 0

Windows Management Framework 4.0 Preview Now Available

PowerShell Team
PowerShell Team

With the availability of Windows 8.1 Preview and Windows Server 2012 R2 Preview, we hope everyone has been enjoying our updates to Windows PowerShell and other management tools. We especially hope you’re having fun with our newest feature, Windows PowerShell Desired State Configuration. Because we want as many people as possible to benefit from our work, we intend to release version 4.0 of Windows Management Framework (WMF) which will make this updated functionality in Windows 8.1 and Windows Server 2012 R2 available on older operating systems. We are pleased to announce the first publicly available release...

Understanding PowerShell’s Type Conversion Magic
Jun 11, 2013
Post comments count 0
Post likes count 0

Understanding PowerShell’s Type Conversion Magic

PowerShell Team
PowerShell Team

Type Conversion in PowerShell is, without question, one of the most useful ingredients in its "Magic Sauce" of administrator effectiveness. When you run a command with a specific parameter type (I.e.: a DateTime or a TimeSpan), things seem to "just work". For example, consider this recent question / info dump on Twitter: #PowerShell parameters that take a timespan object interpret 10 as 10 ticks, 10:00 as 10 hours, and "10" as 10 days. — June Blender (@juneb_get_help) June 6, 2013 But how? Here are the steps that PowerShell takes on your behalf to convert input to a given ty...

Microsoft Script Explorer: Next Steps
Apr 5, 2013
Post comments count 0
Post likes count 0

Microsoft Script Explorer: Next Steps

PowerShell Team
PowerShell Team

For those who are familiar with Microsoft Script Explorer for Windows PowerShell, you know that we haven't released additional updates to it since we published the release candidate (RC) in August 2012. Over the past few months, we have been talking with customers and partners and taking a hard look at the adoption rate of the RC in terms of the number of downloads and the feedback we're received to date. One of the results of this analysis was that the adoption and usage of the pre-release versions of Script Explorer were not at the level we had hoped. Part of this stems from the fact that customers already have...

Windows PowerShell 3.0 SDK Sample Pack
Mar 17, 2013
Post comments count 0
Post likes count 0

Windows PowerShell 3.0 SDK Sample Pack

PowerShell Team
PowerShell Team

We're pleased to announce the availability of the Windows PowerShell 3.0 SDK Sample Pack. For Windows PowerShell 3.0, the SDK samples work a little differently than in previous releases of Windows PowerShell. For Windows PowerShell 2.0, we released a separate standalone SDK to the Download Center at http://go.microsoft.com/fwlink/?LinkID=180421. This download contained both the reference assemblies and code samples in a single SDK package. For Windows PowerShell 3.0, we are more closely following the format used by the Windows SDK. The reference assemblies for Windows PowerShell 3.0 are included in the Windows 8 ...

First German PowerShell Community Conference
Jan 25, 2013
Post comments count 0
Post likes count 0

First German PowerShell Community Conference

PowerShell Team
PowerShell Team

We are delighted to broadcast that the community will hold the first German PowerShell Community Conference on April 10 and 11, 2013 in Oberhausen, Germany.  As shown by the “sold out” PowerShell Summit for North America, there is a real need for PowerShell focused conferences that offer the attendees the opportunity to dig deep into PowerShell internals and experiences.  Agenda: http://www.powershell.de/powershell/konferenz/Zeitplan.aspx Press release: “In the setting of the Museum for Industrial and Social History in Oberhausen, Germany, the first German PowerShell Community Confere...

Updatable Help speaks only English!  What’s up with that?
Jan 17, 2013
Post comments count 0
Post likes count 0

Updatable Help speaks only English! What’s up with that?

PowerShell Team
PowerShell Team

Our customers have certainly not been shy about their interest in multiple languages of Windows PowerShell Updatable Help, and we're grateful to hear how much they would value localized Help. Our challenge is this: Updatable Help is a new feature for this release of Windows PowerShell, and we have so very many new cmdlets and modules for Windows PowerShell 3.0 (over 2,300 new cmdlets in 95 modules). It takes time to translate the content once it's available in English, and we can't translate all of it. There's just too much new content. One of the Windows PowerShell Core modules just by itself contains over 87,00...

Windows Management Framework 3.0 Compatibility Update
Dec 19, 2012
Post comments count 0
Post likes count 0

Windows Management Framework 3.0 Compatibility Update

PowerShell Team
PowerShell Team

Windows Management Framework (WMF) 3.0, (currently distributed as KB2506146 for Windows Server 2008 SP2 and KB2506143, for Windows 7 SP1 and Windows Server 2008 R2 SP1) has been temporarily removed from Windows Update to protect from accidental installations on unsupported systems. Those who want to install WMF 3.0 to take advantage of all the great features this update provides can do so by installing the update from the Microsoft Download Center, after reading the known compatibility issues detailed below. Background: Windows Management Framework (WMF 3.0) was released to the Download Center on September 17, 20...

WMI cheat sheet for PS users
Oct 28, 2012
Post comments count 0
Post likes count 0

WMI cheat sheet for PS users

PowerShell Team
PowerShell Team

Hi, We got multiple requests to publish the cheat sheet for CIM Cmdlets that was distributed in Tech Ed NA this year. Responding to popular demand, this document is attached as PDF . This is a great resource put together by WMI team for people who want to get started with CIM cmdlets. Standard disclaimer :-). Cheat sheet is just for a quick start to get people started - real documentation is here http://technet.microsoft.com/en-us/library/jj553783.aspx.   Thanks Osama Sajid Program Manager     WMI CheatSheet for PS.pdf

Joining Multiple Tables, Grouping and Evaluating Totals
Oct 3, 2012
Post comments count 0
Post likes count 0

Joining Multiple Tables, Grouping and Evaluating Totals

PowerShell Team
PowerShell Team

Joining Multiple Tables, Grouping And Evaluating Totals This is a continuation to the Join-Object blog post considering multiple joins and SQL style grouping and total evaluation. Problem: In the Join-Object blog we’ve seen that relational data naturally organizes in multiple tables. Once we have those tables, we frequently want to see the information back together, so we need something like Join-Object. Sometimes we also need to group the information and evaluate totals inside the groups. For instance, what are the total sales for each customer? How can we use Join-Object in multiple tables and ...

Windows Management Framework 3.0 Available for Download
Sep 17, 2012
Post comments count 0
Post likes count 0

Windows Management Framework 3.0 Available for Download

PowerShell Team
PowerShell Team

We hope that you’ve been enjoying all of the great new Windows PowerShell 3.0 features in Windows Server 2012. We wanted to make sure that everyone knows the final release of Windows Management Framework 3.0 is also available for download from the Microsoft Download Center. Windows Management Framework 3.0 makes much of the same great management functionality from Windows Server 2012 available to earlier versions of Windows. Windows Management Framework 3.0 allows you to install Windows PowerShell 3.0 (including a new version of WMI and WinRM) on the following Operating Systems:   Note: You must u...

Managing Hardware devices from PowerShell
Sep 10, 2012
Post comments count 0
Post likes count 0

Managing Hardware devices from PowerShell

PowerShell Team
PowerShell Team

Steve did a very cool blog post last month about managing hardware that implements standard DMTF profiles (examples: Intel AMT , Broadcom TruManage ) http://blogs.msdn.com/b/wmi/archive/2012/08/08/standards-based-hardware-management-using-powershell.aspx He has also published a PowerShell module on TechNet script center to help IT Pros. This module has been built on top of new CIM Cmdlets. http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Out-of-Band-84009c12   Take a look, and send your feedback. Osama Sajid Program Manager, WMI    

Introduction to CIM Cmdlets
Aug 24, 2012
Post comments count 0
Post likes count 0

Introduction to CIM Cmdlets

PowerShell Team
PowerShell Team

PowerShell 3.0 shipping with Windows server 2012 and Windows 8 brings a new set of Cmdlets to manage any server or device that complies with CIM and WS-Man standards defined by DMTF. In this blog post we will explore these new Cmdlets and how can they help IT Pros in managing a datacenter. The list of new Cmdlets is given in the table below:   Basic terminology If you are already familiar with terms like WMI, CIM, WinRM and WS-Man, you can skip this section. CIM: Common Information Model (CIM) is the DMTF standard [DSP0004] for describing the structure and behavior of managed resources such as sto...

New-Workflow –MakeItEasy: Authoring Workflows using PowerShell Extended Syntax
Jul 21, 2012
Post comments count 0
Post likes count 0

New-Workflow –MakeItEasy: Authoring Workflows using PowerShell Extended Syntax

PowerShell Team
PowerShell Team

Some time back, in his blog post, Jeffrey Snover introduced one of the new Windows PowerShell 3.0 feature – Windows PowerShell Workflow. In that post, you saw a glimpse of how to author workflows using PowerShell syntax. This post dives into more details of authoring workflows using PowerShell syntax and various extensions to it. Why we chose to extend the PowerShell Language for Workflow Authoring As Jeffrey mentioned in that blog post, Windows Workflow Foundation traditionally has been a developer-focused feature that requires Visual Studio and a lot of code to create a solution. To review the solution, anoth...

Windows PowerShell Web Access – Installation guide II
Jul 18, 2012
Post comments count 0
Post likes count 0

Windows PowerShell Web Access – Installation guide II

PowerShell Team
PowerShell Team

This blog is a continuation of the post on Basic installation guide for PowerShell Web Access. In the basic installation blog, we configured IIS with the default values used by the Install-PswaWebApplication cmdlet. This is the simplest way to install and configure the feature.   The video below illustrates two more ways to configure IIS – 1. Using Install-PswaWebApplication      In this case we specify values for –WebSiteName and –WebApplication parameters for the cmdlet 2. Using the GUI equivalent      In this case, we use IIS Manager to configure ...

Join-Object
Jul 13, 2012
Post comments count 1
Post likes count 1

Join-Object

PowerShell Team
PowerShell Team

Problem: How do I join two lists of objects into a single list? Or the equivalent: How do I join two CSV files into a single one? Note that joining makes sense only when the two lists or CSV files have something in common.   Why do we need Join? If you know why you need join would not enjoy a review of basic database concepts, feel free to skip this section. Say you own a company and want to keep track of the time when your employees arrive. A simplified table of employees could look like this:                      The id uniquely identifies an employ...

Introducing Management OData Schema Designer
Jul 10, 2012
Post comments count 0
Post likes count 0

Introducing Management OData Schema Designer

PowerShell Team
PowerShell Team

We are excited to introduce the new Management OData Schema Designer tool. The tool’s goal is to accelerate evaluation /development on top of “Management OData IIS Extension” optional Windows Server 2012 feature. A very informative introduction about this feature can be found in the Standards based management in Windows Server 8 by Jeffrey Snover and Wojtek Kozaczynski. The new tool has There are 2 versions available: Prerequisites:  Visual Studio Isolated Shell   Please use it and let us know if it is useful to you via the “Issue tracker”. R...

OMI – Open Management Infrastructure to bring the power of PowerShell and standards to devices in your datacenter.
Jul 2, 2012
Post comments count 0
Post likes count 0

OMI – Open Management Infrastructure to bring the power of PowerShell and standards to devices in your datacenter.

PowerShell Team
PowerShell Team

PowerShell community, We are pleased to announce availability of OMI - a highly portable, small footprint, high performance CIM Object Manager. OMI stands for Open Management Infrastructure, and it is available from Open Group as an open source project. See this Windows Server blog post for full details. http://blogs.technet.com/b/windowsserver/archive/2012/06/28/open-management-infrastructure.aspx OMI opens up management of hardware devices in a datacenter using what we call a  "Datacenter Abstraction Layer" or DAL. Imagine configuring a set of  hardware devices from different vendors (like&...

Snippets in Windows PowerShell ISE 3.0
Jun 27, 2012
Post comments count 0
Post likes count 0

Snippets in Windows PowerShell ISE 3.0

PowerShell Team
PowerShell Team

This blog post applies to the Windows PowerShell Integrated Scripting Environment (ISE) in Windows 8 and Windows Server 2012.  The ISE is also fully supported and available when Server 2012 is deployed using the Minimal Server Interface.  To start ISE, type ise  in a PowerShell console and press Enter Snippets provide a convenient way to paste arbitrary text into the ISE console and script editor, right where you need it.  The idea is to provide improved productivity, discoverability, and usability: For those of you who are familiar with Visual Studio’s Snippets, the ISE version uses the same ...

Basic installation guide for Windows PowerShell Web Access
Jun 26, 2012
Post comments count 0
Post likes count 0

Basic installation guide for Windows PowerShell Web Access

PowerShell Team
PowerShell Team

Windows PowerShell Web Access is a new feature in Windows Server 2012. It is an IIS application that provides a Windows PowerShell console in a web browser. The IIS application acts as a gateway between the web browser and the machines that you can connect to in your environment. These machines should have Windows PowerShell remoting enabled. The video below illustrates the three simple steps of setup and configuration – 1. Feature installation In the video we use GUI to install the feature. We could also use the Windows PowerShell cmdlet equivalent for installation (run the cmd in an elevated PowerShell c...

Improving the FileSystem Provider through Community feedback
Jun 21, 2012
Post comments count 0
Post likes count 0

Improving the FileSystem Provider through Community feedback

PowerShell Team
PowerShell Team

One of the things we love about the Windows PowerShell community is that folks are not shy. It turns out that having a vocal community is a great way to build and evangelize a product like ours. Of course, the Unix guys had this all figured out a long time ago. Positive comments are good and all, but it’s difficult to really improve without being told where we came short. One of the ways we take feedback from the community for Windows PowerShell is through our public Microsoft Connect site. On that site anyone with a Live ID can log a bug or suggestion against Windows PowerShell. Items then get voted up or ...

Running show-command to discover cmdlets
Jun 20, 2012
Post comments count 0
Post likes count 0

Running show-command to discover cmdlets

PowerShell Team
PowerShell Team

This blog post applies to the Windows PowerShell Version 3.0.  Problem: How can I find out what cmdlets are available for a given task?  Finding cmdlets in the traditional way  If you know the basics of get-command, feel free to skip this section. If you are searching for a cmdlet to add a printer, you could star with something like:   PS C:\Users\mspuser> get-command *printer* CommandType    Name                   ModuleName -----------    ----                   ---------- Function       Add-Printer            PrintManagement Function       Add-PrinterDriver      PrintManagement ...

High Level Architecture of Windows PowerShell Workflow (Part 2)
Jun 19, 2012
Post comments count 0
Post likes count 0

High Level Architecture of Windows PowerShell Workflow (Part 2)

PowerShell Team
PowerShell Team

This is the second part of our post on the high level architecture of Windows PowerShell Workflow. Part 1 of this blog post provided an overview of the architecture and its various components. This post will go into more detail on the various subcomponents and provide some insight into the internals of Windows PowerShell Workflow. The component diagram for the PowerShell Workflow Executive is repeated (from part 1) for reference Each of the components in the diagram is discussed in detail below. 1. Workflow Compilation, Caching and Validation Windows Workflow Foundation deals with and understan...

High Level Architecture of Windows PowerShell Workflow (Part 1)
Jun 15, 2012
Post comments count 0
Post likes count 0

High Level Architecture of Windows PowerShell Workflow (Part 1)

PowerShell Team
PowerShell Team

  1 Summary In March we introduced Windows PowerShell Workflow (PSWF), which explained why we integrated workflows with PowerShell, and what were our major investment areas for our first release. In a recent post, Jeffrey Snover summarizes this decision: “We integrated the Windows Workflow Foundation engine into PowerShell to make it simple and easy to automate things that take a long time, that operate against a very large scale, or that require the coordination of multiple steps across multiple machines.” While these posts talked about workflows as robust multi-machine commands, it didn’t address a...

New V3 Language Features
Jun 13, 2012
Post comments count 0
Post likes count 0

New V3 Language Features

PowerShell Team
PowerShell Team

We’ve already discussed the biggest new PowerShell language feature – workflows – in a previous post.  In this post, I’m going to describe a number of small changes we’ve made to the language.  Most of the changes described here don’t introduce any new syntax, but I think you’ll agree that most of these changes make various aspects of scripting in PowerShell simpler.  To me, many of these features are what make PowerShell a joy to use.   Member Enumeration To start, I’m going to describe a little feature that had no official name until I started...

Intellisense in Windows PowerShell ISE 3.0
Jun 12, 2012
Post comments count 1
Post likes count 0

Intellisense in Windows PowerShell ISE 3.0

PowerShell Team
PowerShell Team

This blog post applies to the Windows PowerShell Integrated Scripting Environment (ISE) in Windows 8 and Windows Server 2012.  The ISE is also fully supported and available when Server 2012 is deployed using the Minimal Server Interface.  To start ISE, type ise  in a PowerShell console and press Enter Very few things can be considered “cool” in an interactive command-line environment. Intellisense sure counts as one of the few exceptions.  While tab completion has always been a cornerstone of PowerShell usability (and continues to be), my struggle with tab completion is that after cycling through the 5th optio...

Windows Management Framework 3.0 RC is Available for Download
Jun 1, 2012
Post comments count 0
Post likes count 0

Windows Management Framework 3.0 RC is Available for Download

PowerShell Team
PowerShell Team

Yesterday we published an RC version of the Windows Management Framework 3.0. Windows Management Framework 3.0 RC makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 RC can be installed on the following Operating Systems:   Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The package also includes a CIM provider that allows you to collect management data from servers with Windows Management Framework 3.0 installed with the new Server Manager in Windows Server 2012 RC.    Feedback &...

Going to TechEd? Join Us to Build a Solution on Windows PowerShell 3.0
May 9, 2012
Post comments count 0
Post likes count 0

Going to TechEd? Join Us to Build a Solution on Windows PowerShell 3.0

PowerShell Team
PowerShell Team

  To cap off TechEd North America this year we are going to host a half day Windows PowerShell scenario walkthrough. The event will take place at the Rosen Center on Friday June 15 from 8am – noon. During this time we will collectively solve a problem from the ground up using many of the new features in Windows PowerShell 3.0 and Windows Server 2012. Starting from base Windows Server 2012 images, we will walk you through: You will need to bring your own laptop to follow along. Our room has space to accommodate 40 people.  If you are interested please send a note to us at pow...

Running show-command for a cmdlet
Apr 12, 2012
Post comments count 1
Post likes count 0

Running show-command for a cmdlet

PowerShell Team
PowerShell Team

Problem: Figuring out a cmdlet from its syntax can be overwhelming, especially for people new to PowerShell. PS C:\> get-command get-process -syntax Get-Process [[-Name] <string[]>] [-ComputerName <string[]>] [-Module] [-FileVersionInfo] [<CommonParameters>] Get-Process -Id <int[]> [-ComputerName <string[]>] [-Module] [-FileVersionInfo] [<CommonParameters>] Get-Process -InputObject <Process[]> [-ComputerName <string[]>] [-Module] [-FileVersionInfo] [<CommonParameters>] Get-command –syntax displays the syntax for the command. The top of get-he...

Microsoft Script Explorer for Windows PowerShell Beta 1 Now Available
Apr 9, 2012
Post comments count 0
Post likes count 0

Microsoft Script Explorer for Windows PowerShell Beta 1 Now Available

PowerShell Team
PowerShell Team

We are very excited to announce the availability of Microsoft Script Explorer for Windows PowerShell (Script Explorer) Beta 1. Script Explorer is an extension of the Windows PowerShell content and guidance experience, combining the vast amount of knowledge held in the community with resources that are available from Microsoft. Script Explorer is integrated as an Add-On to Windows PowerShell Integrated Scripting Environment (ISE).  With Script Explorer, you can: · Discover information that is related to Windows PowerShell from across the community and Microsoft. · Search seamlessly across repositories suc...

Improved WMI experience in PowerShell 3.0
Apr 4, 2012
Post comments count 0
Post likes count 0

Improved WMI experience in PowerShell 3.0

PowerShell Team
PowerShell Team

There is a famous quote often attributed to Jeffrey Snover, “IT Pros love and hate WMI. They love it because there is so much great stuff there. They hate it because it is complex to use”. Not to our surprise, most of the IT Pros and developers we talked to agree with this. This is going to change with Windows “8”. We listened to your feedback and have made heavy investment in this area. This blog post standards based management in Windows Server 8 by Jeffrey Snover and Wojtek Kozaczynski provides an excellent overview. I would like to highlight two important aspect of improved PS+WMI...

Schedule for the upcoming PowerShell Deep Dive and a few videos from Frankfurt
Mar 25, 2012
Post comments count 0
Post likes count 0

Schedule for the upcoming PowerShell Deep Dive and a few videos from Frankfurt

PowerShell Team
PowerShell Team

We’ve got a great lineup of sessions and speakers scheduled for the upcoming PowerShell Deep Dive in San Diego, CA on April 30 – May 2! The schedule was recently published on The Experts Conference site, and is also listed below for convenience. Be sure to check out the TEC site for abstracts and speaker bios. If you’re still thinking about registering, it is not too late. Just follow the instructions listed on this earlier blog post. Here are a couple videos from last PowerShell Deep Dive in Frankfurt that Dmitry Sotnikov has recently posted on his blog: And now for the schedule: &nb...

Troubleshooting Windows Management Framework 3.0 Beta Installation
Mar 22, 2012
Post comments count 0
Post likes count 0

Troubleshooting Windows Management Framework 3.0 Beta Installation

PowerShell Team
PowerShell Team

This blog post explains how to resolve problems that may occur when you install Windows Management Framework (WMF) 3.0 Beta. WMF 3.0 Beta includes Windows PowerShell 3.0 Beta. You can find the WMF 3.0 Beta installation package on the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=240290. The WMF 3.0 package installation is blocked when one or more of the following prerequisites are not met: When one or more of the conditions is not met, an error message, such as the following one, explains that the update does not apply to the system. WMF 3.0 Beta is shipped in four...

Scheduling Background Jobs in Windows PowerShell 3.0
Mar 19, 2012
Post comments count 0
Post likes count 0

Scheduling Background Jobs in Windows PowerShell 3.0

PowerShell Team
PowerShell Team

One of the most common phone calls that the support team gets for Windows PowerShell is "How do I use Task Scheduler to schedule Windows PowerShell scripts?". As an administrator, you need to have full control over when scripts run in your environment. Perhaps you need run a script only during a one-off maintenance window or maybe you want to schedule some routine maintenance on a server so that it runs at non-peak times. Although it was possible to use Task Scheduler to invoke scripts in Windows PowerShell 2.0, it was not trivial. What's more, you were responsible for writing code to store the detailed results o...

When Windows PowerShell Met Workflow
Mar 16, 2012
Post comments count 0
Post likes count 0

When Windows PowerShell Met Workflow

PowerShell Team
PowerShell Team

Meet the new kid on the block! Windows PowerShell Workflow (PSWF) is the latest addition to the Windows PowerShell family. First, let’s establish the context for the decision to integrate workflows into Windows PowerShell. It starts with cloud computing and Windows-based datacenters. Cloud computing provides a set of highly available, scalable computing services that leverage high volume components (servers, disks, RAM, etc.) High volume components are less reliable than their tier 1 counterparts and even those occasionally fail. The key to cloud computing is to use software to deliver a reliable service ...

Install PowerShell Web Access on non-English machines
Mar 16, 2012
Post comments count 0
Post likes count 0

Install PowerShell Web Access on non-English machines

PowerShell Team
PowerShell Team

We can check our emails, go on Facebook, and get news feeds on our favorite topics from anywhere and everywhere. Then why not manage our machines from everywhere as well! Windows Server 8 Beta brings you the new feature, Windows PowerShell Web Access, which provides a Windows PowerShell console in your web browser. What! If that’s your reaction, check out Introducing Windows PowerShell Web Access in Windows Server 8. This post offers a workaround for using Install-PswaWebApplication cmdlet on non-English Windows Server 8 Beta builds to install Windows PowerShell Web Access (aka PSWA). As a quick reminder, Wind...

Introducing Windows PowerShell Web Access in Windows Server 8 Beta
Mar 7, 2012
Post comments count 0
Post likes count 0

Introducing Windows PowerShell Web Access in Windows Server 8 Beta

PowerShell Team
PowerShell Team

Windows PowerShell Web Access lets you manage your Windows Servers anywhere and anytime.   Windows PowerShell MVPs are excited about Windows PowerShell Web Access. We just had a MVP summit here at Microsoft and I had the pleasure of talking to some of our MVPs. Some of them told me that PowerShell Web Access was the best part of Windows Server 8 Beta!  Wow, that made me feel good.  There are so many awesome things in Windows Server "8" Beta.  Windows PowerShell by itself has several valuable improvements. I don’t know about being the best, but Windows PowerShell Web Access is going to be a hit. &nbs...

Windows Management Framework 3.0 Beta Available for Download
Mar 1, 2012
Post comments count 0
Post likes count 0

Windows Management Framework 3.0 Beta Available for Download

PowerShell Team
PowerShell Team

Yesterday we published a Beta version of the Windows Management Framework 3.0. Windows Management Framework 3.0 Beta makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 Beta can be installed on the following Operating Systems:   Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The Beta version also includes a Server Manager CIM provider. This CIM provider allows users of Server Manager in Windows Server “8” to collect and view management data from servers with Windows Management Framework ...

Last Call for PowerShell Deep Dive Session Proposals
Feb 13, 2012
Post comments count 0
Post likes count 0

Last Call for PowerShell Deep Dive Session Proposals

PowerShell Team
PowerShell Team

Thank you to those who have already submitted a session proposal or two! We’ve received a lot of good ideas, and luckily there are a few days left for anyone still thinking about submitting a session for the upcoming PowerShell Deep Dive. Please send your proposed session title and brief abstract to TEC2012@quest.com before February 15th. We’re open to ideas for both the 75 minute regular sessions and the 35 minute deep dives. Proposals will be reviewed in the next week and responses will be sent out shortly after. Speaker packages include registration, airfare and hotel.   Travis Jones [MSF...

It’s Time For Another PowerShell Deep Dive!
Jan 26, 2012
Post comments count 0
Post likes count 0

It’s Time For Another PowerShell Deep Dive!

PowerShell Team
PowerShell Team

  The PowerShell Deep Dive is going to be at The Experts Conference USA again this year! The event is being held in San Diego, CA from April 29 - May 2. Registration is currently open, but we wanted to provide some info on a few changes to the event structure. As usual, we will be sending some folks (probably ~3) from the PowerShell Team to this Deep Dive and will be kicking the event off with a Keynote. Registration Info: Early bird registration runs through the end of January and is priced at $1575. To sign up: Speaker Info: Good news f...

Another Holiday Gift from the PowerShell Team: PowerShell 3.0 CTP2 – Getting Started with Windows PowerShell Workflow
Dec 21, 2011
Post comments count 0
Post likes count 0

Another Holiday Gift from the PowerShell Team: PowerShell 3.0 CTP2 – Getting Started with Windows PowerShell Workflow

PowerShell Team
PowerShell Team

After delivering the Thanksgiving Gift this year, it’s time for a Holiday Gift …. No not as big as the one we had about 3 years ago …!! Today, we published the “Getting Started with Windows PowerShell Workflow” document on the CTP2 download page, just look for “WMF3 CTP2 Windows PowerShell Workflow.pdf”. This will help you get started with thenewest addition to PowerShell functionality – Windows PowerShell Workflow. Please continue to provide your feedback via PowerShell Connect so we can receive customer input in a timely manner. Hemant Mahawar [MSFT] Progra...

Windows Management Framework 3.0 Community Technology Preview (CTP) #2 Available for Download
Dec 2, 2011
Post comments count 0
Post likes count 0

Windows Management Framework 3.0 Community Technology Preview (CTP) #2 Available for Download

PowerShell Team
PowerShell Team

  I’m pleased to announce that the Community Technology Preview #2 (CTP2) is available for download. Windows Management Framework 3.0 CTP2 makes some updated management functionality available to be installed on Windows 7 SP1 & Windows Server 2008 R2 SP1. Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI & WinRM. IMPORTANT: If you have WMF3.0 CTP1 installed, you must uninstall it before installing CTP2. Overview of changes since WMF 3.0 CTP1 1. Customer Reported Bug Fixes Many customer reported bugs have been fixed since the WMF 3.0 CTP1. The release notes contains a list of...

More Videos from the First PowerShell Deep Dive
Oct 10, 2011
Post comments count 0
Post likes count 0

More Videos from the First PowerShell Deep Dive

PowerShell Team
PowerShell Team

  I hope everyone has their travel arrangements figured out for next week’s PowerShell Deep Dive in Frankfurt. In preparation, we wanted to share four more videos from the first PowerShell Deep Dive to go with the ones we blogged last week. This time we’ve got two sessions from the PowerShell Team (Bruce Payette & Dan Harman) and two from the PowerShell MVPs (Aleksandar Nikolic & Sean Kearney). Enjoy! Inside PowerShell Runtime – Bruce Payette PowerShell Modules – Dan Harman Integrating PowerShell with Legacy Environments – Sean Kearney Constained PowerShell Endpoints&nbs...

Recordings from the First PowerShell Deep Dive
Oct 6, 2011
Post comments count 0
Post likes count 0

Recordings from the First PowerShell Deep Dive

PowerShell Team
PowerShell Team

  If you’re wondering what to expect at the upcoming PowerShell Deep Dive in Frankfurt, Germany or you just plain love PowerShell, then you may enjoy these recordings taken from the first PowerShell Deep Dive. Many thanks to Dmitry Sotnikov for making them available. Proxy Functions – Jeffrey Snover Little Known PowerShell Tips and Tricks – Lee Holmes WMI: Gems and Gotchas – Richard Siddaway Defining domain-specific vocabularies using Windows PowerShell – Kirk Munro   It’s not too late to sign up for the October 17 & 18 Deep Dive either.   Travis Jones ...

PowerShell Deep Dive Lineup
Oct 5, 2011
Post comments count 0
Post likes count 0

PowerShell Deep Dive Lineup

PowerShell Team
PowerShell Team

  We’re less than two weeks away from the PowerShell Deep Dive at The Experts Conference in Frankfurt, Germany and the schedule for the two day event is looking great! There’s even going to be a bit of PowerShell V3 content during the Keynote (we’ll reiterate some of what was shown at BUILD last month) and in Dmitry’s “Get your jobs done” session. Monday   Tuesday   The Lightning Rounds are going to be a series of ~5 minute discussions around whatever attendees suggest. The Problem Solving sessions can be thought of as mini Script Clubs. Bring something you&rsq...

Cmdlet Help Editor is now released on CodePlex
Sep 20, 2011
Post comments count 0
Post likes count 0

Cmdlet Help Editor is now released on CodePlex

PowerShell Team
PowerShell Team

I published the source code for the Cmdlet Help Editor on CodePlex here: http://cmdlethelpeditor.codeplex.com/ . Please feel free to contribute. for more information on the Cmdlet Help Editor, please check out the following post: http://blogs.msdn.com/b/powershell/archive/2007/09/01/new-and-improved-cmdlet-help-editor-tool.aspx  Wassim Fayed [MSFT]

Windows Management Framework 3.0 Community Technology Preview (CTP) #1 Available for Download
Sep 19, 2011
Post comments count 0
Post likes count 0

Windows Management Framework 3.0 Community Technology Preview (CTP) #1 Available for Download

PowerShell Team
PowerShell Team

Windows Management Framework 3.0 CTP1 makes some updated management functionality available to be installed on Windows 7 SP1 & Windows Server 2008 R2 SP1. Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI & WinRM. Windows PowerShell 3.0 Some of the new features in Windows PowerShell 3.0 include: WMI WMI in Windows Management Framework 3.0 CTP1 introduces: WinRM With Windows Management Framework 3.0 CTP1: Windows PowerShell Web Service Windows PowerShell Web Service enables an administrator to expose a set of P...

8 Abstracts for the PowerShell Deep Dive in Frankfurt
Sep 1, 2011
Post comments count 0
Post likes count 0

8 Abstracts for the PowerShell Deep Dive in Frankfurt

PowerShell Team
PowerShell Team

  We’re super excited about the upcoming PowerShell Deep Dive in Frankfurt on October 17 & 18. The agenda is starting to shape up nicely, so I wanted to share a number of abstracts submitted by members of the PowerShell Community that we’ve already accepted. You can also find this info on The Experts Conference website. Cheap registration of 850 Euros is coming to an end on September 6. If you’re sitting on the fence, hopefully these abstracts will encourage you register while you can still save 150 Euros. And now for the abstracts… Delegated Administration with PowerShell Remoting Speaker: Ale...

Get-Help -Online Fails in German
Aug 23, 2011
Post comments count 0
Post likes count 1

Get-Help -Online Fails in German

PowerShell Team
PowerShell Team

The Online parameter of the Get-Help cmdlet opens the online version of the help topic for a command in your default Internet browser. If you don't use this feature regularly, you should. Online help topics are typically the most up-to-date version of the help topics, because module authors can update them at any time without redistributing the module. Online help topics are especially critical for modules in the $pshome directory ($env\SystemRoot\System32\WindowsPowerShell\v1.0) which cannot be updated easily, because they are part of Windows.         &...

Extending Discounted Registration & Session Proposal Deadline
Aug 2, 2011
Post comments count 0
Post likes count 0

Extending Discounted Registration & Session Proposal Deadline

PowerShell Team
PowerShell Team

  The deadline for discounted registration of 850 Euros is going to be moved out to Tuesday, September 6. This is just over a month before the conference date and a little more in line with what we did for the first PowerShell Deep Dive. To sign up: Beginning September 7, registration will go up to the full price of 1000 Euros. We’re also going to give everyone a little more time to submit proposals. We’ll be accepting proposals until Thursday August 18 and responding to folks the following week.   Travis Jones [MSFT] Windows PowerShell PM Microsoft Corporation

PowerShell Deep Dive Registration Info & Call for Session Proposals
Jul 19, 2011
Post comments count 0
Post likes count 0

PowerShell Deep Dive Registration Info & Call for Session Proposals

PowerShell Team
PowerShell Team

Here’s some more info on the 2nd PowerShell Deep Dive that will be at TEC Europe 2011 in Frankfurt on October 17 & 18. Registration Info Registration is now open for the PowerShell Deep Dive! The cheaper registration fee of 850 Euros is available until August 12. After that, registration will go up to 1000 Euros. To sign up: Event Structure We’re extending this PowerShell Deep Dive by a half day based on feedback we received after the last event. This Deep Dive will offer two full days of sessions (Monday & Tuesday), with some sort of Script Party at the end of each day. We are also doin...

PowerShell Deep Dive @ The Experts Conference Europe 2011
Jul 12, 2011
Post comments count 0
Post likes count 0

PowerShell Deep Dive @ The Experts Conference Europe 2011

PowerShell Team
PowerShell Team

Based upon the excellent reviews received at the first PowerShell Deep Dive, we're pleased to announce a PowerShell Deep Dive will be coming to The Experts Conference 2011 in Germany. The PowerShell Deep Dive provides a deep technical and strategic engagement within the PowerShell Community. Attendees interact one-on-one with presenters, team members and other key members of the PowerShell Community. Deep Dive sessions take on a shorter and more technical format than the standard conference (35 minutes versus the usual 75 minutes). As with the first PowerShell Deep Dive, registration will limit the number o...

Invoke-Expression considered harmful
Jun 3, 2011
Post comments count 2
Post likes count 0

Invoke-Expression considered harmful

PowerShell Team
PowerShell Team

The PowerShell team frequently gets questions that start out “how do I get the quoting right for…” and the answer turns out to usually be – there is a simpler way – don’t use Invoke-Expression. The problem arises when trying to run some command external to PowerShell.  Some common reasons people try Invoke-Expression: If you’re just running some command external to PowerShell (exe, cmd, etc.) and you’re using Invoke-Expression, you are just making things more difficult than you need to. So what’s wrong with Invoke-Expression then? If Invoke-Ex...

Download the Updated Core Help CHM
May 16, 2011
Post comments count 0
Post likes count 0

Download the Updated Core Help CHM

PowerShell Team
PowerShell Team

The best way to get updated help for Windows PowerShell core commands is to type "Get-Help –Online <cmdletname>," but that works only when you're online and your firewall permits Internet access. For all of those other times, there's the new Windows PowerShell 2.0 Core Help – May 2011 Update in CHM format. The newly released CHM includes Windows PowerShell Core cmdlet help, provider help, and conceptual "About" help topics as of May 1, 2011. It’s digitally signed and packaged in an executable file to ward off the meanies. You can get it from the Microsoft Download Center at http://go.micr...

PowerShell at TechEd 2011
Apr 28, 2011
Post comments count 0
Post likes count 0

PowerShell at TechEd 2011

PowerShell Team
PowerShell Team

  We’re just a couple weeks away from TechEd (May 16-19) and there’s going to be a ton of great PowerShell content again this year! Kirk Munro just made a post over at Poshoholic with an easy-to-read list of all the PowerShell related sessions for the conference. Thanks to Kirk for his effort in compiling all of this in a single place. Link: http://poshoholic.com/2011/04/28/learn-more-about-powershell-at-teched-2011/ For those who will be attending, you can expect to see some of the usual suspects from the PowerShell Team and our group of MVPs.   Travis Jones Windows PowerShell PM Microsoft...

Keeping Help Helpful: Use -Online and Redirectable Links
Apr 22, 2011
Post comments count 0
Post likes count 0

Keeping Help Helpful: Use -Online and Redirectable Links

PowerShell Team
PowerShell Team

When you refer to Windows PowerShell help topics, such as in tools and blog posts, be sure to refer to the most recent version of the help topics. Few things are less helpful or more confusing than sending a reader to a topic that is missing a parameter or includes an example that doesn't work. To be sure that you're always referring to the newest help topics, refer to the online help topics in the TechNet library. The redirectable links will always be current. Even if a help topic page moves or changes, the redirectable link always connects to the newest version of the hel...

PowerShell Language now licensed under the Community Promise
Apr 15, 2011
Post comments count 0
Post likes count 0

PowerShell Language now licensed under the Community Promise

PowerShell Team
PowerShell Team

The PowerShell team is excited to announce that starting today we are licensing the language specification for Windows PowerShell 2.0 under the Microsoft Community Promise. This means that now anyone can implement PowerShell on any platform they want to.  We know some of our most passionate customers sometimes work on platforms that can’t run PowerShell today, so when writing this specification, we wrote it in a platform neutral manner. We hope to see implementations on all of your favorite platforms.  This would benefit the industry, our partners, and our customers.  We told you that you sho...

Using Get-WinEvent –FilterXml to process Windows Events
Apr 14, 2011
Post comments count 0
Post likes count 0

Using Get-WinEvent –FilterXml to process Windows Events

PowerShell Team
PowerShell Team

Introduction Windows Events can be extremely useful for debugging. Administrators often use events to diagnose problems in complex systems. However, Event Viewer is time-consuming and difficult to automate. Luckily, there is a simple way to fully automate the process. The FilterXml Parameter The FilterXml parameter allows you use a simple XML document to filter events quickly. You can use the "Create Custom View" and "Filter Current Log" features in Event Viewer to create a valid XML query. The exact query schema can be found here: http://go.microsoft.com/fwlink/?LinkId=143685. An Example In Event Viewe...

Scaling and Queuing PowerShell Background Jobs
Apr 4, 2011
Post comments count 0
Post likes count 0

Scaling and Queuing PowerShell Background Jobs

PowerShell Team
PowerShell Team

A couple of months ago I had asked the PowerShell MVPs for suggestions on blog topics. Karl Prosser, one of our awesome MVPs, brought up the topic of scaling and queuing background jobs. The scenario is familiar: You have a file containing a bunch of input that you want to process and you don’t want to overburden your computer by starting up hundreds of instances of PowerShell at once to process them. After playing around for about an hour on Friday afternoon, here is what I came up with… This example assumes you have a text file containing the names of many event logs and you want to get the content...

Only 2 days left to save $1000 on PowerShell Deep Dive registration
Mar 30, 2011
Post comments count 0
Post likes count 0

Only 2 days left to save $1000 on PowerShell Deep Dive registration

PowerShell Team
PowerShell Team

There are still a few seats open for the first ever PowerShell Deep Dive Conference and tomorrow is the last day of cheap registration! In case you haven’t already been doing it, now would be a good time to start camping out in your boss’ office begging him/her for the money and time off. Register today or tomorrow for only $850. The price will be going up to the full Experts Conference rate of $1825 on Friday April 1. To register, follow this link to create your profile and use code “ATGNJR6E”. The detailed session schedule has also been posted on The Experts Conference website over here....

More Deep Dive Info, Including Abstracts from the PowerShell Team
Mar 12, 2011
Post comments count 0
Post likes count 0

More Deep Dive Info, Including Abstracts from the PowerShell Team

PowerShell Team
PowerShell Team

  Seats are filling up for the PowerShell Deep Dive and cheap registration is almost over. Remember: Registration during the month of March is only $850, but quickly jumps to the full conference price of $1825 on April 1. To register, follow this link to create your profile and use code “ATGNJR6E”. Just a few more names of people that we’re very excited to have joining us: Here are the abstracts for a few Deep Dives that will be led by members of the PowerShell Team. Proxy Function PartySpeaker: Jeffrey SnoverOne of our goals with PowerShell is to give you the tools and capabilities s...

Four more reasons to come to the PowerShell Deep Dive
Mar 7, 2011
Post comments count 0
Post likes count 0

Four more reasons to come to the PowerShell Deep Dive

PowerShell Team
PowerShell Team

Videos from the PowerShell team and Don Jones… Jeffrey Snover: https://www.youtube.com/watch?v=2-6SrEpSfVs Don Jones: https://www.youtube.com/watch?v=Ev3mexiAw1k Dan Harman: https://www.youtube.com/watch?v=JBbmXYd8VRM Hemant Mahawar: https://www.youtube.com/watch?v=9bpOFicYMOg Travis Jones [MSFT] Windows PowerShell PM Microsoft Corporation

A Few Deep Dive Abstracts
Mar 4, 2011
Post comments count 0
Post likes count 0

A Few Deep Dive Abstracts

PowerShell Team
PowerShell Team

  We received a lot of session proposals for the PowerShell Deep Dive conference. Thank you to everyone who sent one or more in. I wanted to share the abstracts for a handful of the sessions that have already been selected. Stay tuned, details on more sessions will be available soon… Defining domain-specific vocabularies using Windows PowerShell Speaker: Kirk Munro PowerShell was built from the ground up to be a rich, extendible scripting language. While it is of paramount importance to keep commands you add to PowerShell consistent with the rest of the scripting language, there are domains where g...

Cmdlet Help Editor V2.0 with Module Support
Feb 23, 2011
Post comments count 0
Post likes count 0

Cmdlet Help Editor V2.0 with Module Support

PowerShell Team
PowerShell Team

Hi, I have updated the Cmdlet Help Editor tool to support Modules. The V1.0 version of this tool only supported PsSnapins. The original post can be found here  Cmdlet Help Editor enables you to create help topics for Windows PowerShell cmdlets in the XML format that Windows PowerShell supports. Help text created in Cmdlet Help Editor can be displayed immediately by a Windows PowerShell get-help command without any additional transforms or formatting.   By reflecting on a Windows PowerShell snap-in (PsSnapin) assembly or Module, Cmdlet Help Editor creates a customized documentation interface t...

Reminder: Register for the PowerShell Deep Dive Conference & submit your sessions
Feb 23, 2011
Post comments count 0
Post likes count 0

Reminder: Register for the PowerShell Deep Dive Conference & submit your sessions

PowerShell Team
PowerShell Team

April 18-19 2011 – Las Vegas We’re very excited with the positive reaction we’ve seen towards the first ever PowerShell Deep Dive! There’ll be lots of talented & smart people hanging out with us for a couple days. To mention just a few: There are only a few days left to get the cheapest registration rate of $700. Go to https://register.crgevents.com/TEC2011/Register/Login/UsernamePassword/Default.aspx and use code ATGNJR6E before February 28. Registration will be going up to $850 for the month of March. Also, February 25 is the final day to submit proposals for Deep Dive sessio...

Does Your Hard Work Advance the Ecosystem?
Feb 6, 2011
Post comments count 0
Post likes count 0

Does Your Hard Work Advance the Ecosystem?

PowerShell Team
PowerShell Team

The Lync PowerShell Blog recently posted a fairly chewy piece that described how to enable users in bulk when given an XLS file as input. Jason Helmick responded, saying: Instead of your incredible code that no admin would even begin to understand or even be able to write, let’s do the same thing, in one line. (Note: This is an educated PowerShell admin, or any typical Unix guy.) Step 1: Admin receives xls from HR.  They then proceed to use Excel to convert it to CSV.  Total time, 10 seconds. Step 2: They then type the following one-liner: Import-CSV C:\Scripts\NewUsers.csv | %{Enable-CsUs...

PowerShell Deep Dive Conference
Feb 4, 2011
Post comments count 0
Post likes count 0

PowerShell Deep Dive Conference

PowerShell Team
PowerShell Team

  We’re proud to announce the first ever PowerShell Deep Dive conference! This event will take place at TEC 2011 in Las Vegas, April 18-19. PowerShell Deep Dive is meant to provide a deep technical and strategic engagement within the PowerShell Community.  Attendees will interact one-on-one with presenters, team members and other key members of the PowerShell Community.  It will facilitate a common understanding of the technology and shared messages which we need to work throughout the community. Attendees Registration for PowerShell Deep Dive will be capped at 100 people as it has been design...

Looking for your Feedback
Jan 18, 2011
Post comments count 0
Post likes count 0

Looking for your Feedback

PowerShell Team
PowerShell Team

The great folks that provide documentation and guidance for Windows Server are looking for your feedback! First off, there’s a survey: http://vp-nri.com/take?i=162411&h=u7DzLZkqQEbm6e5zylI38A – primarily about PowerShell. This should take about ten minutes, and will help us better understand the issues you face every day. Whether you are into PowerShell as an IT Professional or, into it as a Power Tool – any information you can provide helps. Second, there’s the International Customer Advisory Board. Microsoft is building a worldwide community of IT Pros who want to share their frank opinions about our ...

A very touching final goodbye
Jan 13, 2011
Post comments count 0
Post likes count 0

A very touching final goodbye

PowerShell Team
PowerShell Team

The PowerShell community lost a great member last night. Carrying out one of his final wishes, his family posted this on Twitter last night: We are sad to tell you, Andy "the most passionate Powersheller" passed away on 12th Jan 2011, and wanted us to say goodbye to you all. Andy https://twitter.com/AndyTearle/status/25414783826141184 Rest in peace, Andy.   Update: 11:30 AM – The PowerScripting Podcast has a great post reminiscing about Andy, his family, and his passion: http://powerscripting.wordpress.com/2011/01/13/ripandrew-tearle-the-oldest-powersheller-of-them-all/.

Same Command. Different Return Types.
Dec 10, 2010
Post comments count 0
Post likes count 0

Same Command. Different Return Types.

PowerShell Team
PowerShell Team

My command seems to behave differently depending on how many items were returned. This is something that the PowerShell Team hears from the community or our internal partners every couple of weeks. This blog post will explain when a Windows PowerShell command returns different types and offer some reasons for why it is done this way. In general, Windows PowerShell commands can return one of three things: Executing the commands below returned each of the types listed above.  (Get-Service foobar).GetType() (Get-Service NetLogon).GetType() (Get-Service Net*).GetType() ...

The Great Dollar Dollar
Dec 4, 2010
Post comments count 0
Post likes count 0

The Great Dollar Dollar

PowerShell Team
PowerShell Team

No, I’m not talking about our newest rap single. I’m talking about PowerShell’s most hidden gem. The one you can show to most members of even the PowerShell team, and have them gasp – “oh, that’s cool! I gotta remember that!” And it’s not even for lack of documentation! Here are the first few lines of Get-Help about_automatic_variables: PS>Get-Help about_automatic_variables TOPIC     about_Automatic_Variables SHORT DESCRIPTION     Describes variables that store state information for Windows PowerShell.     These variables are created an...

PowerGUI Scripting Challenge
Nov 5, 2010
Post comments count 0
Post likes count 0

PowerGUI Scripting Challenge

PowerShell Team
PowerShell Team

One of the best ways to learn a technology or take your understanding to the next level is to challenge yourself by entering a contest.   Well, here is your opportunity.  The Quest Software PowerGUI Challenge contest is currently ongoing and finishes on November 15th, 2010.  This contest gives you an opportunity to win a gift certificate for Amazon.com (you can win a certificate worth up to $1000) while having fun with PowerShell and learning more about PowerGUI, a PowerShell script editor and management console.   PowerShell Version 2 provided SO MANY new functions and capabili...

Domain Specific Languages (DSLs) – In General and How PowerShell Relates
Oct 8, 2010
Post comments count 0
Post likes count 0

Domain Specific Languages (DSLs) – In General and How PowerShell Relates

PowerShell Team
PowerShell Team

While attending JAOO, I had the great pleasure to meet and talk with Martin Fowler and Neil Ford on the topic of Domain Specific Languages (DSLs).  Channel 9 videotaped that discussion and you can watch it HERE. I'm quite passionate about DSLs - both FOR them and AGAINST them.  The details matter! I have this concept called, "Beer Cardinality" and it applies to DSLs.  Here is the way it works: Have no beers  => Yawn!Have 1 beers    => What's the point?Have 2-6 beers => Happy Happy!Have 24 beers  => Vomiting, hangovers, regret regret regret DSL...

“A jug fills drop by drop” – Quest PKI Cmdlets
Oct 4, 2010
Post comments count 0
Post likes count 0

“A jug fills drop by drop” – Quest PKI Cmdlets

PowerShell Team
PowerShell Team

The Buddha once said that, “A jug fills drop by drop”.  In this case, the jug is universal PowerShell cmdlet coverage which is a really large jug!  We’ve never been confused on this point – I’ve often referred to it as the “30 year hole” that we needed to dig ourselves out of.  When PowerShell V1 shipped, it had a very small number of cmdlets.  It was mostly used by advanced scripters to script their own solutions.  Soon afterwards, the Exchange team released 400+ cmdlets and then it was reasonable for Exchange admins to manage their Exchange task...

Designing Cmdlets That Have Lots of Parameters
Sep 3, 2010
Post comments count 0
Post likes count 0

Designing Cmdlets That Have Lots of Parameters

PowerShell Team
PowerShell Team

We often get the question of what to do about a cmdlet that has lots of parameters.  Do you break it up into multiple commands or just have a single cmdlet with lots of parameters.  Here is the way I think about it: If you have to enter 100 things to get a job done, it doesn’t really matter whether you enter those 100 things via 1 cmdlet with 100 parameters or 10 cmdlets with 10 parameters each.  If anything, there are a number of good reasons to have 1 cmdlet with 100 parameters including the fact that you don’t have to enter 10 cmdlets and you produce an abstraction which is much more friendly t...

Intel vPro PowerShell Module
Jul 20, 2010
Post comments count 0
Post likes count 0

Intel vPro PowerShell Module

PowerShell Team
PowerShell Team

Intel has released version 1.0 of their Intel Core vPro PowerShell Module.  This set of cmdlets do Out-of-Band hardware management of devices that are equipped with the vPro chip.  What that means is that you can do a certain amount of management on devices that don’t have an OS or whose OS is hung (if you are using one of our competitor’s OSes .. or haven’t upgraded to the awesome W7 ).   This allows you do things like turn machines on or off, change the boot sequence, change power plans etc. Now in all honesty, this module provides you nothing new.    You could always use the WINRM executable to perform thes...

PowerShell V2.0 Book Available in Italian
Jun 26, 2010
Post comments count 0
Post likes count 0

PowerShell V2.0 Book Available in Italian

PowerShell Team
PowerShell Team

Efran Cobisi has published a PowerShell V2 book in Italian.  The title is “Windows PowerShell 2.0 – Guida completa” and is a 448 pages long.  Efran describes it as “a collection of theory, insides and hints on the scripting environment, the programming language and the most used cmdlets. It’s targeted to both developers and IT professionals and contains many sections devoted to help people with previous experiences "with other shells (CMD, COMMAND.COM, BASH, KSH, CSH, ...) as well.” If you can read Italian, you can find out more about it HERE. Sadly I don’t read Italian but I’ve visited Rome a number of tim...

Improving Parameter Set Design
Jun 25, 2010
Post comments count 0
Post likes count 0

Improving Parameter Set Design

PowerShell Team
PowerShell Team

Designing useable cmdlets is part engineering and part art. It’s not an easy task to define the conceptual boundaries of a cmdlet (where does one cmdlet end and the next begin) or to provide great feature control without inundating the user with parameters. However, you can improve the usability of your cmdlets by avoiding two common parameter set design flaws. Parameter sets with no mandatory parameters Some cmdlets, like Get-Process, can be run without any parameters, so you'd expect them to have at least one parameter set with no mandatory parameters. But look at the syntax of Get-WmiObject. The firs...

Using New-WebServiceProxy to get, modify, and add items to a list in SharePoint 2007
Jun 24, 2010
Post comments count 0
Post likes count 0

Using New-WebServiceProxy to get, modify, and add items to a list in SharePoint 2007

PowerShell Team
PowerShell Team

The motivation Let’s say that you want to retrieve and modify a list in a SharePoint site, but you don’t have access to Microsoft.SharePoint.dll. One possible solution is to try to search online or ask someone to let you copy the dll. If you are able to get a hold of it, you will quickly realize that the Microsoft.SharePoint.dll has some dependencies and that you are stuck again. Well, I will show you how you can get, modify and add items to a list in SharePoint using PowerShell V2. Pre requisites: First, you need a SharePoint site and credentials to modify that particular list. The illustration below shows...

Windows PowerShell 2.0 on Windows Update
Jun 22, 2010
Post comments count 0
Post likes count 1

Windows PowerShell 2.0 on Windows Update

PowerShell Team
PowerShell Team

Today, we released Windows PowerShell 2.0 and WinRM 2.0 for pre-Windows 7 operating systems on Windows Update. This non-security, optional update is designed for Windows Server 2008 SP2, Windows Vista SP2, Windows Server 2003 SP2, and Windows XP SP3. Windows PowerShell 2.0 and WinRM 2.0 are also available as part of  the Windows Management Framework (WMF) Core Package on the  Microsoft Download Center and Windows Server Update Services (WSUS). The WMF Core Package available on the Microsoft Download Center and the Windows Update release contain the same binaries of the product...

Specifying a View in TechNet and MSDN URIs
Jun 21, 2010
Post comments count 0
Post likes count 0

Specifying a View in TechNet and MSDN URIs

PowerShell Team
PowerShell Team

[This isn't only a PowerShell topic, but I've been asked a few times, so I thought I post the answer here.] If you've visited TechNet or MSDN lately, you'll notice that there are new view options for the pages. TechNet has a new ScriptFree view, in addition to the familiar Classic view. MSDN has two new views, ScriptFree and Lightweight. When you change your page view, your preference is saved and new pages that you open are shown in the saved view until you change your view again. If you are linking to a page, you can specify a view in the link. This allows you to determine how users see the linked page. For exa...

PowerShell Integration Into Visual Studio
Jun 21, 2010
Post comments count 0
Post likes count 0

PowerShell Integration Into Visual Studio

PowerShell Team
PowerShell Team

Quest has released a beta of PowerGUI Visual Studio (aka PowerGUI VSX).  Check out Kirk Munro’s blog entry HERE for more details.  Check out this screenshot:   I can’t wait to install it and kick the tires! Jeffrey Snover [MSFT] Distinguished Engineer 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  

Kudos to NetApp for Data ONTAP PowerShell ToolKit
Jun 15, 2010
Post comments count 0
Post likes count 0

Kudos to NetApp for Data ONTAP PowerShell ToolKit

PowerShell Team
PowerShell Team

Kudos to NetApp for releasing the Data ONTAP PowerShell Toolkit last week at TechEd. I was monitoring the twitter feeds last week and saw a flurry of activity talking about NetApp’s broad adoption of PowerShell and release of the Data ONTAP PowerShell Toolkit surfacing all of their management functionality through cmdlets. I decided to investigate and headed to the NetApp booth where I saw an awesome, live automated, disaster recovery demo driven entirely by PowerShell. We’re talking automated failover to a remote site in less than three minutes using a combination of the NetApp cmdlets, cluster cmdlets and wha...

Export and Import PowerShell ISE Opened Files
Jun 4, 2010
Post comments count 0
Post likes count 0

Export and Import PowerShell ISE Opened Files

PowerShell Team
PowerShell Team

Unlike other tools, PowerShell ISE doesn’t have project files. Project files are a good way to set your environment up with a well known state. Thanks to the ISE Object Model, it is possible to add some project functionality. The script below has two main functions “Export-ISEState” and “Import-ISEState”. They can be used to save files and PowerShellTabs and reopen them later. Even script contents for untitled files are saved. To save the current state (state = files and PowerShellTabs), use something like:     Export-ISEState c:\temp\files.isexml To load the state la...

Save All PowerShell ISE files
Jun 4, 2010
Post comments count 0
Post likes count 0

Save All PowerShell ISE files

PowerShell Team
PowerShell Team

PowerShell ISE is a simple tool and in some cases it has the bare essentials. For instance, it does not have an option to save all files. On the flipside, it offers an Object Model from its first version that allows adding features beyond the essentials like this one and many more.  If we had the "Save All" option in the ISE, one interesting question is what to do about untitled files. They are supposed to be transient. One could argue that Save All could just skip untitled files. Another could argue that we should just pick a name for untitled, but I would disagree with "another" :-) Picking a na...

Renaming Tabs in the ISE
May 25, 2010
Post comments count 0
Post likes count 0

Renaming Tabs in the ISE

PowerShell Team
PowerShell Team

When you have multiple PowerShell tabs open in the ISE, it may be handy to rename them, so you can tell which is which.  This is especially useful when using Remoting with Enter-PSSession.  The problem when using Enter-PSSession is that you have no access to the root ISE object ($psise) when remoting, so you should use another (local) tab and enter the following:    $psise.PowerShellTabs[0].DisplayName = 'myRemoteMachine' Needless to say, if you want to rename the second tab, you'd use PowerShellTabs[1] ... and so on To rename the current PowerShell tab, enter:    $psise.Curren...

PowerShell V2 IS Available
May 14, 2010
Post comments count 0
Post likes count 0

PowerShell V2 IS Available

PowerShell Team
PowerShell Team

Superstar Tobias Weltner (of PowerShell.com and Powershell Plus fame) sent me some mail today pointing to this May 14th article Three Essential PowerShell 2.0 Remote Management Features.  It is a very good article except for this part: “PowerShell 2.0 is built into Windows Server 2008 R2 and Windows 7. For older operating systems, PowerShell 2.0 is scheduled to be available a few months down the road and will include support for Windows XP SP3, Windows Server 2003 SP2, Windows Vista SP1 and Windows Server 2008.”   That is not right.  PowerShell V2 has been available for these OS for quite some t...

PowerShell Resource Page at Windows IT Pro
May 12, 2010
Post comments count 0
Post likes count 0

PowerShell Resource Page at Windows IT Pro

PowerShell Team
PowerShell Team

Windows IT Pro magazine has created a PowerShell Resource Page HERE.  It provides a nice easy way to get at all of Don Jones’ articles.  Don is a superstar explainer of all things PowerShell so if you aren’t already following him, do yourself a favor and go read his stuff over on Windows It Pro.  Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer 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

Smiling, Crying, and Scripting
May 6, 2010
Post comments count 0
Post likes count 0

Smiling, Crying, and Scripting

PowerShell Team
PowerShell Team

I once heard that everyone in the world smiles and cries the same way - that language and culture had no effect on these. I thought of that when I navigated to: http://www.computerworld.jp/topics/mws/180709.html I have ABSOLUTELY no clue what they are saying but in the middle of the article I saw this:   I guess everyone in the world scripts the same way too.  Given that they are scripting in PowerShell, I bet they are also smiling!  :-) Experiment!  Enjoy!  Engage! Jeffrey Snover [MSFT] Distinguished Engineer Visit the Windows PowerShell Team blog at:    ht...

Select-String -Context
May 6, 2010
Post comments count 0
Post likes count 0

Select-String -Context

PowerShell Team
PowerShell Team

A lot of people use Select-String but I haven’t seen much discussion of the –Context parameter.   This is an awesome feature that we added in V2.  If you haven’t tried it, you should spend a few minutes experimenting.  I can guarantee you that will you be glad you did. Let’s see what the HELP has to say about the Context parameter:   PS> Get-Help Select-String -Parameter Context -Context <Int32[]>     Captures the specified number of lines before and after the line with the m     atch. This allows you to view the match in context. &#1...

Configuring WSMAN Limits
May 2, 2010
Post comments count 0
Post likes count 0

Configuring WSMAN Limits

PowerShell Team
PowerShell Team

As you probably know by now, all of PowerShell remoting is done via streaming extensions to WSMAN.  WSMAN is the SOAP-based DMTF standard protocol for managing everything.  As you explore the limits of what you can do with WSMAN or PowerShell remoting, you may encounter errors like this: [7592:0]PS> New-PSSession [localhost] Connecting to remote server failed with the following error me ssage : The WS-Management service cannot process the request. This user is allowed a maximum number of 5 concurrent shells, which has been exceeded. Close existing shells or raise the quota for this user. For more inf...

A PowerShell Wander:  ToolBox Mindset, –ExpandProperty, DMZs and Remote Profiles
May 1, 2010
Post comments count 0
Post likes count 0

A PowerShell Wander: ToolBox Mindset, –ExpandProperty, DMZs and Remote Profiles

PowerShell Team
PowerShell Team

I was reading PowerShell remoting in Windows Server 2008 R2.  The great thing about this article is that it documents how to use Group Policy to enable PSRemoting on lots of machines automatically.  In the article there was the following heads up: Warning: Commands that are executed against a remote machine do not have access to information defined within your local profile. As such, commands that use a function or alias defined in your local profile will fail unless they are defined on the remote machine as well. The great thing about PowerShell is that it is a toolbox.  The great thing about t...

MMS Partner Presentation:  Windows Management Framework
Apr 23, 2010
Post comments count 0
Post likes count 0

MMS Partner Presentation: Windows Management Framework

PowerShell Team
PowerShell Team

MMS Partner Day focuses on ISVs that produce products for Windows and System Center.  I talked to them about the Windows Management Framework (WMF) and encouraged them all to check it out and begin using it to build their products.  WMF is a download which combines PowerShell V2,  WINRM 2.0 and BITS 4.0 and is available on XP SP3 and above machines.  I’ve attached the PPT below.  The Call to Action for this talk was: Provide your managed components as: WMI providers CIM schema surfaced via WSMAN (if you aren’t running on windows e.g. a network device) PowerShell Cmdlets Consume BOTH W...

Windows PowerShell in Bing Visual Search
Apr 19, 2010
Post comments count 0
Post likes count 0

Windows PowerShell in Bing Visual Search

PowerShell Team
PowerShell Team

Beginning today, there's a new way to look at Windows PowerShell cmdlets. You're used to looking at them this way: Or, perhaps, this way: But would you like to look at them this way? What if getting a list of the remoting cmdlets was as easy as clicking a category name? And you could filter to display only the remoting configuration cmdlets? What if you could get a quick peek at a cmdlet help topic by clicking a Bing Visual Search tile? (See the "Help Online" link?) Welcome to the Windows PowerShell Cmdlets Gallery in Bing Visual Search. To see it, go to http://go.microsoft.com/fwlink/?LinkID=19043...

PowerShell V2 Open Panel Discussion Tonight
Apr 8, 2010
Post comments count 0
Post likes count 0

PowerShell V2 Open Panel Discussion Tonight

PowerShell Team
PowerShell Team

Tonight’s version of the PowerScripting Podcast is going to be an Open Panel discussing PowerShell V2 including the following topics:   If you’ve never tuned into the PowerScripting Podcast, you should.  It is both fun and informative.  Tonight’s podcast is happening at 9:30 EDT (6:30 PST).  You can find out more information HERE. You can listen in on USTREAM HERE. I hope to see you there tonight!. Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell Visit the Windows PowerSh...

Announcing Scripting games 2010
Apr 5, 2010
Post comments count 0
Post likes count 0

Announcing Scripting games 2010

PowerShell Team
PowerShell Team

Scripting Guys have set the ball rolling for another fun filled and intresting edition of Scripting Games. You can see details here http://blogs.technet.com/heyscriptingguy/archive/2010/04/05/2010-scripting-games-all-links-on-one-page.aspx Grab this badge here!  

Testing cmdlets with FxCop
Mar 30, 2010
Post comments count 0
Post likes count 0

Testing cmdlets with FxCop

PowerShell Team
PowerShell Team

Windows PowerShell wouldn’t be very useful without all the great cmdlets that actually manage specific technologies.  We want to help cmdlet developers to create high-quality cmdlets.  Today we announce availability of FxCop rules that can be used to verify compliance with some of the Cmdlet Design Guidelines as well as to find some of the common bugs. Installation Use the following procedure to download the required components: Use the following procedure to configure Microsoft FxCop to run FxCop Rules for Windows PowerShell on your code: Please refer to the FxCop Rules ...

“Falling is Learning – Just Focus on Having Fun”
Mar 9, 2010
Post comments count 0
Post likes count 0

“Falling is Learning – Just Focus on Having Fun”

PowerShell Team
PowerShell Team

Back in the days when our hair was on fire with security issues, we brought in a number of industry experts to educate us on developing secure software.  This resulted in the Security Development Lifecycle which all our products now use.  One of the best talks was a from a guy from the NSA who had a talk that was something along the lines of, “The zen of secure software”.  In this talk he argued against the all-or-nothing mindset in favor of a model of constantly expanding the envelope.  Any given moment, you evaluate what you need to do (in this case – to address security issues),  you d...

Fun – Is W7 Too Good?
Mar 7, 2010
Post comments count 0
Post likes count 0

Fun – Is W7 Too Good?

PowerShell Team
PowerShell Team

Sean Kearney (aka Ye110beard of Highway to PowersHell fame ) sent me a pointer to a fun video which posits that maybe W7 is TOO good.  Just maybe it is so good that it will put IT Pros out of business.  I think the exact opposite is true - I think PowerShell and the ability script the OS and products allows IT Pros to generate a ton of value and increase their integrated lifetime earnings.  Still it is a fun video.  You can catch it HERE. Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell ...

PSStandardMembers – The Stealth Property
Feb 18, 2010
Post comments count 0
Post likes count 0

PSStandardMembers – The Stealth Property

PowerShell Team
PowerShell Team

Today I got the question I’ve looked into all of my.format.ps1xml files but I can’t find out where Format-List is getting its default view for, say, System.Diagnostics.Process: PS> ps |select -first 1 |fl Id      : 7616 Handles : 543 CPU     : 10.6860685 Name    : CmdletDesigner How does it know it should display just these four properties? It seems there isn’t any ListControl view selected by this type within those formatting files... Excellent question!  Let’s pick behind the curtain and see how it ...

Windows Management Framework Install Failure and Investigation
Feb 15, 2010
Post comments count 0
Post likes count 0

Windows Management Framework Install Failure and Investigation

PowerShell Team
PowerShell Team

Since Windows Management Framework was released Oct. 2009, our customers have been excited about using PowerShell 2.0 on down-level OSes. Meanwhile, we also received feedback from both internal and external customers about our product issues. One of them is WMF install failure followed by the mysterious “The update does not apply to your system” error message. It is a blocking issue for some customers since they cannot get WMF successfully installed and the error message does not help much with a fix. 1. Reinstall. In some cases WMF(KB968930) had already been deployed on the machine by the system administrato...

Building on PowerShell: Execution Policies
Feb 12, 2010
Post comments count 0
Post likes count 0

Building on PowerShell: Execution Policies

PowerShell Team
PowerShell Team

One question we sometimes get asked is why Exchange changes PowerShell’s execution policy from “Restricted” to “RemoteSigned.” Doesn’t that lower PowerShell’s security? The "Restricted" execution policy isn't intended to be something that PowerShell users live with forever. It's a safe default that protects non PowerShell users from being impacted by PowerShell-based malware. For example, many home users had never used VBScript, but still got bitten by the flurry of WSH-based viruses that got mailed to them. PowerShell's Restricted execution policy solves this. To an attacker, a computer that has never used Power...

Workaround to Catch Exceptions from Import-CliXml
Feb 11, 2010
Post comments count 0
Post likes count 0

Workaround to Catch Exceptions from Import-CliXml

PowerShell Team
PowerShell Team

Recently, I came across an interesting bug in PowerShell. Let’s create a repro. First, we create a string “a” and generate an xml based representation of it using the Export-Clixml cmdlet. Since we need to have the class id, we pipe the string to format-table as shown in the example below. Here is the content of the xml file. Then, we remove the class id (in blue) and save the xml file. Next, we recreate an object using the import-cliXml cmdlet and we assign it to a variable, i.e. $a. We should get an exception because the class id is missing but, we do not. On the other hand, if we execute the same co...

Viewing Junctions with ‘dir’
Feb 9, 2010
Post comments count 0
Post likes count 1

Viewing Junctions with ‘dir’

PowerShell Team
PowerShell Team

One feature of the NTFS file system is the junction, which is similar to a short cut but works at the file system level. This lets you link one directory to another. There’s a tool called ‘junction’ available here that lets you manipulate junctions. When listing the contents of a directory, by default PowerShell doesn’t tell you which sub-directories are junctions. I wanted to be able to tell which ones were junctions when doing a ‘dir’. The way I did that was to copy the built in file system formatting file, modify it so that junctions are indicated, then load it with Update-FormatData: The file system format...

Get Localized PowerShell Help Files
Feb 8, 2010
Post comments count 0
Post likes count 0

Get Localized PowerShell Help Files

PowerShell Team
PowerShell Team

The Windows PowerShell core help files that were included in Windows 7 RTM were localized into ten languages. You can download the XML and TXT versions of these localized files and use them in your Windows PowerShell projects. The Windows PowerShell core help files are localized into the following languages:   ·         de-de                    (German-Germany) ·         es-es         &...

PDC09 SVR12 and SVR13 Slides
Feb 8, 2010
Post comments count 0
Post likes count 0

PDC09 SVR12 and SVR13 Slides

PowerShell Team
PowerShell Team

Slides for the two PDC 09 sessions - SVR12 and SVR13 attached. Enjoy Cheers Nana [MSFT] --- Narayanan Lakshmanan [MSFT] DeveloperVisit 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 Slides.zip

The PowerScripting Centennial
Jan 26, 2010
Post comments count 0
Post likes count 0

The PowerScripting Centennial

PowerShell Team
PowerShell Team

99 podcasts of Pure Power. That’s what the PowerScripting Podcast has been churning out for almost three years! Well, this week is extra special, as you might imagine from the title of this post. On Thursday, they record episode one hundred: a huge milestone by any means. A testament to dedication and passion. Episode #100 looks like it’s going to be fun: tips, tricks, and who knows what else. Join em’ live on UStream if you want to be part: Come check out our live video stream as we record the show! We usually air every Thursday at 9:30pm EST (GMT-5), unless otherwise noted on our blog. (Live video) (add to...

Use The Right Version of PowerShell.
Jan 25, 2010
Post comments count 0
Post likes count 0

Use The Right Version of PowerShell.

PowerShell Team
PowerShell Team

A number of recent problems that users have reported can be tracked down to using incorrect versions of PowerShell.  Tobias Weltner (of PowerShell Plus fame) blogged the details of issue and want you need to do to ensure you are running the right copies.  The blog title is Are you using the correct PowerShell version?  You should definitely check this out. Experiment!  Enjoy!  Engage! Jeffrey Snover [MSFT] Distinguished Engineer Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at:  http:...

PowerShellHostVersion – WTF?
Jan 23, 2010
Post comments count 0
Post likes count 0

PowerShellHostVersion – WTF?

PowerShell Team
PowerShell Team

Superstar Shay Levy recently wrote a blog article, Module Manifest Gotcha .  He was exploring the various options that the Module Manifest provides and saw what he thought was a problem with using the PowerShellHostVersion key. PowerShellHostVersion key Specifies the minimum version of the Windows PowerShell host program that works with the module. The “gotcha” here is that there are LOTS of PowerShell Hosts:  PowerShell.exe,  Powershell_ISE.exe, PowerGUI, Sapien’s PrimalScript, PowerShellPlus and others (apologizes in advance to those I forgot to mention).   Shay created a manifest with...

Get Great Software and Help Haiti
Jan 19, 2010
Post comments count 0
Post likes count 0

Get Great Software and Help Haiti

PowerShell Team
PowerShell Team

I’m always impressed by the level of creativity of the people in the PowerShell community.  I remember having my socks knocked off the first time I saw what SoftwareFX did with PowerGadgets.  I could not believe the things that they were doing.  In fact I couldn’t even figure out how they were doing some of them!  Well the superstars at SoftwareFX have engaged their creative sides once again, this time to help Haiti.  They have just announced the PowerShell Haiti Relief Offer where they are offering a copy of PowerGadgets for 50% off and will contribute all the money to organizations he...

How objects are sent to and from remote sessions
Jan 7, 2010
Post comments count 0
Post likes count 2

How objects are sent to and from remote sessions

PowerShell Team
PowerShell Team

Instead of piping unstructured text, Windows PowerShell pipes objects between commands in a pipeline.  As a consequence PowerShell remoting also deals with objects when passing data to and from remote sessions.  This post explains how remote objects are serialized and which types of objects can be sent with full fidelity.  You might want to refer to this post when passing arguments to remote commands or when designing remoting-friendly cmdlets or functions. Property bags You might have noticed “Deserialized” prefix in front of type names of some objects received from a remote session: Objects ...

TB & PB
Jan 7, 2010
Post comments count 0
Post likes count 0

TB & PB

PowerShell Team
PowerShell Team

“To ship is the choose.”  That is the sad reality behind a number of the things that we regretted about V1.  When we first started the project (a LONG time ago) we knew that we wanted to close the semantic gap between what admins thought and what they had to type.  Imagine that you wanted to find all the processes that had greater than 15MB of workingset.  Who the heck could type in the following: PS>  Get-Process |where {$_.Workingset –ge ?????} What?  You didn’t know that 15MB was 15728640 bytes?  Yes you should have written: PS>  Get-Process |where {$_.Workingse...

TB & PB
Jan 7, 2010
Post comments count 0
Post likes count 0

TB & PB

PowerShell Team
PowerShell Team

“To ship is the choose.”  That is the sad reality behind a number of the things that we regretted about V1.  When we first started the project (a LONG time ago) we knew that we wanted to close the semantic gap between what admins thought and what they had to type.  Imagine that you wanted to find all the processes that had greater than 15MB of workingset.  Who the heck could type in the following: PS>  Get-Process |where {$_.Workingset –ge ?????} What?  You didn’t know that 15MB was 15728640 bytes?  Yes you should have written: PS>  Get-Process |where {$_.Workingse...

Workaround for Start-Transcript on native processes
Jan 4, 2010
Post comments count 0
Post likes count 0

Workaround for Start-Transcript on native processes

PowerShell Team
PowerShell Team

Introduction Recently, we came across an interesting bug that had been around for awhile (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=315875). If you do the following: Start-Transcript ipconfig Stop-Transcript If you look at the transcript, you’ll see that the output of ipconfig was not captured. Why is this happening? PowerShell recognizes that ipconfig is a native console application. Since many of these applications do direct writes to the console buffer (i.e. more.com, edit.com etc.), we don’t direct the output handles. Because of that, we can’t capture their outpu...

Scorecarding My 2009 Resolutions
Jan 1, 2010
Post comments count 0
Post likes count 0

Scorecarding My 2009 Resolutions

PowerShell Team
PowerShell Team

A year ago I broke my habit and made a set of News Years resolutions and then published them on the team blog HERE.  Lee Holmes suggested I go back and review how I did on those.  Glug!  Let’s give it a go:   All and all, I’m very happy with the year but there are still lots of opportunity to improve. Experiment!  Enjoy!&#...

Saving remote session to your local disk
Dec 29, 2009
Post comments count 0
Post likes count 0

Saving remote session to your local disk

PowerShell Team
PowerShell Team

Read the previous post on implict remoting to learn how the Import-PSSession cmdlet makes it easier to work with remote commands by presenting them as if they were local commands. This user experience saves you the trouble of typing long Invoke-Command incantations to pass arguments to remote commands or to download remote help content. The next great thing would be to jump straight into the implicit remoting experience without having to explicitly set up a remote session each time and having to remember how to invoke Import-PSSession... This is where Export-PSSession cmdlet comes handy - it can be used to save...

Bringing remote commands to your local session
Dec 29, 2009
Post comments count 0
Post likes count 0

Bringing remote commands to your local session

PowerShell Team
PowerShell Team

How can you manage multiple technologies installed on separate machines that expose their management surface through cmdlets?  One approach would be to open remote desktop connection to each of those machines, another approach would be to send commands using Invoke-Command and PowerShell Remoting.  But remote desktop is not a feasible solution for automation and invoking remote commands using Invoke-Command cmdlet can sometimes get burdensome - tab completion is missing, verbose incantations are needed for passing arguments to remote commands and Get-Help -Online doesn't quite work in a remote session. ...

How to pass arguments for remote commands
Dec 29, 2009
Post comments count 0
Post likes count 0

How to pass arguments for remote commands

PowerShell Team
PowerShell Team

When invoking remote commands, one often wants to use local values as arguments to the remote command. This post explains how to do that. Hardcoded values Let's start with a simple example. Below you can see how Get-Process is invoked in a remote session when the Id parameter is set to 0: Passing local values What if we want to calculate the value of the Id parameter programmatically, instead of hard-coding it to a particular integer? Well, script blocks can declare parameters and the param block can be used to pass a value to the command that is being invoked. In the following example, we declare the $proce...

PowerShell Help Reader – WOW!
Dec 26, 2009
Post comments count 0
Post likes count 0

PowerShell Help Reader – WOW!

PowerShell Team
PowerShell Team

Alexey Martseniuk posted a blog entry in the PowerShell NewsGroup announcing a new version (V1.2) of the PowerShell Help Reader.  My first reaction is WOW! Start your wow experience by going to http://PowershellTools.Com and checking out the Silverlight-based intro screen.  (You’ll need Silverlight of course but you should have it anyway – it is awesome.)  This is the harbinger of things to come.  The installed app takes advantage of WPF to deliver an excellent help experience.  The basic edition of the product is free and contains all the features but works only for the built-in Power...

A Christmas Tree in WPK
Dec 25, 2009
Post comments count 0
Post likes count 0

A Christmas Tree in WPK

PowerShell Team
PowerShell Team

Merry Christmas.  To celebrate the holiday, here’s a quick Christmas tree written in WPK (the WPF PowerShell Kit).  You can get WPK as part of the PowerShellPack (http://code.msdn.microsoft.com/PowerShellPack). Here’s a screenshot: and Here’s the script: It’s only about 30 lines, but this script has tons of Christmas goodies.  It shows an example of how to create any random polygon with a simple list of points, how to resize that polygon to whatever size the control need to be, and how to apply a quick bitmap effect to an image. Hope this Helps, James

PowerShellPack Reaches 10,000 Downloads in 3 Months
Dec 23, 2009
Post comments count 1
Post likes count 0

PowerShellPack Reaches 10,000 Downloads in 3 Months

PowerShell Team
PowerShell Team

Just before the release of Windows 7, the Windows 7 Resource Kit PowerShell Pack was released.  Today, it hit 10,000 downloads. It contains 10 useful modules that help you do more with Windows PowerShell.  It has modules that can help every IT admin ( like the TaskScheduler module), and modules that can help any .NET developer (like PSCodeGen).  There’s also a nifty module, IsePack, which provides a set of tools for working with the Windows PowerShell Integrated Scripting Environment. It also contains WPK, a module that allows you to script rich WPF UIs with PowerShell. If you haven’t taken the t...

Windows PowerShell 2.0 SDK
Dec 23, 2009
Post comments count 0
Post likes count 0

Windows PowerShell 2.0 SDK

PowerShell Team
PowerShell Team

Windows PowerShell 2.0 Software Development Kit (SDK) is now available for download. This SDK contains sample code and reference assemblies that allow you to build applications based on Windows PowerShell. The samples demonstrate how to use the Windows PowerShell 2.0 APIs. You will also find sample code that shows how to use the new PowerShell class, how to write cmdlets that supports eventing, transactions and jobs. In addition, there are examples of host applications that connect to remote computers using individual runspaces and runspace pools. This SDK release also include modified Windows PowerShell 1....

New-Object PSObject –Property [HashTable]
Dec 4, 2009
Post comments count 2
Post likes count 0

New-Object PSObject –Property [HashTable]

PowerShell Team
PowerShell Team

Gosh that is a horrible looking thing.  This is one of the things we fixed with PowerShell V2 so you take a few minutes to learn this so you never have to do that mess again.  Let’s get some help: PS> Get-Help New-Object -Parameter Property -Property <hashtable>     Sets property values and invokes methods of the new object.     Enter a hash table in which the keys are the names of properties or methods and the values are property value     s or method arguments. New-Object creates the object and sets each property value and invo...

You Don’t Have to Be An Administrator to Run Remote PowerShell Commands
Nov 22, 2009
Post comments count 0
Post likes count 0

You Don’t Have to Be An Administrator to Run Remote PowerShell Commands

PowerShell Team
PowerShell Team

I was just read blog entry which complained about having to have administrative access to execute PowerShell commands against a remote server.  This is not the case. We are “secure by default” which means that if you want to do something that exposes a security risk to your machines, you have to make a conscious decision to do so.  We are secure by default so that you can feel confident in putting PowerShell on all your machines.  Your risks are a function of the decisions you make after  you install PowerShell and we’ll educate you about the risks and benefits of those decisions.  (Run ...

Windows PowerShell and the Windows Management Framework
Nov 19, 2009
Post comments count 0
Post likes count 0

Windows PowerShell and the Windows Management Framework

PowerShell Team
PowerShell Team

There’s been a lot of great excitement that’s accompanied the release of PowerShell V2 and Windows Remote Management (WinRM) – also known as the Windows Management Framework. We’ve also heard the occasional question on whether it’s possible to install them independently. When we’ve heard this concern, it is usually focused on security. To be clear, Windows Remote Management (WinRM) has been part of Windows since Vista and Server 2008. It does not listen to network connections by default, and must be explicitly activated. Both have advanced greatly during the release of Windows 7 – most notably by working togethe...

PDC09 SVR12 and SVR13 Session Demos
Nov 18, 2009
Post comments count 0
Post likes count 0

PDC09 SVR12 and SVR13 Session Demos

PowerShell Team
PowerShell Team

Attached are the demos and slides from the PDC sessions SVR12 and SVR 13 today. Here are the steps you need to do before you can run them 1. Unzip the files and run setup\setup.ps1. This will configure user accounts and initialize some files required 2. Change computers.dat in service\roles\. Set it to the computers that you want to connect to 3. Edit Impersonation\Get-DelegationCredential.ps1 under each folder - Inventory, Service and Employee (Please Note: This script is intended only for demo purposes and is not recommended to be copied for production 4. Set the paths in app.xaml.cs in each of the visual studi...

I Can Do That With 1 Line of PowerShell: Installed Software
Nov 15, 2009
Post comments count 0
Post likes count 0

I Can Do That With 1 Line of PowerShell: Installed Software

PowerShell Team
PowerShell Team

Ying Li has a cool PowerShell Script to list installed Software on a local computer HERE.  When I looked at it and thought to myself, I can do that with 1 line (if I cheat a little).  Here it is: PS> gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |Select DisplayName, DisplayVersion, Publisher, InstallDate, HelpLink, UninstallString |ogv   Here is what  you get for that 1 line of code:   I cheated by using OGV  (Out-GridView).  Ying used Excel and the output is nicer.  But when you only want to spend a single line…  :-)   Experiment!&...

SRV312 TechEd Slides
Nov 12, 2009
Post comments count 0
Post likes count 0

SRV312 TechEd Slides

PowerShell Team
PowerShell Team

I just gave the talk, "”Server Management Improvements and Solutions for Windows Server 2008 R2”.  It went over rather well.  Attached are the slides.  I will try to get you the demos but that will be difficult and will take some time. Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer 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 SRV312_Snover.pptx

Windows Server 2008 R2 Rocks!
Nov 9, 2009
Post comments count 0
Post likes count 0

Windows Server 2008 R2 Rocks!

PowerShell Team
PowerShell Team

One of the things I like to say is that, “Microsoft is incapable of sustained error”.  By that I mean that Microsoft is an intensely self-conscious culture, fearless about confronting shortcomings and  constantly looking for ways to do things better.  We beat ourselves up pretty brutally about the shortcomings of Vista and committed ourselves to doing better going forward.  This is one of the reasons why Windows Server 2008 was such a good release.  We didn’t stop there, we raised the bar for Windows 7 and Windows Server 2008 R2. Part of that was the product itself.  Anyone that use...

PowerPack Challenge
Nov 5, 2009
Post comments count 0
Post likes count 0

PowerPack Challenge

PowerShell Team
PowerShell Team

Quest Software’s PowerPack Challenge’09 is on... calling all script warriors to show their skills. See the details here - http://powergui.org/powerpackchallenge.jspa Happy Scritping Osama Sajid, Program Manager

Why is Get-ChildItem so Slow?
Nov 4, 2009
Post comments count 0
Post likes count 0

Why is Get-ChildItem so Slow?

PowerShell Team
PowerShell Team

We get this question fairly frequently when it comes to slow network connections. The performance of directory listings (especially on a laggy network) are limited by the .NET APIs we call to retrieve the directory information. There are two limitations to the current set of APIs: Forced Retrieval of Attributes When we do a directory listing, we show the standard attributes of the file or directory: Mode, LastWriteTime, Length, and Name. The core Windows API is highly optimized for this basic scenario, and returns these attributes by default along with the rest of the file information. However, the .NET Framew...

Workaround for Add-Member on plain .Net objects
Nov 3, 2009
Post comments count 0
Post likes count 0

Workaround for Add-Member on plain .Net objects

PowerShell Team
PowerShell Team

Introduction While I was fixing bugs, I came across an interesting bug (https://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=382818) that seemed to have a very simple fix upon first glance. However, after doing some more research, I found out that it was actually very tricky to fix the root cause. If you do the following: $table = @{ key1="val1"; key2="val2" } Add-Member -in $table -MemberType NoteProperty -Name test -Value testValue Now if you pipe $table to Get-Member you will notice that the test property is missing. No matter how many times you repeat t...

Quick, Dirty, Super-Useful Scripting
Oct 31, 2009
Post comments count 0
Post likes count 0

Quick, Dirty, Super-Useful Scripting

PowerShell Team
PowerShell Team

Last weekend I installed the super-awesome W7 Ultimate on all the machines at home.  This weekend I decided to install the XP Virtual mode download.  I started to do this and noticed that it was 500MB.  That is large and is going to take a long time FOR EACH PC I have.  One of the reasons I got the Ultimate SKU is that it has BranchCache.  This is EXACTLY what Branchcache was designed to do.  One PC downloads something and puts it into a distributed cache and then when the other PCs go to download it, they get it from their peers instead of from the internet (given the way my son rea...

Sending Automated emails with Send-MailMessage, ConvertTo-HTML, and the PowerShellPack’s TaskScheduler module
Oct 30, 2009
Post comments count 0
Post likes count 0

Sending Automated emails with Send-MailMessage, ConvertTo-HTML, and the PowerShellPack’s TaskScheduler module

PowerShell Team
PowerShell Team

On October 15th I released a large collection of scripts called the PowerShellPack.  The PowerShellPack has tons of PowerShell V2 scripts that can be used to do all sorts of fun and practical things.  Today, we’ll show how to use a module in the PowerShell Pack to schedule sending a daily automated email with information about the installed programs on a given system. Turning the output of a PowerShell script into an automated email is a snap in PowerShell V2, thanks to a nifty new cmdlet called Send-MailMessage.  Send-MailMessage sends out emails with the credentials of the current user (or an ar...

Windows Management Framework is here!
Oct 27, 2009
Post comments count 0
Post likes count 0

Windows Management Framework is here!

PowerShell Team
PowerShell Team

Windows Management Framework, which includes Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0, was officially released to the world this morning. By providing a consistent management interface across the various flavors of Windows, we are making our platform that much more attractive to deploy. IT Professionals can now easily manage their Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 machines through PowerShell remoting – that’s a huge win! You can download the packages here: http://go.microsoft.com/fwlink/?LinkID=151321   Lee Holmes [MSFT]

Tonight is the Virtual Launch Party @ PowerScripting Podcast
Oct 22, 2009
Post comments count 0
Post likes count 0

Tonight is the Virtual Launch Party @ PowerScripting Podcast

PowerShell Team
PowerShell Team

Tonight is the night!  I was super happy when we shipped V1 of PowerShell.  It started the journey.  That said, V2 is the release that we really wanted to release.  Today Windows 7 is publicly available and every version has PowerShell V2 in it.  Tonight – we party! I’ll be cracking a beer with Hal Rottenberg and Jonathan Walz (hosts of the PowerScripting Podcast) in a PowerShell V2 Virtual Launch Party tonight at 9:30 PM EDT (GMT-4).  For more details and info on how to join us go HERE.  I’m looking forward to seeing you.  Note, you can always watch the podcast af...

PowerShell V2 Virtual Launch Party
Oct 17, 2009
Post comments count 0
Post likes count 0

PowerShell V2 Virtual Launch Party

PowerShell Team
PowerShell Team

I’ll be joining Hal Rottenberg and Jonathan Walz (hosts of the PowerScripting Podcast) in a PowerShell V2 Virtual Launch Party this Thursday, Oct 22nd, 9:30 PM EDT (GMT-4).  For more details and info on how to join us go HERE. Hmmm, I wonder if it is BYOB… :-) Experiment!  Enjoy!  Engage! Jeffrey Snover [MSFT] Distinguished Engineer 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

Announcing: Open Source PowerShell Cmdlet and Help Designer
Oct 16, 2009
Post comments count 0
Post likes count 0

Announcing: Open Source PowerShell Cmdlet and Help Designer

PowerShell Team
PowerShell Team

http://www.codeplex.com/CmdletDesigner During the development of Windows 7, most cmdlet design and help authoring in Microsoft went through an internal tool called the “Cmdlet Designer.” The Cmdlet Designer makes it much easier for teams to concentrate on the design, naming, and consistency of their cmdlets, while also guaranteeing name registration and collision avoidance across Microsoft. To sweeten the deal, it offers: So why blog about it? Because it’s now yours! We just posted the entirety of the Cmdlet Designer, its source code, design specification, and deployment guide to ht...

Introducing the Windows 7 Resource Kit PowerShell Pack
Oct 15, 2009
Post comments count 0
Post likes count 0

Introducing the Windows 7 Resource Kit PowerShell Pack

PowerShell Team
PowerShell Team

Since I work on the PowerShell team, I’ve been lucky enough to get a couple of years jump start on producing PowerShell V2 scripts and modules.  With every new script I write in V2 I get more and more amazed by the possibilities in PowerShell.  I’ve discovered how to do many cool things that, as some of my colleagues outside of the PowerShell team have put it, have showed them the Power of PowerShell. At each CTP of PowerShell, I’ve tried to share this power of PowerShell here on this blog.  Thanks to Mitch Tulloch (the main author of the Windows 7 Resource Kit) and Ed Wilson (the Scripting Guy), I...

What's Up With Command Prefixes?
Sep 20, 2009
Post comments count 0
Post likes count 0

What's Up With Command Prefixes?

PowerShell Team
PowerShell Team

We like to say that PowerShell uses Verb-Noun naming.  If we were accurate, we would say that PowerShell uses Verb-PrefixNoun naming.  For instance: Get-WinEvent .  WIN is a prefix for Windows.  Every now and again people look at this and ask “what's up with command prefixes ?!?”.  Actually, the question usually comes from teams that are implementing Cmdlets and don't understand why they have to use prefixes.  They sometimes feel like their noun is unique or they want to own the noun or they think they may get reorganized into a different group so they are not sure what a good prefix...

Remoting for non-Admins
Sep 19, 2009
Post comments count 0
Post likes count 0

Remoting for non-Admins

PowerShell Team
PowerShell Team

Per Østergaard has a great blog entry with all the steps for enabling this HERE.  You’ll want to bookmark this one.  :-)   Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer 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

Select –ExpandProperty <PropertyName>
Sep 13, 2009
Post comments count 0
Post likes count 0

Select –ExpandProperty <PropertyName>

PowerShell Team
PowerShell Team

Most of us are familiar with the traditional use of Select –ExpandProperty <propertyname>.  This takes a the value of an incoming object, enumerates its values and outputs each of those values as a single record on the output stream after adding any properties specified by the –PROPERTIES <propertyname[]> parameter.  An example will help: PS> gps |Select -ExpandProperty Modules -ea SilentlyContinue |Group ModuleName |Sort Count |Select -Last 4 Count Name                      Group ...

The Glory of Quick and Dirty Scripting
Sep 12, 2009
Post comments count 0
Post likes count 0

The Glory of Quick and Dirty Scripting

PowerShell Team
PowerShell Team

One of the things I want us to consider doing in the future is to leverage our Universal Code Execution infrastructure to execute any kind of code. For example, imagine that I have some script foo.vbs, I’d like to do the following: PS>  Invoke-Command –FilePath foo.vbs –computer (cat servers.txt) I was about to file a record for us to consider this and thought – wait – I bet that there are other commands that take a FilePath need to be updated as well.  The question is – which commands take the FilePath parameter?   As I write this up, I now remember the correct solution to this question....

What’s New in PowerShell V2 –  By Joel “Jaykul” Bennett
Sep 11, 2009
Post comments count 0
Post likes count 0

What’s New in PowerShell V2 – By Joel “Jaykul” Bennett

PowerShell Team
PowerShell Team

PowerShell MVP Jaykul gave a presentation to the NY PowerShell user group and was kind enough to post the text of his slides HERE.  One of the problems I have in talking about V2 is that there is SO much good stuff that I often get the levelling wrong – spending too much time on one area and then needing to skip over others.  Jaykul slides are great because they tell the PowerShell V2 story at a consistent level.  You should definitely check them out and consider using this as a template if you need to give a PowerShell V2 talk to your friends. Good job! Enjoy! Jeffrey Snover [MSFT] Distingui...

Analyzing Weblog Data Using the Admin Development Model
Sep 11, 2009
Post comments count 0
Post likes count 0

Analyzing Weblog Data Using the Admin Development Model

PowerShell Team
PowerShell Team

Someone just tweeted a link to Scott Hanselman’s 2007 blog (an oldie but goodie) about how he used PowerShell to analyze the WebLog data from his podcasts.  He provides a beautiful example of I like to call the “Admin Development model”.  The whole point of the Admin Development Model is that you use tools to quickly and iteratively investigate things until you have an answer and then you are done or you take take the next step and capture the final solution into a script that you’ll use in the future.  Over time, if you use the script more and more often, you’ll add to it and make it more formal a...

XP and W2K3 Release Candidate Versions of PowerShell are Now Available for Download
Sep 10, 2009
Post comments count 0
Post likes count 0

XP and W2K3 Release Candidate Versions of PowerShell are Now Available for Download

PowerShell Team
PowerShell Team

Good things come to those who wait.  Please download these bits and let us know if you have any problems with them. https://connect.microsoft.com/windowsmanagement/Downloads  Just to be clear, this download contains the latest version of both PowerShell and WINRM. SNOOPY DANCE! Jeffrey Snover [MSFT]Distinguished EngineerVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx  

New and Improved PowerShell Connect Site
Sep 9, 2009
Post comments count 0
Post likes count 0

New and Improved PowerShell Connect Site

PowerShell Team
PowerShell Team

We have made changes to PowerShell connect site last month with the goal of making it easier for users to submit and share feedback. We also changed the page layout to make it more user friendly. Take a look at our new site https://connect.microsoft.com/PowerShell   Details of the changes made:  A.     Make it Open ·        Allow users to see a homepage with all the details about the program without login ·        Allow users to view any bug/feedback submitted without login. This would allow users to easi...

Help Us Improve Microsoft Windows Management Framework
Sep 8, 2009
Post comments count 0
Post likes count 0

Help Us Improve Microsoft Windows Management Framework

PowerShell Team
PowerShell Team

After WMF (Windows Management Framework ), i.e., the combined download package of  Powershell, WsMan and BITS,  for Vista and Windows Server 2008 was released to the Web on Aug. 13th, we can feel the high expectation for the final WMF releases from our customers. We would like you know your feedbacks are also crucial to help us achieve high product quality. Therefore, the message of this blog entry is simple: help us help you! If you have any feedback specific to the WMF Release Candidate, put your comments here. Thanks! Xin Li Windows PowerShell Team

Learn Windows PowerShell 2.0 with PowerGUI
Sep 7, 2009
Post comments count 0
Post likes count 0

Learn Windows PowerShell 2.0 with PowerGUI

PowerShell Team
PowerShell Team

PowerGUI has a cool way to get you started with PowerShell 2.0 features.. 'Code Snippets'. Take a at this video to know more. http://poshoholic.com/2009/08/28/learn-powershell-v2-features-using-powershell-code-snippets/ Thanks Osama Sajid, Program Manager  

Seatle Script Club – Tonight (9/3/2009)
Sep 3, 2009
Post comments count 0
Post likes count 0

Seatle Script Club – Tonight (9/3/2009)

PowerShell Team
PowerShell Team

Tonight is the second meeting of Script Club in Seattle at Avanade.  If you're in the area tonight between 7:15 and 8:30, feel free to stop by to get help learning or using PowerShell. Tonight's meeting is at: Avanade, 818 Stewart St, Seattle, WA at 7:15 PM More info is below.  Hope to see you there: James Brundage [MSFT] Seattle PowerShell Script Club http://get-powershell.com What works with .Net DLLs, creates WPF apps, WinForm apps, reads RSS feeds, posts to Twitter, reads/writes data to Sql Server, has more than 60 Open Source projects on CodePlex, has over 15 titles in print and is not co...

Exploring WMI with PowerShell V2
Aug 30, 2009
Post comments count 0
Post likes count 0

Exploring WMI with PowerShell V2

PowerShell Team
PowerShell Team

I was messing around with my son’s computer today trying to figure out why one of his programs wouldn’t work.  I was going to use ProcMon to monitor the processes but wasn’t sure what the processes where.  So first I had to figure out what processes were getting started when I ran his program.  I guessed that there was a WMI event for this but as always with WMI – WHAT IS THE NAME OF THE EVENT? In the past, this is where things stopped.  WMI was awesome but god help you if you didn’t know exactly what you wanted.  We made this a ton easier in PowerShell V2 so I decided to give it a try.&...

PowerShell Interview
Aug 30, 2009
Post comments count 0
Post likes count 0

PowerShell Interview

PowerShell Team
PowerShell Team

I recently did a pretty wide ranging interview for TechNet with Osama Sajid.  They broke it up into 3 sections.  You can find the first section (along with pointers to the others) HERE.  In part 3 I talk about the idea of Integrated Lifetime Earnings and how this is affected by PowerShell.  I think this is a pretty important concept for everyone to get in focus. Cheers! Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at:  http://www.micros...

PoshComm has a new sponsor – Please welcome Pragma Systems
Aug 28, 2009
Post comments count 0
Post likes count 0

PoshComm has a new sponsor – Please welcome Pragma Systems

PowerShell Team
PowerShell Team

PowerShellCommunity.org  has announced that they have a got a new sponsor, Pragma Systems. SSH and Telnet folks know Pragma very well. For Powershell users they provide the capability to access Windows PowerShell from any client that runs a ssh or telnet client.   More details of Pragma's Powershell support can be seen here. They would love to hear your feedback and improve it –  PoshComm forums is the place to give this feedback now.   Thanks Osama Sajid, Progam Manager

Plus (+) in .NET Class Names
Aug 26, 2009
Post comments count 0
Post likes count 1

Plus (+) in .NET Class Names

PowerShell Team
PowerShell Team

On one of our internal discussion aliases, someone asked why do we need a plus (+) the class name for FTP? Typically, you would expect this to work [Net.WebRequestMethods.Ftp], but it doesn’t. The solution is [Net.WebRequestMethods+Ftp] and it has something to do with nested classes In C#, a nested class looks something like public class List{                public class Node // Node is inside List                {        &nbs...

Powershell 2.0 for Windows Vista and Windows Server 2008 – Release Candidate
Aug 13, 2009
Post comments count 0
Post likes count 0

Powershell 2.0 for Windows Vista and Windows Server 2008 – Release Candidate

PowerShell Team
PowerShell Team

Announcing the public release of Microsoft Windows Management Framework RC for Windows Vista SP1 and SP2, Windows Server 2008 RTM/SP1 and SP2. This RC includes release notes and the following components:   ·        Windows PowerShell 2.0 ·        WinRM 2.0 ·        BITS 4.0   You can download it from here https://connect.microsoft.com/windowsmanagement/Downloads   This release is equivalent to the PowerShell 2.0 bits in Windows 7 RTM.  Packages for XP SP3 and W...

Get-SystemUptime and Working with the WMI Date Format
Aug 12, 2009
Post comments count 0
Post likes count 0

Get-SystemUptime and Working with the WMI Date Format

PowerShell Team
PowerShell Team

I just got a quick ping from someone at work for an uptime script.  I checked in WMI with by using Search-WmiHelp to find a wmi class that had an uptime property (Win32_OperatingSystem has LastBootUpTime).  While I had found the uptime property I needed, I was left with another pretty common problem that people hit (in VBScript and in PowerShell) about dealing with WMI times.  WMI has a couple of date time formats, and moving in and out of these formats often involves messy parsing code.  Luckily, the WMI team was nice enough to make sure that the .NET classes you use to work with WMI can conv...

Summer Scripting Games 2009 : Wrap-Up
Aug 11, 2009
Post comments count 0
Post likes count 0

Summer Scripting Games 2009 : Wrap-Up

PowerShell Team
PowerShell Team

Scripting Guys have posted a wrap-up to the Summer Scripting Games.. they will be taking the winner scripts one by one and explain it in detail. See it here   Thanks Osama Sajid, Program Manager  

PrimalForms 2009 – From SAPIEN
Aug 3, 2009
Post comments count 0
Post likes count 0

PrimalForms 2009 – From SAPIEN

PowerShell Team
PowerShell Team

SAPIEN Technologies ,makers of PrimalScripts have added another cool product for Windows PowerShell users - PrimalForms. Check it out http://www.primaltools.com/products/info.asp?p=PrimalForms Thanks Osama Sajid, Program Manager

Portable PowerShell – Survey
Jul 31, 2009
Post comments count 0
Post likes count 1

Portable PowerShell – Survey

PowerShell Team
PowerShell Team

Have you ever faced a situation where you want to do some PowerShell magic on a server - but you can't because it is not installed. Well, Karl Prosser is now building a tool to do that. From Karl's blog... "Portable PowerShell is software that allows you to run PowerShell on machines that don’t have PowerShell installed that you can run from a Machine that doesn’t have PowerShell on it, from a USB stick, on a machine that has a different version of PowerShell, a preinstall environment like BartPE, or WinPE or when booted to a windows 7 recovery DVD." Right now Karl is asking the community for some feedback t...

Windows PowerShell 2.0 RTM
Jul 23, 2009
Post comments count 0
Post likes count 0

Windows PowerShell 2.0 RTM

PowerShell Team
PowerShell Team

Windows 7 and Windows Server 2008 R2 have been released to manufacturing. Both of these products include Windows PowerShell 2.0 and its exciting new features, such as remoting, ISE, modules, advanced functions, enhanced WMI support, and a variety of new cmdlets, plus a ton of other features. We are proud of this release. We thank the PowerShell community, specially our MVPs, for helping us to make a great product. In the next few months, we will release a downlevel package for installing Windows PowerShell 2.0 on Windows XP SP3, Windows 2003 SP2, Windows Vista-SP1 and Windows Server 2008. Thanks Osama S...

Dynamic binary modules
Jul 22, 2009
Post comments count 0
Post likes count 0

Dynamic binary modules

PowerShell Team
PowerShell Team

Using add-type and import-module you can dynamically compile and load an assembly without any intermediate assembly files to cleanup. For instance, to run a cmdlet on a remote machine you could send over the cmdlet source code, compile, import, and run it all on the fly. Let’s say you have your cmdlet called Use-MyCmdlet as C# code in the file mycode.cs: This example gets the C# code as a string and starts a remote session. It then compiles the code in the remote session with Add-Type and passes the resulting assembly object to import-module.   The cmdlet Use-MyCmdlet is invoked in the remote ...

URLs for PowerShell Core Help Topics
Jul 21, 2009
Post comments count 0
Post likes count 0

URLs for PowerShell Core Help Topics

PowerShell Team
PowerShell Team

Several Windows PowerShell online help fans have requested a list of all of the URLs of Windows PowerShell Core online help topics in the TechNet Library. I'm providing them here so that they're available to everyone.   The file includes URLs for the current Windows PowerShell Core conceptual ("about"), cmdlet, and provider help, custom cmdlet help for the WSMan provider, and a few useful reference topics, including the Windows PowerShell main page in the TechNet library.   The attached CSV file has three columns: ·         Type (About, Cmdlet, Provider, Ref...

Free PowerShell V1 Book From the Makers of PowerShell Plus
Jul 17, 2009
Post comments count 0
Post likes count 0

Free PowerShell V1 Book From the Makers of PowerShell Plus

PowerShell Team
PowerShell Team

A number of you are already familiar with Dr Tobias Weltner.  Tobias has been involved with Windows scripting for many many years.  He was very active in the VBScript and WMI communities and then an very early adopter of PowerShell.  He is on of the PowerShell MVPs and the inventor of the amazing PowerShell Plus (I had Tobias demo this in one of my talks and people’s jaws just dropped).  This week Tobias is making waves again by releasing a FREE PowerShell book “Mastering PowerShell”.   This appears to be a very comprehensive book at 567 pages.   Here is the TOC: Chapter...

Final Approved Verb List for Windows PowerShell 2.0
Jul 15, 2009
Post comments count 0
Post likes count 0

Final Approved Verb List for Windows PowerShell 2.0

PowerShell Team
PowerShell Team

First, I want to say thanks to everyone who posted suggestions for the verb list on the blog post at http://blogs.msdn.com/powershell/archive/2009/04/22/soliciting-new-verbs.aspx. In addition to the blog comments, we received a lot of feedback from our MVPs and internal partners. I wanted to loop back with everyone on the outcome of the verb list update and post the final approved verb list for Windows PowerShell 2.0. I also wanted to give visibility into what some of the verbs were that we considered but ultimately did not approve and what we feel are the best matches for those on the approved list. In total, we...

Evolution vs. Intelligent Design
Jul 14, 2009
Post comments count 0
Post likes count 0

Evolution vs. Intelligent Design

PowerShell Team
PowerShell Team

I’m watching a cool talk by Greg Kroah Hartman about the Linux Kernel.  He just said something that I absolutely LOVE and feel great kinship towards.  He said that the joke in the Linux community is that “Linux is not ‘Intelligent Design’, it’s ‘Evolution’.  Which means we react to stimuli that’s happening in the world … we don’t over-plan things”.   I think that is a great mindset.  This is one of the things we wanted to achieve with PowerShell, to give you the tools that allowed you to respond to the world as it changed instead of us trying to deliver a fixed scenario and then if...

Advanced Debugging in PowerShell
Jul 13, 2009
Post comments count 0
Post likes count 0

Advanced Debugging in PowerShell

PowerShell Team
PowerShell Team

Here is a collection of tips and tricks to debug PowerShell Read UpThere is a 7-part series of “Debugging Monad Scripts” that Jon Newman wrote a few years ago that covers a lot of tips, including error handling, traps, tracing, and covers a lot of V1 stuff. Clean codeThe best route, is to make sure code is clean, and common errors are caught. To do so, runSet-StrictMode -Version 2 Note, there’s a lot of normal PowerShell (v1 and V2) that StrictMode barfs on, so its recommend to only use Set-StrictMode when trying to debug their own scripts. You can also change your error, and warning preference to make PowerShell...

Function Help Cannot Share a Cmdlet Help File
Jul 9, 2009
Post comments count 0
Post likes count 0

Function Help Cannot Share a Cmdlet Help File

PowerShell Team
PowerShell Team

In Windows PowerShell 2.0, you can write help topics for functions, scripts, and modules, just as you do for cmdlets and providers. In fact, as a best practice, you should always include help topics for all shared PowerShell items.  And we make it easy. For functions and scripts, you can write comment-based help topics right in the script or function (see about_Comment_Based_Help) or you can write XML-based help topics that use the same schema as cmdlet help topics. .To do so, just add the .ExternalHelp comment keyword to the function or script followed by the path and name of the XML file that contains the...

PowerScripting Podcast update
Jul 2, 2009
Post comments count 0
Post likes count 0

PowerScripting Podcast update

PowerShell Team
PowerShell Team

PowerScripting Podcast hosted by MVP Hal Rottenberg will have MVPs Joel Bennett & Oisin Grehan. They will talk about PoshCode See it live tonight at 9pm EDT http://www.ustream.tv/channel/powerscripting-podcast    Next week: MVP Don Jones will talk about security in PowerShell.   Thanks Osama

Assigning the Output of a SWITCH Statement
Jul 1, 2009
Post comments count 0
Post likes count 0

Assigning the Output of a SWITCH Statement

PowerShell Team
PowerShell Team

I was just reading the whitepaper Automating Citrix XenApp on XenServer deployments on HP ProLiant servers.  The reason why this works well for them is that the HP Insight Rapid Deployment (RDP) software has the ability to launch scripts at various points.  Citrix has a wide range of cmdlets so they are able to put together a pretty nice bundle and offer it in a way that allows you to change it if you don't like it.  In fact my favorite part of the paper was this: Create your own cmdlets for a XenServer environment If the cmdlets developed by Citrix do not meet the needs of your environment, you ca...

WMI Performance
Jun 26, 2009
Post comments count 0
Post likes count 0

WMI Performance

PowerShell Team
PowerShell Team

Andy Cheung wrote a very good blog on WMI performance HERE.  Check it out.   Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer 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

Detection logic for PowerShell installation
Jun 25, 2009
Post comments count 0
Post likes count 0

Detection logic for PowerShell installation

PowerShell Team
PowerShell Team

"How do we programmatically detect that PowerShell is installed ?" - This question has started coming up frequently as more folks (both internally and externally) have started to build applications with PowerShell support. As we approach Win7/W2K8-R2 release, which will include PowerShell 2.0 in-box, it is pertinent to have the right guidance out for PowerShell detection logic. If you're writing an installer which relies on PowerShell presence, not only do you need to detect whether PowerShell is installed, but also what version of PowerShell is installed. Remember:  Hemant Ma...

New Powershell Survey on Connect
Jun 24, 2009
Post comments count 0
Post likes count 0

New Powershell Survey on Connect

PowerShell Team
PowerShell Team

PowerShell team wants to hear from you. How easy or difficult it is for you to search PowerShell stuff like learning materials, help , samples, scripts etc? how often do you search for these? and what are your best bets to find information? How it should be made better? Please answer these questions by completing this online survey https://connect.microsoft.com/Survey/Survey.aspx?SurveyID=8725&SiteID=99. Thanks Osama Sajid, PowerShell Program Manager. P.S. this is the first time you are accessing PowerShell connect site, you need to register first. Use a LiveID to sign-in and look for Powershell in "Con...

PowerShell Remoting Protocol Documentation Available
Jun 23, 2009
Post comments count 0
Post likes count 0

PowerShell Remoting Protocol Documentation Available

PowerShell Team
PowerShell Team

William Vambenepe has a great blog entry Native "SSH" on Windows via WS-Management that is well worth a read.  I know that we've been busting our butts documenting our protocols but I hadn't realized that we actually were posting them where people could get them.  Apparently that is the case.  William found them and put 2 & 2 together and has a very good article explaining what we've done and the ramifications of it.  He did a particularly good job on nailing the ramifications portion.  I won't steal his thunder - you should go read his blog.  He also provides links to the specif...

PowerShell trainings
Jun 23, 2009
Post comments count 0
Post likes count 0

PowerShell trainings

PowerShell Team
PowerShell Team

PowerShell FAQ : Where I can find useful trainings to learn Poweshell? Answer: Thanks to PowerShell MVPs, we have this very useful page http://www.powershellcommunity.org/LearningResources.aspx And this online videos series from Don Jones is very good as well. http://www.idera.com/Promo/Practical-PowerShell/  Thanks Osama Sajid, Program Manager Disclaimer: Microsoft does not own, influence or benefit from the third party trainings listed on the page.  This information is provided AS IS without any warranties.  

PowerBoots 0.2 is Now Available
Jun 18, 2009
Post comments count 0
Post likes count 0

PowerBoots 0.2 is Now Available

PowerShell Team
PowerShell Team

Joel 'Jaykul' Bennett has just published the 0.2 version of PowerBoots on CodePlex.  PowerBoots is a library which allows you to write WPF GUIs in PowerShell.  He has a great tutorial HERE that you should definitely check out.  In fact, you should check it out even if you aren't interest in GUIs, it is a great example of the amazing sort of things you can do with PowerShell. Yup - that is right - Rich, powerful GUIs written in PowerShell.   This has been a dream of the PowerShell team since the very beginning.  We just love TK.  TK was a library that allowed people to write G...

Traps vs Try/Catch
Jun 17, 2009
Post comments count 0
Post likes count 0

Traps vs Try/Catch

PowerShell Team
PowerShell Team

Someone as asking about Traps vs Try/Catch and Jason Shirk (PowerShell developer) gave a nice concise and precise answer that I thought I would share with you: Enjoy! Jeffrey Snover [MSFT] Distinguished Engineer 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

Summer Scripting Game : Its ON
Jun 16, 2009
Post comments count 0
Post likes count 0

Summer Scripting Game : Its ON

PowerShell Team
PowerShell Team

The 2009 Summer Scripting Games have officially begun. For the last few days the Scripting Guys have been revealing the events one day at a time. For more information on the events, you can refer to this post from ScriptingGuys. This year’s scripting games are partnered with the Microsoft PowerShell MVP’s at PoshCode.org. The new PoshCode allows you to review other people's scripts, to vote on the scripts you think are best, and to modify other people's submissions and submit the changes you like. This is how most scripters work. They look for scripts, find something they think is useful, and modify it. The same ...

Kudos to the Win7 Diagnostics Team
Jun 14, 2009
Post comments count 0
Post likes count 0

Kudos to the Win7 Diagnostics Team

PowerShell Team
PowerShell Team

Have you ever had problems connecting to a network and gotten one of those dialog boxes that offers to repair it?  Mostly the networking just works but every now again one of the 10,000 moving parts required to make networking function gets misaligned and I get this dialog box.  I always try and it has never worked for me.  This is one of those "triumph of hope over experience" moments for me. Last Thursday I was in a big meeting and could connect to the network,.  I really needed the network so I decided, I'll give it a go.  What was different this time is that I'm running Windows 7 an...

Help Us Help You By Signing Up For A Site Visit
Jun 11, 2009
Post comments count 0
Post likes count 0

Help Us Help You By Signing Up For A Site Visit

PowerShell Team
PowerShell Team

  Windows Server Site Visits in July 09 (Open to US and Canada participants only)   The Windows Server User Research team wants to conduct site visits to learn from people who are involved in any and all aspects of managing servers! We’re hitting the road in July to understand what needs to be improved in our server management software. If your company has at least 500 PCs and has offices in North America, we’d like to consider visiting your company and meeting with 2-4 members in your IT department.   We will be offering each participant their choice of a retail Microsoft software or hardware from...

Windows Event Log in PowerShell – Part II
Jun 11, 2009
Post comments count 0
Post likes count 0

Windows Event Log in PowerShell – Part II

PowerShell Team
PowerShell Team

In part 1 of “Event logs in Powershell” we talked about differences between Get-EventLog and Get-WinEvent. In this second part we will dig deeper into Get-WinEvent.   Starting in Windows Vista, the Windows Event Log was updated to provide a more powerful event model which allows for events to be easily categorized into logs and for event providers to be easily discovered.  PowerShell V2 lets you search the Event Log for the data that's interesting to you, making it easier than ever to mine events from the Event Log. The new Get-WinEvent cmdlet provides access to all event logs on the system, inclu...

2009 Summer Scripting Games
Jun 9, 2009
Post comments count 0
Post likes count 0

2009 Summer Scripting Games

PowerShell Team
PowerShell Team

  Scripting Games start on June 15th and the excitement is building up. Details about the events in the game are emerging. Beginner and Advanced 100 meter Dash Beginner and Advanced Long jump Scripts can be submitted/viewed at http://scriptinggames.poshcode.org/ . There is a TechNet Forum in case you have a question or want to discuss something. http://social.technet.microsoft.com/Forums/en/2009summerscriptinggames/threads Have fun :-) Osama Sajid 

Scripting Games 2009 – More details
Jun 5, 2009
Post comments count 0
Post likes count 0

Scripting Games 2009 – More details

PowerShell Team
PowerShell Team

Scripting Guys have posted more details about the 2009 scripting games, read it here.  Stay tuned to their blog and Twitter for updates Thanks Osama Sajid

Managing Remote Sessions
Jun 4, 2009
Post comments count 0
Post likes count 0

Managing Remote Sessions

PowerShell Team
PowerShell Team

  PowerShell V2 introduces a new capability which allows you to remotely manage machines in your organization. You may have already tried this new feature. In this blog, I will show how an administrator can manage different remote sessions (created by different users from different clients) Scenario: Using PowerShell remoting, normal users can perform non-admin tasks on a machine remotely. There might be situations where an Administrator of the machine may want to terminate specific sessions created by specific users. This Administrator task can be achieved by just restarting WinRM service. However this is n...

Peering into script modules
Jun 3, 2009
Post comments count 0
Post likes count 0

Peering into script modules

PowerShell Team
PowerShell Team

Sometimes it’s handy to access internal elements of script modules. For instance you may be using a 3rd party module in your application and would like to see the internal state for debugging purposes. This can be accomplished with the invoke operator (&) which allows you to access a modules session state: & $module {script block} The script block is executed in the context of the module. Create a script module that exports nothing: Save to a file ‘NoExport.psm1’, import the module and assign to a variable: If we try to call function ‘Hidden’ we get an error because it was no...

Getting Started with AppLocker management using Powershell
Jun 2, 2009
Post comments count 0
Post likes count 0

Getting Started with AppLocker management using Powershell

PowerShell Team
PowerShell Team

Have you tried out the new AppLocker feature in Windows 7? If not, check it out here and here. Also check out the AppLocker references during TechEd here along with a related video here. AppLocker allows you to specify applications that can or cannot run on the machines in your network. AppLocker’s management tools are optimized towards creating an “allow list” of applications i.e. the list of applications that are allowed to run. Applications not on the allow list are blocked by the system. Perhaps, you have been intrigued by “allow listing” and have tried to implement this approach to get a control over t...

PowerShell 2.0 – Differences Between Win7Beta and Win7RC
May 28, 2009
Post comments count 0
Post likes count 0

PowerShell 2.0 – Differences Between Win7Beta and Win7RC

PowerShell Team
PowerShell Team

Oisin Grehan, PowerShell MVP has done a diff between Powershell 2.0 that shipped with Win7 Beta and Win RC... very useful if you have moved to RC build (or planning to do so) http://www.nivot.org/2009/05/22/PowerShellV20DifferencesBetweenCTP3Win7BetaAndWin7RC.aspx. PowerShell team thanks Oisin for this useful blog post. Osama Sajid, Program Manager

Adding Custom Cmdlet Help for Providers
May 28, 2009
Post comments count 0
Post likes count 0

Adding Custom Cmdlet Help for Providers

PowerShell Team
PowerShell Team

A new feature of Windows PowerShell 2.0 lets you write custom cmdlet help for Windows PowerShell providers. This blog explains how to do it. (The topic will also be covered in excruciating detail in MSDN, but we don't want you to wait.)   What's a Provider? A Windows PowerShell provider is a C# program that exposes a data store to Windows PowerShell through a Windows PowerShell drive (PSDrive). When users view the PSDrive, the data in the data store appears to be organized like a file system drive. The drive has a path and users can navigate through the data store by using file system navigation commands lik...

Update-TypeData, ISE CTP3 vs ISE RC, and Teched2009 Demos
May 26, 2009
Post comments count 0
Post likes count 0

Update-TypeData, ISE CTP3 vs ISE RC, and Teched2009 Demos

PowerShell Team
PowerShell Team

There were quite a few name changes in the ISE Object Model from CTP3 to RC Using Update-TypeData, we can achieve some parity between the two We can add aliases to the CTP3 version to make it look like the RC Version  For example,         <Name>System.Management.Automation.Host.PSGHost</Name>        <Members>            <AliasProperty>                <Name>CurrentPowerShellTab</N...

Hal and Kirk on HanselMinutes
May 25, 2009
Post comments count 0
Post likes count 0

Hal and Kirk on HanselMinutes

PowerShell Team
PowerShell Team

PowerShell MVPs Hal Rottenberg and Kirk Munro were interviewed for HanselMinutes audio talk show during TechEd 09 - good overview of Powershell http://www.hanselminutes.com/default.aspx?showID=180  Osama Sajid, Program Manager

Get-WindowTitle.ps1
May 22, 2009
Post comments count 0
Post likes count 1

Get-WindowTitle.ps1

PowerShell Team
PowerShell Team

I do this so frequently that I finally put it into a script called Get-WindowTitle.ps1 . Get-Process |where {$_.mainWindowTItle} |format-table id,name,mainwindowtitle –AutoSize Here is what it does: [4696:0]PS> Get-WindowTitle   Id Name              MainWindowTitle   -- ----              --------------- 2448 mmc               Server Manager 4696 powershell        Admi...

Processing Event Logs in PowerShell
May 21, 2009
Post comments count 0
Post likes count 0

Processing Event Logs in PowerShell

PowerShell Team
PowerShell Team

PowerShell V2 ships with two sets of cmdlets for processing event logs, one is *-EventLog set and other is Get-WinEvent.   Reading Events: As you can see there are two cmdlets to GET events from event logs , Get-WinEvent and Get-EventLog. Having two cmdlets to do the same thing seems to be counter-intuitive and I will explain the difference between the two to remove the confusion.  As we can see, Get-WinEvent can handle a lot more that Get-EventLog does. If you are on Vista and above, Get-WinEvent is the recommend way to read the event logs, use Get-EventLog on XP and Win2k3. A quick check on the n...

V2 Quick Tips: Finding Extra Outputs From Your Script
May 20, 2009
Post comments count 0
Post likes count 0

V2 Quick Tips: Finding Extra Outputs From Your Script

PowerShell Team
PowerShell Team

One of the nifty features of functions in PowerShell is that they can return as many results from as many places as you’d like.  In fact, any method or cmdlet that would give you an output if you try it on the command line will also return values from a function.  While this can give you a lot of powerful capabilities (like easily building functions that return a list of items), it can also be a source of pain, especially if you have a decently sized script that, every once in a while, produces an unexpected output mixed with expected output.  Since you cannot restrict what types get outputted from...

PowerShell session at TechEd 2009
May 18, 2009
Post comments count 0
Post likes count 0

PowerShell session at TechEd 2009

PowerShell Team
PowerShell Team

Ibrahim and I presented session WSV402 at TechEd last week with great attendance. Attached are the slides and demos from the talk. Dan Harman, Program Manager   Dan Harman  Program Manager TechEd2009-WSV402-Demos.zip

Summer Scripting Games 2009
May 16, 2009
Post comments count 0
Post likes count 0

Summer Scripting Games 2009

PowerShell Team
PowerShell Team

  Scripting is fun .. and it gets better when you do it as part of Scripting Games hosted by Microsoft Script Center . But wait there is more - this year Scripting Center is hosting Summer Scripting Games in collaboration with PowerShellCommunity.org and PoshCode.org .This announcement comes straight from Tech.Ed 2009.  See full details here http://www.microsoft.com/technet/scriptcenter/funzone/games/games09/announcement.mspx Follow the Scripting Guys on Twitter to stay tuned. Thanks Osama Sajid , Program Manager  

Updates from Tech.Ed 09
May 13, 2009
Post comments count 0
Post likes count 0

Updates from Tech.Ed 09

PowerShell Team
PowerShell Team

  I am not attending Tech.Ed but I am getting updates from my friends. PowerShell team is very excited about the offering we have for Tech.Ed this year... frankly, what is the best way to save money on your IT Infrastructure... Use PowerShell v2 and automate you tasks. PowerShell v2 is getting good focus in the keynote addresses and demos this year A few highlights:     Other Interesting stuff from Tech.Ed Pictures of PowerShell Dinner are here  Scripting Guys booth at Tech.Ed was giving free T-shirts and other stuff… but not to everyone - Go to Twitter to find out   And these Tech....

Copy-Acl
May 10, 2009
Post comments count 0
Post likes count 0

Copy-Acl

PowerShell Team
PowerShell Team

Today my wife told me about a problem on the family PC.  There were a bunch of PDF files in a directory that had the wrong permissions so my son couldn’t access them.  She modified the ACL on one of them using Explorer and verified that that was the fix.  (This is from a test I ran) She then selected them all and tried to do it all at once but when she brought up the Properties, it didn’t have the Security Page anymore: She wanted to know if there was some trick to set the ACLs all at once.  I told her that PowerShell could do that.  I showed her how to use Get-Acl and Set-Acl and...

Quick "5 Minute Concepts" Video series for Powershell 2.0
May 10, 2009
Post comments count 0
Post likes count 0

Quick "5 Minute Concepts" Video series for Powershell 2.0

PowerShell Team
PowerShell Team

Phil Pennington from DPE has a very useful set of videos on Powershell 2.0 in "5 minute concept" series - Check it out https://channel9.msdn.com/tags/PSV2/. We will add more videos here.  Want some specific area to be covered?- let us know by leaving a comment. Thanks Osama Sajid, Program Manager

Fun With Alerts (“`a”)
May 6, 2009
Post comments count 0
Post likes count 0

Fun With Alerts (“`a”)

PowerShell Team
PowerShell Team

I just decided to restart Outlook to see if that made some weirdness I was experiencing go away.  As you may or may not know, the Outlook process often is running for quite a bit after the Outlook window goes away.  As such, you really don’t want to start another instance of Outlook until the first version is done.  In V2, we now have the WAIT-PROCESS command so what I wanted to do was: PS> Wait-Process Outlook; Outlook The problem with that is that Outlook is not in the Path so it doesn’t work.  I could go figure out how to do this but I didn’t want to spend the time right now so i...

PowerShell V2 – backward compatibility
May 5, 2009
Post comments count 0
Post likes count 0

PowerShell V2 – backward compatibility

PowerShell Team
PowerShell Team

Windows PowerShell 2.0 is backward compatible with Windows PowerShell 1.0. All the scripts written for V1 should work in V2. If you find instances of broken scripts from v1 please let us know through our connect site https://connect.microsoft.com/site/sitehome.aspx?SiteID=99 However there are few points to be noted:   Breaking changes from PowerShell 1.0 ·        The value of the PowerShellVersion registry entry in HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine is changed to 2.0. ·        New cmdlets and variables have been ...

PowerShellToys – WOW!
May 5, 2009
Post comments count 0
Post likes count 0

PowerShellToys – WOW!

PowerShell Team
PowerShell Team

Gent Hito and the superstars at /n software has just announced a new product division, PowerShellToys.  This division is focused exclusively in PowerShell technologies.  PowerShellToys products bridge other Microsoft technologies to PowerShell making it easily accessible to other developers: Web Developers, Desktop Application Developers, Database Developers, etc..   Gent told me that they are called "Toys" because the folks at /n software believe that once developers see the sheer power of bringing PowerShell into their environment, they will look at these tools with a wide grin, ...

Enable-PSRemoting
Apr 30, 2009
Post comments count 0
Post likes count 0

Enable-PSRemoting

PowerShell Team
PowerShell Team

I installed Win7 RC build yesterday and tried to enable PS Remoting. I launched PowerShell elevated, ran Enable-PsRemoting cmdlet but it gave an “access denied” error message  One good thing in PowerShell help in RC is “about_Remote_Troubleshooting”. It is very detailed and covers all important failure scenarios. Go through it if you face problem with enabling remoting on a box To summarize, there are few things that I had to check 1.      My machine is connected to domain. 2.      I am logged in as administrator 3.      PowerS...

SE05 Easy Automation with Windows PowerShell
Apr 30, 2009
Post comments count 0
Post likes count 0

SE05 Easy Automation with Windows PowerShell

PowerShell Team
PowerShell Team

Slides and demos from the Monday introductory talk at MMS 2009. PowerShell has been getting a lot of attention at MMS 2009. The community around PowerShell is also being noticed by folks and was even "singled-out" at the Keynote on Monday by Bob Kelly :)-Hemant Mahawar [MSFT]Program Manager MMS2009-SE05-Easy_Automation.zip

SE06 Whats New in Windows PowerShell 2.0
Apr 30, 2009
Post comments count 0
Post likes count 0

SE06 Whats New in Windows PowerShell 2.0

PowerShell Team
PowerShell Team

Slides and demos from the Wednesday talk at MMS 2009.Momentum around PowerShell has been great here. Lots and lots of products are showcasing the automation through PowerShell. -Hemant Mahawar [MSFT]Program Manager MMS2009-SE06-Windows_PowerShellV2.zip

SE07 Automating Your Infrastructure with Windows PowerShell 2.0
Apr 30, 2009
Post comments count 0
Post likes count 0

SE07 Automating Your Infrastructure with Windows PowerShell 2.0

PowerShell Team
PowerShell Team

Attached are the slides and demos that I used today during my MMS talk.MMS is a great conference.  It provides the opportunity to meet and talk to super smart people working on similar problems and learn from their scars.  Enjoy! Jeffrey Snover [MSFT]Distinguished EngineerVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx MMS2009.zip

V2 Quick Tip: Starting a new elevated process from a PowerShell script
Apr 22, 2009
Post comments count 0
Post likes count 0

V2 Quick Tip: Starting a new elevated process from a PowerShell script

PowerShell Team
PowerShell Team

One of the systems administration hurdles of the post-Vista world is figuring out how to make a script run as an administrator. In PowerShell V2, using the Start-Process cmdlet, this is a one liner that will get the job done: Hope this Helps, James Brundage [MSFT]

Soliciting New Verbs
Apr 22, 2009
Post comments count 0
Post likes count 0

Soliciting New Verbs

PowerShell Team
PowerShell Team

With the recent changes in v2 to increase the visibility of the cmdlet design guidelines, we want to make sure we have a solid set of verbs on the approved verb list before we ship v2. We've already talked with a number of partners and customers and have made some recent changes to the verb list. In addition, we'd love to have feedback from our community on any holes you perceive we have in our current list of approved verbs. To provide some context, here are the things we think about when deciding whether to add a new verb: When suggesting a new verb, it's most helpful if you can include the following infor...

Do PowerShell Demos in the ISE
Apr 21, 2009
Post comments count 0
Post likes count 0

Do PowerShell Demos in the ISE

PowerShell Team
PowerShell Team

Jeffry Snover and many other have used Start-Demo in powershell.exehttp://blogs.msdn.com/powershell/archive/2007/03/03/start-demo-help-doing-demos-using-powershell.aspx Continuing the tradition, we now have ISEDemo.psm1 To use it, start ISE and runImport-Module ISEDemo.psm1 #(attached)Start-Demo c:\path\to\demofile.txt Demo files look like # Get 10 lowest handle count processesgps | sort handles | select -first 10# Import all available modulesGet-Module -ListAvailable | Import-Module Thanks,Ibrahim Abdul Rahim [MSFT]Windows PowerShell TestThis posting is provided “AS IS” with no warranties. ISEDemo.psm1

V2 Quick Tip: Monitoring Performance Counters with PowerShell
Apr 21, 2009
Post comments count 0
Post likes count 0

V2 Quick Tip: Monitoring Performance Counters with PowerShell

PowerShell Team
PowerShell Team

I just got a ping on our internal discussion list about how to get at the Performance counters in PowerShell.  In V2, we've got some nifty cmdlets to help read performance counters. Here are a few of quick one liners to get you started: Hope this Helps, James Brundage [MSFT]

Adding your own help links to ISE
Apr 20, 2009
Post comments count 0
Post likes count 0

Adding your own help links to ISE

PowerShell Team
PowerShell Team

ISE has an F1 help feature, where if you press F1 when your caret is over a cmdlet name, context sensitive help opens. Shay Levy has a nice post on F1 help in the ISE herehttp://blogs.microsoft.co.il/blogs/scriptfanatic/archive/2009/01/31/using-help-in-powershell-ise.aspxHe adds “I wanted to mimic the way ISE’s help works when you press F1 and allow an alias to be expanded to cmdlet name.” and he did it with calling hh.exe on the link There is an alternative way; Add your own help links to the ISE You can add to $psLocalHelp and $psOnlineHelp, any key to take you to a help page. For example, $psIse.Options.LocalH...

Script Club In Seattle: Tomorrow Night
Apr 20, 2009
Post comments count 0
Post likes count 0

Script Club In Seattle: Tomorrow Night

PowerShell Team
PowerShell Team

If you’re a PowerShell fan, and in the Seattle area, then you should know that Andy Schneider (of Get-PowerShell.com) will be hosting a Script Club event at the Avanade offices. Script Club is a great way to learn PowerShell.  Ideally, you bring a laptop, your problems, and your curiosity.  Everyone at Script Club helps everyone else get up to speed on PowerShell, answers each others questions, and solves their scripting problems. The first event in Seattle is tomorrow night.  Check out this blog post for more details, or register with ClickToAttend, or just show up. The event is from 7pm to 9pm...

Differences between the ISE and PowerShell console
Apr 17, 2009
Post comments count 0
Post likes count 0

Differences between the ISE and PowerShell console

PowerShell Team
PowerShell Team

Here is a collection of differences between the PowerShell_ise.exe and PowerShell.exe, as well as workaroundsand suggestion if you need them (assuming we have them :)) There could be others, but parity with PowerShell is a big thing for the ISE. Cheers,Ibrahim Abdul Rahim[MSFT]

15 Minutes with Lang.Net
Apr 16, 2009
Post comments count 0
Post likes count 0

15 Minutes with Lang.Net

PowerShell Team
PowerShell Team

Microsoft is an awesome place to work on languages! Lang.Net is a great language conference that Microsoft holds every year.  We bring in people from all around the industry that are passionate about languages and then race through a set of topics.  All the talks are given 15 or 30 minute slots so that we can get through a ton of information.  Check out the agenda for this year (HERE) to get a flavor for the wide range of topics and attendees. This year I was given 15 minutes to describe PowerShell!  I decided to: You can see the presentation HERE. I would highly recommend w...

Increasing visibility of cmdlet design guidelines
Apr 15, 2009
Post comments count 0
Post likes count 0

Increasing visibility of cmdlet design guidelines

PowerShell Team
PowerShell Team

Summary In PowerShell v1, we published a set of cmdlet design guidelines that included direction on how to properly name cmdlets. Throughout the v2 cycle, we've seen an increase in cmdlet authors deviating from the standards in unexpected ways. Our user community (you all) has become particularly vocal in recent months that we needed to do something in v2 to curb this trend. This led to a series of discussions on our team about an appropriate course of action for v2. The outcome of those discussions includes changes to Import-Module where we will perform name checking on imported commands. We decided not to disa...

Configuring PowerShell for Remoting – Part 2 (Fan-In)
Apr 10, 2009
Post comments count 0
Post likes count 0

Configuring PowerShell for Remoting – Part 2 (Fan-In)

PowerShell Team
PowerShell Team

The features discussed in this blog post depend on PowerShell CTP3 release. Details about PowerShell CTP3 can be found at http://blogs.msdn.com/powershell/archive/2008/12/23/early-christmas-present-from-powershell-team-community-technology-preview-3-ctp3-of-windows-powershell-v2.aspx The Part 1 of this series concentrated on configuring PowerShell remoting through WinRM service. In this blog post, I will talk about configuring PowerShell through IIS, which we call as Fan-In. The WinRM service based PowerShell remoting is targeted for those users who want to administer/manage a machine(s) (or an asset on the mach...

Introducing the WMI Blog
Apr 6, 2009
Post comments count 0
Post likes count 0

Introducing the WMI Blog

PowerShell Team
PowerShell Team

The people over on WMI, WinRM, and BITS have started up a blog to share their systems management expertise with the world.  Check it out: http://blogs.msdn.com/wmi/ Here are some fun posts to get you started: Accessing WMI Data via WinRM Let’s Troubleshoot WMI (Part 1: Remoting & Security) (this one includes a handy chart I wrote years ago to figure out what I needed to change when WMI couldn’t connect) Introducing BITS PowerShell Cmdlets Hope this Helps, James Brundage [MSFT]

Checking for bound parameters
Apr 6, 2009
Post comments count 0
Post likes count 0

Checking for bound parameters

PowerShell Team
PowerShell Team

I recently read an email where someone was asking how they could check in their function if a value had been provided to one of the parameters.  Consider for example,     The usual way I’ve seen people deal this problem is by providing a default value which gets assigned to $x in the case that a value wasn’t provided by the caller and then checking for that value.      That works in the majority of cases, but let’s say that you wanted to differentiate between a default $null value and $null being passed by the caller.  What would you do? If you’re on v2, a simple solution is ...

Setting Network Location to Private
Apr 2, 2009
Post comments count 0
Post likes count 0

Setting Network Location to Private

PowerShell Team
PowerShell Team

The Network Location feature was introduced in Windows Vista. It provides an easy way to customize your firewall settings based on whether you trust or don’t trust the computers around you. There are three Network Location types - Private, Public and Domain. If your computer is a member of the domain then you won’t be able to change the Network Location type. If your computer is standalone or part of the workgroup, then you can choose what type of network location do you want - Public or Private. Private means that you are a member of the trusted network and you can lower your network security a little bit. Publi...

Many² ways you can set a variable value
Apr 2, 2009
Post comments count 0
Post likes count 0

Many² ways you can set a variable value

PowerShell Team
PowerShell Team

There are many ways to set a variable's value. I just learnt one more yesterday. If you have others, please add comments # Simple# $ gets the variable, and = will assign it$a = 1 # With Variable Scope# The prepend is the scope, and could be global, script, and others# Useful when you want to keep things in script scope, or share them out in global scope$global:a = 1 # Complex variable names# Useful if you have a variable with the name ${Yahoo!Id}${a} = 1 # Using the Set-Variable cmdlet# Useful if you want to indirectly set the value# Has extra parameters like scopeSet-Variable a 1 # Using the variable provider# N...

Image Manipulation in PowerShell
Mar 30, 2009
Post comments count 2
Post likes count 0

Image Manipulation in PowerShell

PowerShell Team
PowerShell Team

The other week, I showed a Get-ProgID function that I used to help someone at Microsoft Research find a good object to talk to images.  A few comments jumped to one of the possible solutions, which is to use the .NET Drawing assembly (which I have to load first).  I wanted to be reasonably sure that the way to get at the image metadata was efficient and didn’t require loading up any assemblies PowerShell hadn’t loaded already.  Looking at the output of Get-ProgID, Two COM objects jumped out at me: These two COM objects are part of a whole fun family of scriptable COM objects that work with the M...

Active Directory Administrative Center for Windows Server 2008 R2 implemented using ADPowershell!
Mar 30, 2009
Post comments count 0
Post likes count 0

Active Directory Administrative Center for Windows Server 2008 R2 implemented using ADPowershell!

PowerShell Team
PowerShell Team

Windows Server 2008 R2 doesn’t just add ADPowershell – it also adds Active Directory Administrative Center (or ADAC), a new GUI tool for AD administrators.  Read about it on TechNet.  What’s more, while you can’t tell just from looking at it, ADAC is implemented entirely over Windows PowerShell 2.0 and ADPowershell!  Every read and write to AD goes through ADPowerShell.  So, if you were wondering whether Windows PowerShell and ADPowershell are just for scripters -- they aren’t!  Windows PowerShell and ADPowerShell provide a powerful and flexible management API for the construction of mana...

Get closure with GetNewClosure
Mar 27, 2009
Post comments count 0
Post likes count 0

Get closure with GetNewClosure

PowerShell Team
PowerShell Team

Have you ever created scriptblocks on the fly, say in a foreach loop, and they totally mess up because they all have the same value? This is something sort of advanced, and typically used when you’re proxying an object. The most basic example would be, taken from (http://www.powershellcommunity.org/Forums/tabid/54/aff/1/aft/2506/afv/topic/Default.aspx) function add([int]$x) { return { param([int]$y) return $y + $x } }$m2 = add 2$m5 = add 5&$m2 3 #expected:  5 actual: 3&$m5 6 #expected: 11 actual: 6 The value for $x is $null for both. Why is that? Its because $x is $null in the local scope, the script...

Tied Variables in PowerShell
Mar 26, 2009
Post comments count 0
Post likes count 0

Tied Variables in PowerShell

PowerShell Team
PowerShell Team

With Add-Type and $executioncontext you can add special varibles that have tied values. I made $random, and $now add-type @"using System;using System.Management.Automation;public class RandomVariable : PSVariable{Random r;public RandomVariable ()  : base("Random", 0, ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope)  {r = new Random();}     public override object Value        {            get            {    &nbsp...

Get-ProgID
Mar 20, 2009
Post comments count 0
Post likes count 0

Get-ProgID

PowerShell Team
PowerShell Team

The other day, a friend over in Microsoft Research wanted to figure out how to get out the width and height of an image in PowerShell.  There are many ways that you can approach this particular problem.  I knew three right off of the top of my head, but none of them had a really optimal experience. I knew there had to be a better way.  Some object had to be able to give me back image width and height as a nice simple property. I normally use two functions to find my way around unfamiliar problems (before I start using search engines).  One I’ve shared out a few times is called ...

Active Directory Powershell Blog
Mar 20, 2009
Post comments count 0
Post likes count 0

Active Directory Powershell Blog

PowerShell Team
PowerShell Team

AD team has started a new blog for their PowerShell Cmdlets.. In their own words "We are here to answer any questions about AD Powershell, share some tips and tricks, discuss the history behind certain decisions and features and hear your feedback on improving AD Powershell experience" Check this out http://blogs.msdn.com/adpowershell/  Osama Sajid

Local Boy Makes Good
Mar 16, 2009
Post comments count 0
Post likes count 0

Local Boy Makes Good

PowerShell Team
PowerShell Team

Check it out:  http://www.microsoft.com/presspass/exec/de/snover/default.mspx One of the biggest Snoopy Dance moments of my life!   BTW - this is really a reflection of how important Microsoft views PowerShell. I'd love to say more but I've got some Snoopy Dancing to do.   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

dir –a:d
Mar 13, 2009
Post comments count 0
Post likes count 0

dir –a:d

PowerShell Team
PowerShell Team

In cmd, listing files based on attributes was simple: In PowerShell, it’s not so easy: We have had requests to cover the first case better, for example: https://connect.microsoft.com/feedback/ViewFeedback.aspx?SiteID=99&FeedbackID=252549&wa=wsignin1.0 https://connect.microsoft.com/feedback/ViewFeedback.aspx?SiteID=99&FeedbackID=308796&wa=wsignin1.0 We haven’t added such a parameter to Get-ChildItem yet, but with some new features in V2, you can add them yourself. The techniques I describe below can be used to augment any cmdlet, or any script or function for that matter. If you don’t care much a...

Reserving keywords
Mar 11, 2009
Post comments count 0
Post likes count 0

Reserving keywords

PowerShell Team
PowerShell Team

A couple months ago we asked our MVPs how they felt about reserving keywords in V2.  We received some excellent but mixed feedback, so we’d like to open the discussion up a bit wider. There are keywords we hope to use in a future version of PowerShell, but won’t be implemented in V2.  “class”, “using”, and “new” are excellent candidates for additions to PowerShell, but we haven’t decided on the exact list yet. Because V1 did not reserve these keywords, reserving them now would be a breaking change.  For example, some people like to add an alias like: If we reserved “new”, scripts using this alias w...

Out-GridView Revisited
Mar 11, 2009
Post comments count 0
Post likes count 0

Out-GridView Revisited

PowerShell Team
PowerShell Team

It has been more than one year since we updated Out-GridView feature with you. In case you are not familiar with Out-GridView yet, it is a unique PowerShell cmdlet that users can pipe command output to a separate window, and it enables users organize and analyze output data easily. The previous blog entry by Brent gave an overview of Out-GridView cmdlet. So, what’s new for Out-GridView in Windows PowerShell CTP3? A major feature we added was query filtering functionality; data can be queried according to their properties through this feature. Let’s look at an example. Running command: “Get-ChildItem | Out-GridV...

How to Create an Object in PowerShell
Mar 10, 2009
Post comments count 0
Post likes count 0

How to Create an Object in PowerShell

PowerShell Team
PowerShell Team

Today someone in Xbox Live Operations (the folks that keep xBox Live alive and well) pinged me with a simple question about PowerShell with a complicated answer: “How do I create a class in PowerShell?” There’s two scenarios I find where people want classes.  The first (and most common) is familiarity: the person wants to make a class in PowerShell because they think of problems in terms of classes.  The second is practical: the person wants to make a collection of properties and methods, because that’s what the pipeline in PowerShell plays nicely with (for instance, you can Gro...

Free PowerShell EBook
Mar 8, 2009
Post comments count 0
Post likes count 0

Free PowerShell EBook

PowerShell Team
PowerShell Team

PowerShell MVP and prodigious PowerShell blogger Keith Hill has converted his very popular Effective PowerShell blog series into a FREE Ebook.  You can download it HERE. Here is a taste of you'll you'll get: Table of Contents Introduction ...............................................................................................................................................................1 Item 1: Four Cmdlets that are the Keys to Discovery within PowerShell ..................................................................1 Key #1: Get-Command ............................................

2009 MVP Summit
Mar 2, 2009
Post comments count 0
Post likes count 0

2009 MVP Summit

PowerShell Team
PowerShell Team

The MVP summit started yesterday and we meet with our MVPs today.  This is one of my favorite events of the year.  MVPs are people in the community that are very active (and helpful [yes - they look at both :-)] ) in a particular technology community.  We get them all together each year and have a good exchange of ideas.  We tell them what we are doing and where we are going and they give us great feedback.   MVPS are in invaluable source of real-world feedback on our technology.   I'm really excited this year because I'm co-presenting a sort of "State of PowerShell&...

PowerShell Folksonomy – Are You In?
Mar 1, 2009
Post comments count 0
Post likes count 0

PowerShell Folksonomy – Are You In?

PowerShell Team
PowerShell Team

A while ago I did some experimentation with a PowerShell folksonomy.  The idea was to tag internet content (blogs, comments, newsgroup replies, etc) with unique tags that search engines would pick up and make it easier to find exactly the information you needed.  This effort stemmed from an documentation battle we had over the use of the term cmdlet.  This was a word that I made up to describe PowerShell commands but I wanted to invoke the idea that these were tiny things that were composed with other tiny things to solve big problems.  One of reasons I was hardcore on this idea of a cmdlet b...

Where Did That Come From?
Mar 1, 2009
Post comments count 0
Post likes count 0

Where Did That Come From?

PowerShell Team
PowerShell Team

Have you ever found yourself asking the question, "where did THAT come from?"? In PowerShell we try to give you mechanisms you can use to answer questions like that.    We spend extra resources (memory, cpu cycles, etc) to do this because we focus in the performance of the PEOPLE using our software instead of the performance of the code.  When something goes pear-shaped, what matters is how quickly a person can figure out what is going on and fix it.  We've talked quite  bit about this in the context of the rich error information we gather but in this blog I'm going to d...

Converting to Array
Feb 27, 2009
Post comments count 0
Post likes count 0

Converting to Array

PowerShell Team
PowerShell Team

When you run a PowerShell pipeline, that pipeline might return 0, 1 or many items.  If you are assigning the results of that pipeline to a variable, you will get $null, 1 item or an array of items respectively.  Sometimes, you won't care about the different types returned, but at other times, you'll actually prefer to force the results to always be an array.  In those cases, you can use @( ... ).  As in: $a = @(get-childitem)  That will evaluate the statements enclosed within the parentheses and collect the results into an array.  If there are no results, then you'll get an arra...

Stopping Every Instance of PowerShell.exe (except the one I'm in)
Feb 11, 2009
Post comments count 0
Post likes count 0

Stopping Every Instance of PowerShell.exe (except the one I'm in)

PowerShell Team
PowerShell Team

Our Test Architect just dropped by my office and pitched me a PowerShell question with a nice, quick answer. He wanted to stop every process of a particular name, except for the instance that was running the script. You can do this in one nice pipeline: Get-Process Powershell  | Where-Object { $_.ID -ne $pid } | Stop-Process Get-Process takes a positional parameter (name), which is a wildcard that supplies the name of the process.  It returns back a bunch of ProcessInfo objects, which have a property, ID (the process ID).  $pid is a variable that will tell you the current process ID in Powe...

JAOO Talk
Feb 10, 2009
Post comments count 0
Post likes count 0

JAOO Talk

PowerShell Team
PowerShell Team

Last year I was delighted to be invited to give a talk at JAOO conference.  This is a great language conference.  The thing I was delighted to discover is that the while it had Microsoft content (AndersH gave one of the keynotes), the bulk of the people and content was non-Microsoft.  This allowed me to give a different kind of a talk.  It allowed me to go back to the basics and explain what were were doing and why we were doing it to a group of people that didn't necessarily have any background and were potentially not particularly friendly towards Microsoft.  (I've got a funny story abo...

#requires your scripts
Feb 6, 2009
Post comments count 0
Post likes count 0

#requires your scripts

PowerShell Team
PowerShell Team

Recently, I saw someone that had developed a script on the CTP3 drop and was then having trouble running it on v1 of PowerShell.  Eventually it turned out that he was using v2 features in his script.  Most of you know that we are trying to keep the next version of PowerShell compatible with v1 and I encourage you to report any problems that you might have in that area.  Unfortunately, v2 being compatible with v1, doesn’t mean v1 is compatible with v2. After seeing that, I started thinking about people sharing v2 scripts on the web and the problems they might cause someone that didn’...

Diff between Windows PowerShell versions
Feb 5, 2009
Post comments count 0
Post likes count 0

Diff between Windows PowerShell versions

PowerShell Team
PowerShell Team

PowerShell MVP Oisín Grehan has done a really good job in getting the diff between PowerShell releases. V1 and CTP3 http://www.nivot.org/2009/02/04/DifferencesBetweenPowerShell10RTMAndPowershell20CTP3Win7Beta.aspx CTP2 and CTP3 http://www.nivot.org/2008/12/23/PowerShell20CTP3HasArrived.aspx Thanks a lot Oisín. Osama Sajid [MSFT]  

Console Application (Non) Support in the ISE
Feb 4, 2009
Post comments count 0
Post likes count 0

Console Application (Non) Support in the ISE

PowerShell Team
PowerShell Team

There are some limitations on how the ISE interacts with console applications you need to be aware of, for apps like ftp and netsh.First of all, the ISE Runs console apps that don’t require user input just fine.For example, “ping www.microsoft.com” and “cmd /c dir /s”Piping also works fine in the ISE,For example, PS C:\Users\ibrar> "show mode" | netshnetsh>onlineAutomation in scripts, that don’t require user interventions should be fine.However, if you run “cmd /k” which requires input, the ISE will be stuck, and you’ll have to stop the pipeline, using Ctrl-Break or pressing the stop button.It can get annoy...

Managing Windows Update From PowerShell
Jan 31, 2009
Post comments count 0
Post likes count 0

Managing Windows Update From PowerShell

PowerShell Team
PowerShell Team

James O’Neil just posted how to manage Windows Update with Windows PowerShell Here’s a quick sample of what he can do: Add-WindowsUpdate –Auto to download updates and reboot if needed, Set-WindowsUpdateConfig –n 4 –i to schedule updates (Including the merely recommended)  and Get-WindowsUpdateConfig Check it out: http://blogs.technet.com/jamesone/archive/2009/01/27/managing-windows-update-with-powershell.aspx Hope this Helps, James Brundage [MSFT]

Getting Alternate Streams (Verbose, Progress, Debug) with the PowerShell API
Jan 28, 2009
Post comments count 0
Post likes count 0

Getting Alternate Streams (Verbose, Progress, Debug) with the PowerShell API

PowerShell Team
PowerShell Team

Dozens of people could write dozens of books on all of the cool stuff we improved in V2 of PowerShell.  One of the nice little things we did was give a more understandable API than Pipeline (which is the class you can use to invoke code from C# in V1).  This API is called the PowerShell API, and one of the improvements it makes is the ability to get to alternate data streams. Alternate data streams are a particularly fun thing about PowerShell. While you can have a lot of output streams in DOS, it was anyone's guess exactly what any of them were.  PowerShell has several alternate data streams that...

Rename-Drive : Renaming Drives with PowerShell & WMI
Jan 27, 2009
Post comments count 0
Post likes count 0

Rename-Drive : Renaming Drives with PowerShell & WMI

PowerShell Team
PowerShell Team

.CmdletName { font-size:large } .CmdletSynopsis { font-size:medium } .CmdletDescription { font-size:medium } .CmdletParameters { font-size:medium } th { font-size: medium; font-style: italic } table { border: 1 } Shane Burton from Compellent just asked me to help him rename a drive with PowerShell. It's possible to rename drives using a couple of different WMI classes, Win32_Volume, and Win32_LogicalDisk. You change the drive by setting a property name on the WMI Object (Label in Win32_Volume, and VolumeName in Win32_LogicalDisk), and then putting it back...

Managing Server Features with PowerShell Cmdlets on Windows 2008 Server R2 Beta
Jan 26, 2009
Post comments count 0
Post likes count 0

Managing Server Features with PowerShell Cmdlets on Windows 2008 Server R2 Beta

PowerShell Team
PowerShell Team

If you have used Windows Server 2008, probably you had experience with managing server features. Server Manager is a traditional way to install/uninstall server features. On Windows 2008 Server R2 Beta, Windows PowerShell provides a new approach to managing server features via Server Manager PowerShell cmdlets. This blog will walk through installing server features with these cmdlets. To use the Server Manager cmdlets, we need to import servermanager module by running the PowerShell command “Import-Module servermanager”. The reason is that these cmdlets are encapsulated in the servermanager module, and are not a...

Design of Script Friendly APIs, lessons from $psISE
Jan 26, 2009
Post comments count 0
Post likes count 0

Design of Script Friendly APIs, lessons from $psISE

PowerShell Team
PowerShell Team

Cmdlets are high level, task-oriented abstractions.  The implementation of cmdlets can talk to anything:  Web services, COM objects, WMI objects, .NET objects – anything.   Depending upon how developers design their API, they can make it easier or harder to write cmdlets.  Now that you can write cmdlets in PowerShell itself, here are some tips for designing your API so that it can be easily scripted against and turned into a set of cmdlets using PowerShell Just because the Object Model lives in .NET land, doesn’t mean we can’t make it easier to use for scripte...

PowerShell Wizard
Jan 25, 2009
Post comments count 0
Post likes count 0

PowerShell Wizard

PowerShell Team
PowerShell Team

Ye110wbeard did it again. Check THIS out.  Loads of fun.   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

A Bit More On BITS
Jan 23, 2009
Post comments count 0
Post likes count 0

A Bit More On BITS

PowerShell Team
PowerShell Team

I was in a meeting yesterday talking about BITS and what an awesome service it was.  I described what it did and how it allowed people to avoid a wide range of low-class, pain in the butt problems.  The question then became, "why isn't everyone using it?"  That's a darn good question.  The answer is that we have not educated people about it.  I aim to fix that.  I wrote an earlier blog on BITS HERE.  Alex Ng has just written a nice blog about it HERE.  Check it out, try it out, tell a friend (and consider the internet a friend). Experiment! Enjoy! Engage! Jef...

Debugging PowerShell Script Using the ISE Editor
Jan 19, 2009
Post comments count 0
Post likes count 0

Debugging PowerShell Script Using the ISE Editor

PowerShell Team
PowerShell Team

Hi writers and consumers of buggy scripts.This post explains the basics of the Graphical Debugger in the ISE. There’s a lot of good stuff, with some tips and tricks.The debugger support got the cmdlets and user interface.  The cmdlets include  Enable/Disable/Get/Set/Remove-PsBreakpoint and Get-PsCallStack.The general feel is to place breakpoints across the script, continue (F5) to jump from breakpoint to breakpoint, and step over, step into, and step out to move around. You can also get the call stack, and hover over variables to get their values.BreakpointsLine breakpoints are easy to add, with F9 or c...

Why Should I Test With PowerShell?
Jan 19, 2009
Post comments count 0
Post likes count 0

Why Should I Test With PowerShell?

PowerShell Team
PowerShell Team

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)
Jan 17, 2009
Post comments count 0
Post likes count 0

Using PowerShell to Protect Against Conficker (Enabling and Disabling AutoRun.inf)

PowerShell Team
PowerShell Team

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
Jan 16, 2009
Post comments count 0
Post likes count 0

Group Policy Cmdlets in Windows 7

PowerShell Team
PowerShell Team

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
Jan 16, 2009
Post comments count 0
Post likes count 0

How To Make Your Own Module Repository

PowerShell Team
PowerShell Team

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)
Jan 15, 2009
Post comments count 0
Post likes count 0

Please Join Me for a Power Scripting Podcast Tonight @ 9PM EST (6PM PST)

PowerShell Team
PowerShell Team

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
Jan 14, 2009
Post comments count 0
Post likes count 0

Windows 7 Troubleshooting

PowerShell Team
PowerShell Team

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
Jan 14, 2009
Post comments count 0
Post likes count 0

Podcast Discussing WSMAN 1/14/2008

PowerShell Team
PowerShell Team

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
Jan 13, 2009
Post comments count 0
Post likes count 0

Interactive remoting in CTP3

PowerShell Team
PowerShell Team

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
Jan 12, 2009
Post comments count 0
Post likes count 0

How to copy colorized script from PowerShell ISE

PowerShell Team
PowerShell Team

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...

Please Give Us Feedback
Jan 12, 2009
Post comments count 1
Post likes count 0

Please Give Us Feedback

PowerShell Team
PowerShell Team

With the release of Win7/WS08R2 beta, we are officially in the end game of PowerShell V2.  This is the phase were we can only respond to customer feedback and we rely upon customer feedback to tell us whether and when we are ready to ship.  In other words - now is when we need to hear from you the most.  I'm very excited about what we are delivering in PowerShell V2.  As a community, we are going to be using these bits for many many years so let's work together to ensure that they are the best possible.   Experiment! Enjoy! Engage! Jeffrey Snove...

V2 Blog Entries
Jan 12, 2009
Post comments count 0
Post likes count 0

V2 Blog Entries

PowerShell Team
PowerShell Team

In a recent comment Peter asked if we could mark blog entries that relate to v2.  We are already doing that with TAGs.  If you look at the bottom of an entry, it will say FILED UNDER and then a set of tags.  We are marking blog entries with things like:  CTP3 and PowerShell V2. 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

Copy console screen to system clipboard
Jan 11, 2009
Post comments count 0
Post likes count 0

Copy console screen to system clipboard

PowerShell Team
PowerShell Team

In the previous example we learned how to create a colorized copy of console in HTML and RTF format. However, the output of these scripts cannot be readily used for pasting into web or word processing applications. To insert it into your article in MS Word format, you need several steps: generate RTF string, save it to an RTF file, then open the file in MS Word, copy its contents and, finally, paste it into your document. Can we reduce it to two steps: run the script, which copies console screen to system clipboard, and then paste the results to MS Word? As a matter of fact we can, but to do this we need to learn...

Colorized capture of console screen in HTML and RTF.
Jan 11, 2009
Post comments count 0
Post likes count 0

Colorized capture of console screen in HTML and RTF.

PowerShell Team
PowerShell Team

In the previous post we demonstrated how we can use console host API to capture screen buffer contents as text. But what if we want some colors. Would not it be nice to publish colorized copy of console in HTML or insert it as part of Microsoft Word document. For this to work we need to add some modifications to original script. Colors of each character are available as properties of System.Management.Automation.Host.BufferCell object: All we need to do is to iterate through the screen buffer array, keeping track of the cell colors and generate HTML spans or RTF blocks with varying color attributes as soon as t...

Finding a URL For File Transfer Cmdlets
Jan 11, 2009
Post comments count 0
Post likes count 0

Finding a URL For File Transfer Cmdlets

PowerShell Team
PowerShell Team

I just posted a blog about our new File Transfer Cmdlets in which I artfully dodged a difficult question:  How do you get the URL to do the file transfer?  Sometimes you are going to have it but other times you’ll go to a website and it can be bloody impossible to find the URL that you need to download.  That was the case with the example I used.  Let me provide it.  Navigate HERE and tell me if you can find the URLs to download the kits? (If you find out how – let me know – I’d REALLY appreciate it.) My new motto is Experiment, Enjoy, Engage (which means share).  Luckily, we have a...

Transferring (Large) Files Using BITs
Jan 11, 2009
Post comments count 0
Post likes count 0

Transferring (Large) Files Using BITs

PowerShell Team
PowerShell Team

Have you had a file copy fail?  Does that drive you crazy or what?  How about when it is a REALLY big file and it takes a couple of hours and JUUUUUST before it finishes something happens to interrupt the transfer and you have to start all over again.  Does that make you want to shove a sharpened #2 pencil up your nose or what? I got to thinking about these things when I saw that the W7 and WS08/R2 beta bits were available and that the demand was so high that the servers were having a hard time keeping up.  Can you image how you would react if you downloaded a GB and then the transfer failed?&...

Test-PSCmdlet
Jan 10, 2009
Post comments count 0
Post likes count 0

Test-PSCmdlet

PowerShell Team
PowerShell Team

Everyone needs to get good with Advanced Functions – this is the easiest path to the best semantics for everyone.  In previous posts we’ve shown how you can add a few simple attributes and get a TON of stuff for free.  There is a LOT more to advanced functions.  You can go VERY VERY far with advanced functions.  I can’t think of anything you can do in C# Cmdlet that you can’t do with a PowerShell cmdlet.  Many of these functions are made available to you via the $PsCmdlet variable. For example, if  you write a Cmdlet which takes multiple ParameterSets, you need to know which Paramete...

Capture console screen
Jan 10, 2009
Post comments count 0
Post likes count 0

Capture console screen

PowerShell Team
PowerShell Team

Seeing nicely formatted console examples in a previous post has inspired me to write a script that captures the console screen buffer directly from the Windows PowerShell console host. With this script you can make console "screen shots" to demonstrate some of your favorite Windows PowerShell concepts, and then post them to your blog, or put them on your Web site. How is it done? The console host has a powerful API that is somewhat neglected by most script writers. This API allows you to capture console screen rectangles or output a colorized text in arbitrary areas of the screen. The console...

PowerShell as Inventory Tool
Jan 10, 2009
Post comments count 0
Post likes count 0

PowerShell as Inventory Tool

PowerShell Team
PowerShell Team

Check out Don Jones’ TechNet article Windows Powershell Best Inventory Tool Ever!  He as a streaming video demo at that location as well.  Cool stuff.  I really enjoy the way Don explains things.  It is well worth a view and worth recommending to your friends that are learning PowerShell. Cheers! 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

Get-USB – Using WMI Association Classes in PowerShell
Jan 10, 2009
Post comments count 0
Post likes count 0

Get-USB – Using WMI Association Classes in PowerShell

PowerShell Team
PowerShell Team

Last Thursday, we had our first meeting of PowerShell Script Club on the Microsoft Campus. Script Clubs are really cool. They're kind of like a hands on lab with no set topic or teacher. You bring an idea for a script, and ask your fellow PowerShell users about help getting the script written.  Leave a comment if you’d like to set up a local script club. One of the questions I helped answer involved using a WMI association class, which is a class in WMI that links two other classes together. Association classes are pretty common, and pretty useful, once you get the hang of them. One association class is Wi...

Beta of Windows Server 2008 R2 is now Available
Jan 9, 2009
Post comments count 0
Post likes count 0

Beta of Windows Server 2008 R2 is now Available

PowerShell Team
PowerShell Team

Want a couple hundred new cmdlets?  Download the beta version of Windows Server 2008 R2 and check out all the cmdlets that we've been dying to talk about but have not been able to.  Also, take a look at what is missing and complain early, often and loudly.  And of course -don't forget to blog about what you find. Download details HERE.   Cheers! 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/sc...

Multiple Shell Reference Guide
Jan 9, 2009
Post comments count 0
Post likes count 0

Multiple Shell Reference Guide

PowerShell Team
PowerShell Team

Sylvain Galineau just sent me a pointer to a cool site which has reference information for multiple shells:  CMD, PS, BASH, ORACLE, and SQLSERVER.  It's not complete but it is a nice reference point.  Enjoy it HERE.   Thanks Sylvain! 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

Managing Remote Desktop services (aka Terminal services) using Windows PowerShell
Jan 9, 2009
Post comments count 0
Post likes count 0

Managing Remote Desktop services (aka Terminal services) using Windows PowerShell

PowerShell Team
PowerShell Team

Hello everyone, We are pleased to announce that the Beta release of Windows server 2008 R2 supports managing Remote Desktop services using PowerShell.  You can now configure and manage all RDS role services and components using PowerShell.  For example, below are few management tasks that you can now do with PowerShell 1.       View and edit configuration settings of Remote Desktop server 2.       Publish RemoteApp applications 3.       Configure License Server 4.       Create and con...

Case Insensitivity
Jan 8, 2009
Post comments count 0
Post likes count 0

Case Insensitivity

PowerShell Team
PowerShell Team

This VIDEO explains the real reason why PowerShell is case-insensitive.  (just joking - the video is deadly funny!). 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

Manage winrm settings with wsman provider
Jan 6, 2009
Post comments count 0
Post likes count 0

Manage winrm settings with wsman provider

PowerShell Team
PowerShell Team

PowerShell remoting is built on top of Windows Remote Management (WinRM), which is Microsoft’s implementation of WS-Management protocol. You can use winrm.cmd command line tool to query and manage winrm settings. PowerShell V2 CTP3 contains a wsman provider for you to manage winrm settings with the standard *-Item cmdlets . Let’s try it out: PS C:\> cd wsman:PS WSMan:\> dir   WSManConfig: Microsoft.WSMan.Management\WSMan::WSManComputerName                          &nbsp...

Checkout Out-WPF
Jan 5, 2009
Post comments count 0
Post likes count 0

Checkout Out-WPF

PowerShell Team
PowerShell Team

Joel (Jaykul) Bennett has a cool post HERE where he is experimenting with some GUI scripting toolkits and a utility Out-WPF.  You can also checkout a Screencast of Out-WPF working HERE.  It is very cool and very short so give it a look-see. Scripting GUIs with PowerShell is going to be a REALLY BIG DEAL going forward. 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

Invoking Methods Using Variables
Jan 5, 2009
Post comments count 0
Post likes count 0

Invoking Methods Using Variables

PowerShell Team
PowerShell Team

You can have a lot of fun with PowerShell.  Makes sense right - we're busting our butts off and we get to define it so why wouldn't we make it fun? Your busting your butts off at your job as well so why shouldn't your tools be fun?  Right? In particular, our late binding of names allows you to do some really cool, really powerful stuff.  Here is an example: PS> $d=Get-Date PS> foreach ($p in "Day","hour","minute") {"$p :  " + $d.$p } Day :  5 hour :  8 minute :  53 This allows you to write some very fun c...

Scott Herold – Getting Started With PowerShell and PowerGUI in your Virtual Infrastructure
Jan 5, 2009
Post comments count 0
Post likes count 0

Scott Herold – Getting Started With PowerShell and PowerGUI in your Virtual Infrastructure

PowerShell Team
PowerShell Team

Scott Herold has published the first of a three part series called Getting Started With PowerShell and PowerGUI in your Virtual Infrastructure.  I believe that MOST admins should spend time getting  PowerGUI in focus and especially those admins that are intimidated by the command line interface.  Scott only has part 1 of his series available and while it applies to Virtual Infrastructure (VMWare), the points Scott makes are generic so I encourage everyone that isn’t already a PowerGUI user to go give it a read.  When you are done then go to PowerGUI.Org, download the latest version and give it...

Revisiting Old Posts: Get-Process | Dir (about ValueFromPipelineByPropertyName)
Jan 5, 2009
Post comments count 0
Post likes count 0

Revisiting Old Posts: Get-Process | Dir (about ValueFromPipelineByPropertyName)

PowerShell Team
PowerShell Team

A number of PowerShell MVPs and PowerShell team members are helping me to compile a table of contents for our blog, which basically means that I’m getting to go back and revisit all of the fun stuff posted to the PowerShell blog over the past few years.  It’s a fun an educational process, and, hopefully, when we’re done the blog will be a much simpler place to explore. I’m trying to keep my eye on the ball, and compile the table of contents instead of expounding more on previous posts, but some things are just too cool to resist. For instance, check out this post from September 17th, 2006: Get-Process | D...

PS> Dir –A D     The Screencast
Jan 4, 2009
Post comments count 0
Post likes count 0

PS> Dir –A D The Screencast

PowerShell Team
PowerShell Team

I decided to experiment with a screencast.  This is my first and I have no idea what I’m doing so please forgive me if it sucks.  I’d like to know whether you find this format useful or not and then specific feedback about how to make the screencast better (e.g. I recorded it at 1024x768  - is that good or too large?). In my previous blog – I mentioned that Proxy cmdlets are super important and powerful and that they can look complex but are actually pretty simple if you follow the steps.  I decided that a video was worth a thousand words.  In this screencast (~ 5.5 minutes long), I show ...

Extending and/or Modifing Commands with Proxies
Jan 4, 2009
Post comments count 0
Post likes count 0

Extending and/or Modifing Commands with Proxies

PowerShell Team
PowerShell Team

There are so many powerful features in V2, it is hard to know where to begin.  This one is going to blow to top of your head off when you understand what it enables you to do. In this blog, I talk about Proxy Cmdlets which is the ability for one Cmdlet to call another.  You could always do this but to do it right has always been very difficult.  In particular, what you want to have happen is to be able to control the execution of the calling command - to control when it's BEGINPROCESS(), PROCESSRECORD(), ENDPROCESS(), etc methods are called so that it behave with the correct behavior.  What yo...

Programming PowerShell_ISE
Jan 4, 2009
Post comments count 0
Post likes count 0

Programming PowerShell_ISE

PowerShell Team
PowerShell Team

I recently wrote a blog Powershell_Ise Can Do a Lot More Than You Think where I described the ability to program it to do new stuff.  Karl Prosser has picked up the baton and written some cool scripts programming the PowerShell_ISE to make it do some of the features that he had put into his amazing PowerShell Analyzer.  I encourage you to read his blog and study his code so you get a feel for the sort of things you can do and then use Karl as your inspiration and write some of your own extensions and share them with the community. You can read Karl’s blog and get his code HERE. Cheers! Jeffrey Snover...

Diagnosing Here-Strings With PowerShell_ISE
Jan 3, 2009
Post comments count 0
Post likes count 0

Diagnosing Here-Strings With PowerShell_ISE

PowerShell Team
PowerShell Team

James Brundage posted a blog entry How To Write a Console Application in PowerShell with Add-Type which used a here-string.   One user (lcr) copied and pasted the text and got the following error: Unrecognized token in source text. At line:1 char:72 + Add-Type -OutputType ConsoleApplication -OutputAssembly HelloWorld.exe  < <<< @"     + CategoryInfo          : ParserError: (:) [], ParentContainsErrorReco    rdException     + FullyQualifiedErrorId : UnrecognizedToken &...

How To Write a Console Application in PowerShell with Add-Type
Jan 2, 2009
Post comments count 0
Post likes count 0

How To Write a Console Application in PowerShell with Add-Type

PowerShell Team
PowerShell Team

Windows PowerShell CTP3 has a lot of very cool things.  CTP2 introduced the Add-Type cmdlet, which allowed you to dynamically compile C# in PowerShell.  It was actually possible to use the CompilerParameters to Add-Type to make a console application, but it wasn't particularly easy.  In CTP3, we've made this a lot easier to do. There's now an -OutputType parameter for Add-Type.  It can either output a Library (the default), a ConsoleApplication, or a WindowsApplication.  Check out this really quick "Hello World" program built using Add-Type. Add-Type -OutputType Cons...

Get-Verb
Jan 2, 2009
Post comments count 0
Post likes count 0

Get-Verb

PowerShell Team
PowerShell Team

.cmdletname { font-size:large } .cmdletsynopsis { font-size:medium } .cmdletdescription { font-size:medium } .cmdletparameters { font-size:medium } th { font-size: medium; font-style: italic } table { border: 1 } When I write a PowerShell function, I try to ensure that it follows the PowerShell standard verbs. These verbs actually exist as static properties in a few different types in PowerShell, so I thought I'd make a quick advanced function so I can get all of the Verbs. Check it out: Get-Verb Synopsis: Gets the standard PowerShell verbs ...

How and Why to Use Splatting (passing [switch] parameters)
Jan 2, 2009
Post comments count 0
Post likes count 0

How and Why to Use Splatting (passing [switch] parameters)

PowerShell Team
PowerShell Team

On our internal discussion list, someone just asked about how to pass switch parameters from one function to another.  This person asked this as "Why can't [switch] parameters be passed as parameters?". My short answer was simple: "They Can Be" Answering this question is a great way to illustrate the value of a PowerShell V2 feature called Splatting.  Splatting is two things, it's a way to get all of the parameters passed to a function automatically (they're in a variable, $psBoundParameters), and it's a way to take a list or dictionary of arguments and pass them on to the next fun...

A Module to Create Modules and Advanced Functions
Jan 2, 2009
Post comments count 0
Post likes count 0

A Module to Create Modules and Advanced Functions

PowerShell Team
PowerShell Team

[1/3/09 Update - the original link to the attachment containing this code was broken but is now fixed.  Sorry. jps] It is hard to overstate how important Modules and Advanced Functions are.   If you are a PowerShell user - you need to take the time to learn these new mechanisms and use them as your first choice in implementing new functions.  The reason for this is that these mechanisms are critical technologies to support SHARING.  Advanced Functions provide help, parameter tab-completion, and cmdlet semantics that make it easy for other people to use your functions.  Who...

PowerShell_ISE Scripting: ConvertTo-Comment
Dec 31, 2008
Post comments count 0
Post likes count 0

PowerShell_ISE Scripting: ConvertTo-Comment

PowerShell Team
PowerShell Team

Let me combine a couple of things.  1) When I posted my PowerShell_ISE profile, I included a function Goto-Line that is now builtin to the ISE so I reposted the blog with this function commented out. I commented it out instead of deleting it because I wanted to provide an example of how to do it. 2) Vivek Sharma left a comment asked about programmatically controlling indentation so I gave a couple of pointers to the objects required to program the editor. So let’s take those 2 and put them together and write a function which will convert the selected text into a PowerShell comment (using another CTP3 fea...

I’m Changing My Name To Sznarwakowski
Dec 31, 2008
Post comments count 0
Post likes count 0

I’m Changing My Name To Sznarwakowski

PowerShell Team
PowerShell Team

I was just reading a blog post where they were showing al the SCVVM commands in a list.  I was going to refer them to my blog which shows how the display that list of commands in a really nice format.  I have no idea where that blog post is so I decided to search for my name and scvvm.  Here is what I got:   I think I'm going back to the old family name:  Sznarwakowski. Sure I'll spend the rest of my life telling people how to pronounce and spell it but at least I won't be confused with a serial killer/sex cannibal or an Enron felon. Oh wait! It gets better (worse?).  I didn't rem...

My Powershell_ISE Profile Part 2
Dec 30, 2008
Post comments count 0
Post likes count 0

My Powershell_ISE Profile Part 2

PowerShell Team
PowerShell Team

I messed up. First let me remind you that what you have are CTP bits and that CTP bits are subject to change.  It turns out that we are tweaking the PowerShell_ISE object model and that the profile I posted does not work with CTP3.  I’m sorry for that screw up. You can use the amazing PowerShell_ISE to fix this problem.  All you need to do is a search and replace of: CurrentOpenedRunspace.ToolsMenu with CustomMenu Also GoTo-Line is now built into the editor so you should comment that out.  I’ll keep it in the script (commented out) so that you can see how it works. I’ve attached the...

My PowerShell_ISE Profile
Dec 29, 2008
Post comments count 0
Post likes count 0

My PowerShell_ISE Profile

PowerShell Team
PowerShell Team

[UDPATE - the original post had a script which did not work with CTP3 so I've replaced it with the correct version.  Apologizes for the screw up. I've updated the attached file as well. - jps]  I thought I would share my PowerShell_ISE profile with you.  I haven't done anything to clean this up or document it which I should do before sharing but I figured that it would be better to get some good examples out there and then I can clean it up later.   # I'm doing a lot of work with Modules these days so I added a drive to make it easy to # get to. New-PsDrive -Name Mod -PSProvider...

Download Windows PowerShell
Dec 29, 2008
Post comments count 0
Post likes count 0

Download Windows PowerShell

PowerShell Team
PowerShell Team

  Available Releases The following releases of Microsoft Windows PowerShell are available for download: Windows Management Framework 3.0 <<-- Latest RTM Release!    Windows Management Framework    Windows PowerShell 2.0 CTP3 Windows PowerShell 1.0 RTM Related Downloads Deprecated Releases The following releases are no longer available online: Windows Management Framework RC - PowerShell+WinRM+BITS Windows PowerShell 2.0 CTP2 Windows PowerShell 2.0 CTP1    

Write-CommandBlogPost
Dec 24, 2008
Post comments count 0
Post likes count 0

Write-CommandBlogPost

Radhika Tadinada
Radhika Tadinada

.CmdletName { font-size:large } .CmdletSynopsis { font-size:medium } .CmdletDescription { font-size:medium } .CmdletParameters { font-size:medium } th { font-size: medium; font-style: italic } table { border: 1 } On the PowerShell team, we're big believers in the Virtuous Cycle. As you learn PowerShell more and more, things should get easier and easier to do. Inline help is a great example of the virtuous cycle, because it allows you to write scripts in such a way that they're easy to learn about the same way you learn about most things i...

Experiment with PowerShell V1 Without Installing It
Dec 24, 2008
Post comments count 0
Post likes count 0

Experiment with PowerShell V1 Without Installing It

PowerShell Team
PowerShell Team

If you are reading this, you probably already use PowerShell but you might know someone that has resisted installing it and trying it out.  Thomas Lee posted a blog HERE with a pointer to a Virtual PowerShell lab on TechNet. This allows you to Terminal Serve into a hosted virtual machine and kick the tires. In other words you get to run PowerShell without installing it. Once they are done – they can install it.  :-) I didn’t know anything about this but we should try to get them to do this with V2 CTP3 – that would be cool. Thanks for the pointer Thomas! Jeffrey Snover [MSFT] Windows Management Part...

PowerShell V2 – External MAML Help
Dec 24, 2008
Post comments count 0
Post likes count 0

PowerShell V2 – External MAML Help

PowerShell Team
PowerShell Team

As you’ve probably picked up by now – Advanced Functions are super important. We've been showing a bunch of scripts that have embedded help using comments and dot-tags. Let me take a second and drill into this. We believe that PS will be used in a wide range of; scenarios: simple one liners; personal ad hoc scripts; scripts you share with your friends; scripts you share with the community; scripts you in your commercial product. It is our goal to have a single mechanism with progressively richer and richer optional features to support this entire range of scenarios. We’ve been showing you the Community H...

PowerShell v2 Pipelining in 73 (make that 53) Characters
Dec 24, 2008
Post comments count 0
Post likes count 0

PowerShell v2 Pipelining in 73 (make that 53) Characters

PowerShell Team
PowerShell Team

I started using Twitter and saw a request from Thomas Lee for help about pipelining in CTP3.  The thing about Twitter is that the messages have to be tiny so I wasn’t sure I could answer using it.  It turns out I can solve this problem AND give a usage example in 73 characters.  Here goes: PS> function t{param([Parameter(ValueFromPipeline=1)]$t);process{$t}};1..10|t 1 2 3 4 5 6 7 8 9 10 Now if you put it into a file (which is actually what Thomas asked for), then it is only 53 characters: PS> cat t.ps1 param([Parameter(ValueFromPipeline=1)]$t);process{$t} PS> cat t.ps1 |Measure -Charact...

Resolve-ShortcutFile
Dec 24, 2008
Post comments count 0
Post likes count 0

Resolve-ShortcutFile

PowerShell Team
PowerShell Team

If you're like me, you've got a browser favorites folder that is full of wonderful PowerShell code snippets. Ideally, it would be great to have a way to bring those favorite snippets into PowerShell so that my favorites folder becomes a code library. Doing this presents several challenges. The first (and easiest to solve) is getting the web page the shortcut points to out of the .url file. .url files are in the same sort of format as .ini files (each line has a property name, and =, and the value). So to get the url out of a shortcut file, I simply had to Get-Content on the file, pipe it to Where-Object, look f...

Get-MarkupTag
Dec 24, 2008
Post comments count 0
Post likes count 0

Get-MarkupTag

PowerShell Team
PowerShell Team

On my personal blog (Media And Microcode), I've been posting a series called "Scripting the Web", which introduced a function called Get-MarkupTag. Get-MarkupTag is a very handy little function that coerces individual tag elements of a web page into HTML, so you can scrape data from a webpage. I've updated Get-MarkupTag a tiny bit for CTP3, marking the tag name as value from pipeline so I can get multiple tag types from a single document. I'm posting it again here so that a wider audience can make use of it, and so that I can use it in some later blog posts. Since I've already got inline help for the f...

Advanced Functions and Test-LeapYear.ps1
Dec 23, 2008
Post comments count 0
Post likes count 0

Advanced Functions and Test-LeapYear.ps1

PowerShell Team
PowerShell Team

Welcome to CTP3!  There are just an amazing amount of really important features in V2 but the one I want everyone to start using ASAP is Advanced Functions.  In CTP2 we called this cmdlets.  We dropped that term in favor of taking the idea of a FUNCTION and just making it more and more capable.  It is a bit of a misnomer in that you can have an "Advanced function" by just adding a single line to your script.  You'll be amazed what that single line gives you; but we'll explore that later.  This entry recaps where we are with functions and then begins to give you a feel for some of the...

More Advanced Functions – Get-Assembly and Get-ExportedType
Dec 23, 2008
Post comments count 0
Post likes count 0

More Advanced Functions – Get-Assembly and Get-ExportedType

PowerShell Team
PowerShell Team

Tyson Kopczynski has just published a great article Fun with PowerShell 2.0 Eventing!  That inspired to to write a script to automatically backup my modules directory.  I'm doing a lot of scripting this week and I don't want to lose my work if I make a mistake.  I thought I would write a scripting using PowerShell 2.0 Eventing to watch my directory and then make a backup copy automatically. The way to do this is with a FileSystem Watcher or something like that.  Here is where the story changes and why the title of this blog is not "Backup Your Modules Automatically with PS V2 Eventing". ...

PowerShell V2: ParameterSets
Dec 23, 2008
Post comments count 0
Post likes count 0

PowerShell V2: ParameterSets

PowerShell Team
PowerShell Team

One of the great benefits of PowerShell V2 Advanced Functions is the ease in which you can support parametersets.  ParameterSets are, well, different SETS of valid parameters.  For instance you can say: Get-Process -id 0 Get-Process -Name *ss Those are 2 different parametersets for the Get-Process cmdlet.  Here is an example of how you would code parametersets using advanced functions: function test-param { param( [Parameter(ParameterSetName="p1",Position=0)] [DateTime] $d, [Parameter(ParameterSetName="p2", Position=0)] [int] $i )     switch ($PsCmdlet.ParameterSetName)  &n...

Windows PowerShell CTP2 to CTP3 Conversion Guide
Dec 23, 2008
Post comments count 0
Post likes count 0

Windows PowerShell CTP2 to CTP3 Conversion Guide

PowerShell Team
PowerShell Team

I write a lot of scripts, and, since I blog some of what I write, my home computer has been running Windows PowerShell CTP2 since it came out.  Since CTP3 has a number of changes from CTP2, I've got to update my home script library to work with CTP3.  While this guide might not have every change that happened in between CTP2 and CTP3 (because I script with most, but not all, of PowerShell), I hope that this record of conversion steps helps everyone else moving from Windows PowerShell CTP2 to CTP3.  Oisin Grehan has posted a fairly complete list of cmdlet name changes on his blog, Nivot Ink.  T...

Dreaming In PowerShell V2 : Lottery Numbers with Get-Random
Dec 23, 2008
Post comments count 0
Post likes count 0

Dreaming In PowerShell V2 : Lottery Numbers with Get-Random

PowerShell Team
PowerShell Team

Tobias Weltner writes a blog called Dreaming In PowerShell, and he recently posted a way to get a list of unique lottery numbers with PowerShell.  Dreaming In PowerShell is a cool blog, and the post is interesting, but it makes an assertion that's no longer true in V2.  He uses System.Random to create the random numbers because he asserts that there isn't a cmdlet to Get random numbers.  Get-Random is a V2 cmdlet that can not only give you random numbers, but can give you unique random numbers within a range My CTP3 version is on the left, Tobias' V1 version is on the right: The core function...

Mount-SpecialFolders.ps1
Dec 15, 2008
Post comments count 0
Post likes count 0

Mount-SpecialFolders.ps1

PowerShell Team
PowerShell Team

The other day I showed you how you can use ENUMs.  I showed an example of how you can find all the SPECIALFOLDERs on a system.  Here is a script that I call Mount-SpecialFolders.ps1 which mounts all your special folders as PowerShell drives.   # Mount-SpecialFolders.ps1 # param($Folder="*", [SWITCH]$Verbose, [SWITCH]$PassThru) foreach ($f in [Enum]::GetValues([System.Environment+SpecialFolder]) |where {$_ -like $Folder}) {     $drive = New-PSDrive -Name $f -PSProvider FileSystem -Root ([Environment]::GetFolderPath($f)) -Scope Global -ErrorAction Silen...

What the Heck is an ENUM?
Dec 14, 2008
Post comments count 0
Post likes count 0

What the Heck is an ENUM?

Radhika Tadinada
Radhika Tadinada

In my latest post Explore your [Environment] I said the following: PS> [System.Environment+SpecialFolder] IsPublic IsSerial Name                                     BaseType -------- -------- ----                                     -------- Fa...

Explore Your [Environment]
Dec 13, 2008
Post comments count 0
Post likes count 0

Explore Your [Environment]

PowerShell Team
PowerShell Team

This topic is a little long but I strongly encourage you to walk through it and master the techniques it illustrates.  I can assure you that you'll will use them a couple thousand times in the next couple of years. .Net provides a wonderful class called System.Environment that tells you all about your environment.  It is well worth taking a few minutes to stop what you are doing and explore this class so that you understand its capabilities.  That way when a relevant issue comes up, you'll know that there is very simple way to get the answer.  First thing to remember is that they way you sp...

Gesticulating Ben Pearce
Dec 11, 2008
Post comments count 0
Post likes count 0

Gesticulating Ben Pearce

PowerShell Team
PowerShell Team

I gave a talk with Ben Pearce during IT Forum in Barcelona this year.  It was the first time I had ever given a talk with Ben as was shocked (and delighted) by his speaking style.  Ben is an awesome presenter.  Full Stop.  That said, one of his presentation techniques is to use of very energetic, very large, very expressive arm movements.  No until you understand this, you might think that Ben was having an seizure on stage.  (If you watch the first talk you see Ben starting the talk with some wild movements and when it my part of the intro - I just sorta stared at him not knowing ...

Get-Me.ps1
Dec 2, 2008
Post comments count 0
Post likes count 0

Get-Me.ps1

PowerShell Team
PowerShell Team

On an internal mailing list someone asked how to get the SID for the current context using PowerShell.  Chris Bellée correctly responded: ([Security.Principal.WindowsIdentity]::GetCurrent()).user.accountdomainsid.value   I used this to create a script:  Get-Me.ps1 # Get-Me.ps1 [Security.Principal.WindowsIdentity]::GetCurrent()   PS> .\get-me.ps1 AuthenticationType : NTLMImpersonationLevel : NoneIsAuthenticated    : FalseIsGuest            : FalseIsSystem           ...

Apologizes for the Confusion
Dec 2, 2008
Post comments count 0
Post likes count 0

Apologizes for the Confusion

PowerShell Team
PowerShell Team

If you visited our blog yesterday and were driven to go get a basket of "Freedom Fries" - you can relax.If you visited our blog yesterday and thought we were trying to get some class - I'm sorry to say that that is not the case.  The good news is that there is a new PowerShell blog in French at http://blogs.technet.com/powershell/default.aspx . The bad news is that for some reason, this caused our blog (MSDN vs TECHNET) to get redirected to that blog. Obviously it's fixed now.  Apologizes for the confusion. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell T...

Get-Everyone
Dec 2, 2008
Post comments count 0
Post likes count 0

Get-Everyone

PowerShell Team
PowerShell Team

Jeffery Snover just posted a Get-Me script.  The Get-Me script finds out the principal of the user running PowerShell.  In case you ever wanted to know how to get all of the users on a machine (or from a domain), here's a quick function that queries WMI for users. function Get-Everyone([switch]$fromDomain) { #.Synopsis # Gets all users #.Description # Queries WMI to get all users. To save time, queries # are local unless the -fromDomain switch is used #.Parameter fromDomain # If set, gets domain users as well as local accounts #.Example # # Get Al...

PoshBoard and ConvertTo-HashTable
Nov 23, 2008
Post comments count 0
Post likes count 0

PoshBoard and ConvertTo-HashTable

PowerShell Team
PowerShell Team

I’m currently watching an cool video of PoshBoard a PowerShell based Web Portal by Pilosite available on CodePlex.   It looks great.  In the middle of the video I noticed the following script he uses to populate one of the controls on the dashboard: $ht = @{ } $objDrives = gwmi –class “Win32_logicalDisk” –Namespace “root\cimv2” |where {$_.DriveType -eq 3 } foreach ($ObjDisk in $objDrives) {     $size = $objDisk.size / 1024     $freespace = $objDisk.FreeSpace / 1024     $IntUsed = ($size - $freeSpace) * 1024     $ht.Add($objDisk.DeviceId...

Verbs vs Nouns by Snapin
Nov 22, 2008
Post comments count 0
Post likes count 0

Verbs vs Nouns by Snapin

PowerShell Team
PowerShell Team

A while ago the System Center Virtual Machine Manager team showed me a chart of their cmdlets.  It was an Excel spreadsheet which had the VERBs as rows and the NOUNs as columns.  I thought that this was a wonderful way to look at the cmdlets.  I woke up this morning and decided to write a script which would do something similar.  I’ve attached that script which accomplishes that task.  In the process, I decided that there is a good general purpose function here but I haven’t figured out what it’s name is so right now I’m just calling it ConvertTo-XXX (I’m open to suggestions).  NOTE ...

Step up your FOREACH Game
Nov 19, 2008
Post comments count 0
Post likes count 0

Step up your FOREACH Game

PowerShell Team
PowerShell Team

Last night Bruce Payette and I were interviewed on the PowerScripting Podcast with Hal Rottenberg and Jonathan Walz.  It was a blast!  There were a ton of people connected and were firehosing questions & comments in the Chat window.  There were lots of comments/discussions about Twitter.  I confessed to having never used twitter.  This morning I got an email from Jeffery Hicks recommended a site called TweetGrid which lets you "monitor the tweet stream" without a Twitter account.  (If I get an account, do I become a Twit?)  He sent me a link to a page with search...

PowerShell Comic
Nov 11, 2008
Post comments count 0
Post likes count 0

PowerShell Comic

PowerShell Team
PowerShell Team

I just found THIS.  ha ha! 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

Faces From The PowerShell Community
Nov 9, 2008
Post comments count 0
Post likes count 0

Faces From The PowerShell Community

PowerShell Team
PowerShell Team

Jonathan Medd (of the Get-Scripting Podcast) held a PowerShell Panel discussion at TechEd EMEA where he asked various members of the PowerShell community questions.  I had a blast participating in this.  The group consisted of: We wanted to have more people on stage but we ran of chairs! Rolf Masuch the leader of the German PowerShell usergroup was there and took this picture so now you can see the faces behind the names. Cheers! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at:    http://blog...

Expert to Expert: Erik Meijer and Jeffrey Snover – Inside PowerShell
Nov 3, 2008
Post comments count 0
Post likes count 0

Expert to Expert: Erik Meijer and Jeffrey Snover – Inside PowerShell

PowerShell Team
PowerShell Team

I had a great time talking to Erik Meijer about PowerShell - what it is, how it works under the covers, why we do what we do and where we are going. You can see the interview on Channel 9 HERE. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

ES24: Using PowerShell To Create Manageable Web Services
Oct 31, 2008
Post comments count 0
Post likes count 0

ES24: Using PowerShell To Create Manageable Web Services

PowerShell Team
PowerShell Team

Attached are the slides I presented at the PDC.  Enjoy! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx ES24_Snover_v02.pptx

PowerShell_ISE and Visual Studio
Oct 30, 2008
Post comments count 0
Post likes count 0

PowerShell_ISE and Visual Studio

PowerShell Team
PowerShell Team

Scott Fulton has a good article describing my PDC talk HERE.  In it he says, "Starting with version 2, a user can conceivably write new PowerShell cmdlets in PowerShell, using the built-in IDE, completely independently of Visual Studio."  This is true but there is more to the story so here it is. PowerShell's Integrated Scripting Environment (ISE) actually uses an editor control which uses the same technology that will be in the next version of Visual Studio.  It is a great control and get's better and better with each snapshot we take.  We need to stop taking snapshots long before VS because...

VI PowerScripter From icomasoft
Oct 30, 2008
Post comments count 0
Post likes count 0

VI PowerScripter From icomasoft

PowerShell Team
PowerShell Team

icomasoft has just released VI PowerScripter.  PowerScripter is a PowerShell based extension module to VMWare's VI Client.  I have not seen it but looking at the online manual has got to make any admin start drooling.  The thing I like about this so much is that it leverages both PowerGadgets and PowerGUI.  This allows them to deliver a great experience to their customers without having to code it all themselves.  As those products get better, their product gets better.  Happy happy all around. I haven't used it (since I don't have a big VMWare environment [surprise :-) ]) so I...

574 Reasons Why We Are So Proud and Optimistic About W7 and WS08R2
Oct 29, 2008
Post comments count 0
Post likes count 0

574 Reasons Why We Are So Proud and Optimistic About W7 and WS08R2

PowerShell Team
PowerShell Team

In my previous blog post, I mentioned that we were all very proud and optimistic about W7 and WS08R2.  There are tons of reasons for this including how well the project has been run, the hardcore focus on quality and performance, the great new features, etc.  Another reason we are so optimistic is the availability of new cmdlets.  There are so many teams doing so much good work with PowerShell that it would spin your head.  Unfortunately - it is there news to tell not ours so we can have to bite our tongues and can't say anything.  We'll know that the Pre-Beta is out, we had Dan Harm...

PDC Day 1
Oct 28, 2008
Post comments count 0
Post likes count 0

PDC Day 1

PowerShell Team
PowerShell Team

I love the PDC.  You meet a ton of great people, see a ton of great technology and have time to think about how to take your game to the next level.  The big announcement was Windows Azure (I don't know about you but when I say that, it makes my mouth feel funny).  I thought Ray Ozzie did a good job explaining Azure as a new tier of computing.  Windows as an platform to enable seamless experiences across a broad range of devices:  phones/pdas, laptops/desktops/workstations, servers/clusters, web/cloud.  Scott Hanselman's session really demonstrated the value of this ...

NY Times Delcares PowerShell to be 30% of the value of Windows 7 :-)
Oct 28, 2008
Post comments count 0
Post likes count 0

NY Times Delcares PowerShell to be 30% of the value of Windows 7 :-)

PowerShell Team
PowerShell Team

Wow - the NY Times is Johnny-on-the-spot with their analysis of the 10 best features of Windows 7 for IT Pros HERE.  It turns out that PowerShell is responsible for 3 of them!   Come review time, I'm telling my boss that we're responsible for 30% of the value of W7.  :-) !!!  Just to be clear - I'm totally joking.  Windows 7 is an awesome release.  It has a ton of great stuff in it.  PowerShell IS awesome but it is a tiny just one of the huge wave of improvements.  You'll decided for yourself but we are all extremely proud and optimistic about W7.  Check it out:...

Another Great Don Jones Video Demo
Oct 21, 2008
Post comments count 0
Post likes count 0

Another Great Don Jones Video Demo

PowerShell Team
PowerShell Team

This month's TechNet magazine has a great video demo from Don Jones where he uses WMI to generate a simple Software Inventory Report.  The great thing about Don is his awesome ability to break things down into a series of simple steps.  He does this by using Get-WMIObject from the command line and then goes through a series of scripts to illustrate various techniques that give you better and better results (more power, better composability). If you are an advanced scripter, you probably already know the techniques that Don is illustrating  but this is a must see for people starting scripting - it ...

Emit-XML
Oct 17, 2008
Post comments count 0
Post likes count 0

Emit-XML

PowerShell Team
PowerShell Team

I was writing a demo yesterday and needed a quick and dirty way to generate some XML so I wrote the function below.  This highlights a couple of changes that are coming up in CTP3 that I thought I would preview. 1) The keyword "cmdlet" is going away and we'll just have "function".  Notice that now you can specify the [Parameter()]  attribute on parameters.  When you do that, we treat the function like a cmdlet.2) Here-strings can now NEST!  Look at how simple the code becomes when you do this.  I think you are going to find this to be one of the mo...

GoGrid Snap-in – Managing Cloud Services with PowerShell
Oct 14, 2008
Post comments count 0
Post likes count 0

GoGrid Snap-in – Managing Cloud Services with PowerShell

PowerShell Team
PowerShell Team

I was pleased to see Mitch Denny’s announcement and demo of a PowerShell snapin for GoGrid.  GoGrid is a cloud-based, multi-tier grid hosting service leveraging virtual machines.  The snapin is a shared source effort at CodePlex (there are now 52 PowerShell CodePlex Projects).  Very cool stuff.  What could go better together than cloud computing and PowerShell?  At the end of the day, cloud computing is about managing at scale in a lights out fashion and end-administrator self-servicing.  PowerShell is great at both of these and, as you’ll see at the PDC and our next CTP, PowerShel...

PowerShell at the PDC
Oct 12, 2008
Post comments count 0
Post likes count 0

PowerShell at the PDC

PowerShell Team
PowerShell Team

I’m giving the following session at the PDC in LA in a couple of weeks: PowerShell: Creating Manageable Web Services Learn how to create management web services using Windows PowerShell. Topics include: how to script against of a large set of machines, how to manage raw HW devices using WS-MAN and Web Services, how to create custom "constrained environments" for scripts to run in and how to make those available to thousands of customers by writing a scalable IIS application hosting PowerShell, and how to use proxy commands.   I’ll be showing some things that have never been seen before and maki...

PowerShell’s Security Guiding Principles
Sep 30, 2008
Post comments count 0
Post likes count 0

PowerShell’s Security Guiding Principles

PowerShell Team
PowerShell Team

One of most common issues we face with PowerShell comes from users or ISVs misunderstanding PowerShell’s security guiding principles. At a high-level, it seems to all make sense – execution policies help ensure that you only run scripts that you trust on your system. These protections are driven by PowerShell’s three main security features. For people that will never use PowerShell, that trust decision is made for you by way of PowerShell’s default “Restricted” execution policy. Others may want to use a verifiable identity chain as their important guiding factor, in which case the Authenticode signing certificate...

PowerShell and JAOO
Sep 29, 2008
Post comments count 0
Post likes count 0

PowerShell and JAOO

PowerShell Team
PowerShell Team

On Saturday I arrived in Aarhus Denmark for the JAOO conference.  JAOO stands for Java And Object Oriented but it is definitely NOT a Java conference - it is a language conference with lots of .NET, Ruby, Ajax content and then just a lot of really smart people talking about software in general.  I'm honored to be invited to talk about Windows PowerShell at a language conference because it allows me to start the process of setting the record straight regarding PowerShell as a language. People parse the world according to their past experience.  What that means is that a lot of people have pu...

PowerShellPlus Professional Edition Ships
Sep 24, 2008
Post comments count 0
Post likes count 0

PowerShellPlus Professional Edition Ships

PowerShell Team
PowerShell Team

I’ve talked about PowerShellPlus a few times before and it was the hit of last years IT Forum talks.  Now The official version is now available from Idera at http://www.idera.com/products/PowerShell/ .  It is going to cost $145/user but they are offering introductory pricing of $79/user until Oct 1st. Cheers! 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

Free Windows PowerShell ebook (Now In Italian)
Sep 23, 2008
Post comments count 0
Post likes count 0

Free Windows PowerShell ebook (Now In Italian)

PowerShell Team
PowerShell Team

Efran Cobisi has published an Italian version of Frank Koch's very popular PowerShell ebook .  You can download the Italian version HERE or go to the Windows PowerShell Italian Community website and pick it up in the Tutorial section.  It looks like there is some great stuff there - I wish I had learned Italian. :-)  Enjoy Ciao! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.ms...

Decision Input Requested:  -EQ with Characters
Sep 22, 2008
Post comments count 0
Post likes count 0

Decision Input Requested: -EQ with Characters

PowerShell Team
PowerShell Team

We are struggling with whether or not to make a change in our comparison operators and would like feedback from the community. Here is the documentation about comparision operators:   All comparison operators are case-insensitive by default. To make a comparison operator case-sensitive, precede the operator name with a "c". For example, the case-sensitive version of "-eq" is "-ceq". To make the case-insensitivity explicit, precede the operator with an "i", for example, the explicitly case-insensitive version of "-eq" is "ieq". Here are examples of the current -EQ semantics: PS> "...

Adam Weigert Puts NetApp On a String
Sep 21, 2008
Post comments count 0
Post likes count 0

Adam Weigert Puts NetApp On a String

PowerShell Team
PowerShell Team

Adam Weigert has started a new Codeplex project PowerShell OnTap.   (That brings the total number of PowerShell-related CodePlex projects to 48!)  OnTap provides a functions to manipulate NetApp servers using the OnTAP web service APIs. I’m not a NetApp user but I was interested in what he was doing and was delighted to read his code.  It is an excellent example of PowerShell coding practices and has a number of excellent and clever techniques in it.   I LOVE Adam’s code – it is logical, clean and visually coherent.  You should view it in an editor that does syntax coloring (lik...

A Thousand Things 1% Better
Sep 18, 2008
Post comments count 0
Post likes count 0

A Thousand Things 1% Better

PowerShell Team
PowerShell Team

One of my all time favorite books is The IBM Way by Buck Rodgers.  (Actually make that "all time BUSINESS books", it's not in the same league as Discourse on Method or Thus Spake Zarathustra.)  One of my favorite statements Buck made was something to the effect of, "products of true enduring quality are not those that do 1 thing 1000% better but rather those products that do 1000 things 1 % better".  In other words, details matter.  We tried to cover as many details as we could with V1 but frankly we covered so much ground that some things were not a crisp and clean as we...

RDP File Generation/Use of HERE-Strings
Sep 14, 2008
Post comments count 0
Post likes count 1

RDP File Generation/Use of HERE-Strings

PowerShell Team
PowerShell Team

Over on the Everyday Nerd blog, I found a great blog entry you should read:  Create multiple RDP files with PowerShell.  He describes his environment where he has to manage a large set of servers using Remote Desktop (RDP).  Having to configure the RDP settings each time he connects to the server, he decided to automate the process by writing a script which generates the RDP files for him.  The script itself is cool but the think I wanted to highlight was that the script is a great illustration of a very powerful scripting design pattern.  It uses: This pattern has a numb...

Hate Add-Member? (PowerShell's Adaptive Type System to the Rescue)
Sep 6, 2008
Post comments count 0
Post likes count 0

Hate Add-Member? (PowerShell's Adaptive Type System to the Rescue)

PowerShell Team
PowerShell Team

Do you hate Add-Member as much as I do? Wait - maybe you aren't familiar with Add-Member or the glory of PowerShell's Adaptive Type System.  (ATS).  When I looked at the .NET type system, my reaction was "....almost".  I'm not trying to throw a rock at .NET - anyone that knows me knows how much I love .NET but the reality is that it's type system "almost" meets the needs of a management system ... but doesn't.  That is why we invented the Adaptive Type System.  There are 4 main components of ATS: Type Adapters.  A lot of technologies implement their own type systems within .NET.&nb...

OMG – Check This Out (Data Visualization with PowerShell)
Sep 6, 2008
Post comments count 0
Post likes count 0

OMG – Check This Out (Data Visualization with PowerShell)

PowerShell Team
PowerShell Team

Doug Finke has been having fun working with PowerShell and .NetMap from MSR.  Now he has written this AMAZINGLY tiny script to call the World Bank's WebService and visualize the world by income level.  This has to be seen to be believed. If you were ever unclear on the power of the compositional model (toolkit approach) or the productivity you can achieve with PowerShell - just go visit this blog.  Check it out HERE. Doug - awesome stuff.  Truely wonderful.  You've made my day. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog a...

Join Me Tonight on the PowerScripting Podcast
Sep 4, 2008
Post comments count 0
Post likes count 0

Join Me Tonight on the PowerScripting Podcast

PowerShell Team
PowerShell Team

Tonight at 9pm EST (6pm PST) (UTC-4), I'll be one of Hal Rottenberg's guiests on his live Podcast.,  You can find the live show details at the top right corner of http://powerscripting.net.  Apparently you'll be able to ask questions but not throw beer bottles (the internet is awesome!).  I have no idea what we'll talk about so who knows what will come out.  Let's just hope I don't say anything that get's me fired.  ha ha.  It should be fun - join us. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blog...

Text Output Is Not a Contract
Sep 3, 2008
Post comments count 0
Post likes count 0

Text Output Is Not a Contract

PowerShell Team
PowerShell Team

In PS V1, this is what you get for GET-COMMAND -SYNTAX PS> Get-Command Get-Process -SyntaxGet-Process [[-Name] <String[]>] [-ComputerName <String[]>] [-Module] [-FileVersionInfo] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]Get-Process -Id <Int32[]> [-ComputerName <String[]>] [-Module] [-FileVersionInfo] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-Erro...

Speeding Up PowerShell Startup – Updating Update-Gac.ps1
Sep 2, 2008
Post comments count 0
Post likes count 0

Speeding Up PowerShell Startup – Updating Update-Gac.ps1

PowerShell Team
PowerShell Team

Have I ever mentioned how much I love the community?  Today Kirill Osenkov posted a comment on the blog pointing out that there was an API to get the .NET Framework install path:  RuntimeEnvironment.GetRuntimeDirectory() .  I didn' t know that and now I do.  :-) I took the opportunity to rewrite Update-Gac.ps1 and in the process I decided to make it better.  This illustrates the point I've made many times.  With GUIs - you click buttons and that the end you what do you have?  Maybe the system works, maybe it doesn't and that is it.  With scripting, you end up with a system ...

Get-Constructor Fun
Sep 1, 2008
Post comments count 0
Post likes count 0

Get-Constructor Fun

PowerShell Team
PowerShell Team

Here is a quick and dirty function I wrote after getting PO'd at having to look up documentation for constructors: NOTE:  Jim Truher thinks long typenames are useful so I added a switch (-FullName) so you could get them if you want them. function get-Constructor ([type]$type, [Switch]$FullName){    foreach ($c in $type.GetConstructors())    {        $type.Name + "("        foreach ($p in $c.GetParameters())        {          &...

PowerShell vs TSQL & Why Learn PowerShell
Aug 30, 2008
Post comments count 0
Post likes count 0

PowerShell vs TSQL & Why Learn PowerShell

PowerShell Team
PowerShell Team

Dan Jones has a great blog HERE explaining why the SQL team decided to support PowerShell when they already had T-SQL.  It originally started as an email thread responding to the question posed by an MVP.  This was a great question to ask.  In many ways, PowerShell is merely trying catch up to what the SQL team has been doing for years but do so in a way that everyone can participate.  As you'll see from Dan's blog, we did it in a way that it made sense for the SQL team to embrace it.  Let's be clear about how what an awesome standard the SQL team set.  ...

PowerShellPlus V2.0
Aug 25, 2008
Post comments count 0
Post likes count 0

PowerShellPlus V2.0

PowerShell Team
PowerShell Team

One of the highlights of my IT Forum talks last year came when I had Tobias Weltner demo PowerShellPlus V1.0.  It rocked the house.  The power and thoughtfullness of the tool was very clear. Since then, Tobias has teamed up with the folks over at Idera to launch a new version of PowersShellPlus they are calling PowerShellPlus Professional Edition.  Rick Pleczko is the CEO of Idera and I've known him for many years.  He is a super smart guy who has always had a good bead on the needs of the IT community so I'm pretty optimitistic about the 2 of them getting together. A beta release of the new ...

Richard Siddaway's talk in Sweden Sept 16th
Aug 25, 2008
Post comments count 0
Post likes count 0

Richard Siddaway's talk in Sweden Sept 16th

PowerShell Team
PowerShell Team

If you're going to be in Sweden on Sept 16th, you have the opportunity to hear Richard Siddaway give 2 PowerShell talks covering: Richard is the founder of the world's first Powershell User Group in the UK and the author of a great blog (that I monitor regularly) HERE.  Following the talk will be the first meeting of the Swedish\Nordic PowerShell User Group. Cheers! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www....

V2 Interview: Universal Code Execution Model
Aug 19, 2008
Post comments count 0
Post likes count 0

V2 Interview: Universal Code Execution Model

PowerShell Team
PowerShell Team

At TechEd, I did an interview with Kevin Remde where I discussed the V2 Universal Code Execution model in detail.  You can see it at:  Universal Code Execution Model (UCEM)—a vision of how PowerShell scripts can run anywhere, anytime in just the right semantics. You can access the entire library of interviews HERE. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Some WMI instances can have their first method call fail and get-member not work in PowerShell V1
Aug 12, 2008
Post comments count 0
Post likes count 0

Some WMI instances can have their first method call fail and get-member not work in PowerShell V1

PowerShell Team
PowerShell Team

Due to a problem retrieving the available methods in V1 that we have worked around for the upcoming version of PowerShell, you might experience that the first method call to a WMI object fails with a message that mentions:            Exception calling GetType() with “0” argument(s): “You cannot call a method on a null-valued expression.”   This happens when calling the first method in objects that are not in the root\cimv2 like:            $instance=([wmiclass]"root\MyNamespace:MyObject").CreateInstance() &n...

When NOT To Use &quot;WHERE&quot;
Aug 12, 2008
Post comments count 0
Post likes count 0

When NOT To Use &quot;WHERE&quot;

PowerShell Team
PowerShell Team

I've seen a number of scripts that look like this:  GET-XXXX | Where {$_.name -eq "foo"}  or GET-XXXX | Where {$_.name -like "A*"} Whenever you see code like this, it is a sign that the GET-XXXX is not designed correctly.   (NOTE:  GET-XXXX is NOT a porn retrieval cmdlet - it is a standin for any GET-<SOMETHING> cmdlet). The whole point of a cmdlet is to think about the USER and deliver the correct experience.  As a GENERAL rule, we encourage cmdlet developers to leverage PowerShell utilities like WHERE, SORT, FORMAT, etc and NOT to put that function into their cmdlets.&...

PowerShell Abstractions & the Community
Aug 12, 2008
Post comments count 0
Post likes count 0

PowerShell Abstractions & the Community

PowerShell Team
PowerShell Team

Smart guy Don Jones has a good blog entry where he discusses ABSTRACTIONs with the question, "Do I need .NET, WMI, COM, and all that to use PowerShell?"  ERGO:  PS V2 enables the community to create and share the correct user abstractions so you don't have to wait for MSFT. NOTE: Even when MSFT provides full cmdlet coverage - you'll still need to know which cmdlets to use and how to stich them together to solve your specific problem. This is why I tell everyone that ALL ADMINS NEED TO BE ACTIVELY ENGAGED IN THE COMMUNITY.  What's the best way to start with the community? &n...

All About Modules
Aug 9, 2008
Post comments count 0
Post likes count 0

All About Modules

PowerShell Team
PowerShell Team

One of the coolest new features of Windows PowerShell is PowerShell modules.  I've just written a tutorial about how to use them on my personal blog. You can check out the full post for more details, but here are some easy things to remember about modules: The module examples also include a few PowerShell functions you might use in day-to-day life, such as being able to Search-WindowsDesktop, Get-RecordedTV, or Remove-RecordedTVBySeries, and are a great practical example of how you can use modules to cleanly separate code.   Check it out. Hope this helps, James Brundag...

VMWare PowerShell Cmdlets Released (And Opportunity to Win $$$$)
Jul 30, 2008
Post comments count 0
Post likes count 0

VMWare PowerShell Cmdlets Released (And Opportunity to Win $$$$)

PowerShell Team
PowerShell Team

On Monday VMWare offically released their PowerShell cmdlets in a ship vehicle called the VMWare Infrastructure (VI) Toolkit.  What could be better than that?  Yup - you guessed it - it's FREE!!  Check out the details HERE. Download the free toolkit HERE. Free!  What could be better than that?  Well they could pay you to use it.  :-)   Well ...  actually, it's almost that good.   VMWare is holding a Scripting Contest for the best scripts using the VI toolkit.  The winner will receive an all-expense paid trip to VMWorld 2008 Las Vegas or $5,000...

Invoking PowerShell from VBScript (COM)
Jul 25, 2008
Post comments count 0
Post likes count 0

Invoking PowerShell from VBScript (COM)

PowerShell Team
PowerShell Team

There are a number of scenarios where you might want to call PowerShell from VBScript.  You might already have an VBScript that does some function and you want to update it to include some PowerShell operation but don't want to convert the entire script to PowerShell.  You might have some people on your staff that are very comfortable with VBScipt and aren't ready to put it down and do everything in PowerShell.  You might have a management tool that is hardwired to invoke VBScripts and doesn't know anything about PowerShell (yet!). These are some of the scenarios we thought about...

Naming Shells and Consoles
Jul 25, 2008
Post comments count 0
Post likes count 0

Naming Shells and Consoles

PowerShell Team
PowerShell Team

Recently a product team asked me what entries they should put into their Program Groups folder.  They need an entry to launch their admin GUI and to launch  PowerShell with their snapin (they could do this by launching a Minishell which is a non-extensible version of PowerShell that has that products snapins baked in or they could do this by launching PowerShell specifying a console file (-PSConsoleFile ) which has their snapins). The question was - what should they call the PowerShell link.  I thought a number of different options and then decided to look and see what the Exchange team had done.&n...

PowerShell Build Environment for Windows SDK
Jul 23, 2008
Post comments count 0
Post likes count 0

PowerShell Build Environment for Windows SDK

PowerShell Team
PowerShell Team

The Windows SDK team would like your feedback on what features you would like most in a future Windows SDK.  One of your choices is a PowerShell Build Environment.  If this is something that would be useful to you, go HERE and take the survey and let them know.  Cheers! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx  

PowerShell Laptop Stickers
Jul 19, 2008
Post comments count 0
Post likes count 0

PowerShell Laptop Stickers

PowerShell Team
PowerShell Team

I think I've blogged about this in the past but I keep getting asked about the cool PowerShell sticker I have on my laptop so I'll mention it again.  The superstars at Nsoftware are giving away free PowerShell stickers HERE.  No laptop is complete without one!  :-)Hmmmm there's a thought:  "PowerShell Inside".  Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Shift-FileIndex
Jul 19, 2008
Post comments count 0
Post likes count 0

Shift-FileIndex

PowerShell Team
PowerShell Team

Klaus Graefensteiner has a great blog entry HERE where he publishes a great function called Shift-FileIndex.  He was scanning files which created names with indexes (e.g. Vacation_0021.jpg ).  Being the real world - things went wrong and he had duplicated pages which he then deleted which then left holes in the numbering and so on.  He is halfway through Bruce Payette's PowerShell in Action book and decided to get his money's worth and solve this problem using PowerShell to great effect. It is a very nice script which takes good advantage of Regular Expressions.  During my talk in At...

PowerShell ASP – Too cool!
Jul 18, 2008
Post comments count 0
Post likes count 0

PowerShell ASP – Too cool!

PowerShell Team
PowerShell Team

For the longest time, people have been asking me when they'll be able to use PowerShell in ASP.  It makes perfect sense - PowerShell is a great language that let's you do amazing things quickly.  Sadly, my answer has always been: At Microsoft, to ship is to choose. We are trying to solve the problem of administrating and automating Windows and until we get things like Remoting, Jobs, Eventing, etc done, it would be a breach of our responsibilities to pursue ASP programming no matter how cool and useful it would be.  Now let me be clear, I believe ASP programming is SUPER useful to Admins (as well ...

Dude, Where's My Manual?
Jul 17, 2008
Post comments count 0
Post likes count 0

Dude, Where's My Manual?

PowerShell Team
PowerShell Team

Windows PowerShell comes with a lot of help files and documents, but, somehow, my favorite and most-frequently-used help is the help that  I get by typing "Get-Help" in the console.   And I have always wondered why this help is not readily available as a  single document, ready to be viewed, searched, and printed. Well, now it is, with this simple Get-Manual script.   This script merges all of the about_* help content with cmdlet help, and puts it into one pretty formatted Microsoft Word document (.doc). Once you have this document, you can search it for specific content. Or, you can print i...

Atlanta Talk
Jul 15, 2008
Post comments count 0
Post likes count 0

Atlanta Talk

PowerShell Team
PowerShell Team

I has a blast talking to a group of customers in Atlanta today about where PowerShell is and where it is going.  Attached is the deck I presented. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx Atlanta.pptx

Translating Literature Into PowerShell
Jul 14, 2008
Post comments count 0
Post likes count 0

Translating Literature Into PowerShell

PowerShell Team
PowerShell Team

James O'Neill got it into his head that he could translate literature into PowerShell.  He has a hilarious one-line Waiting for Godot and a one screen MacBeth HERE.  Dmitry Sotnikov picked up the challenge and has a Hamlet blog HERE. I like the idea and have decided to do the world a favor and finish the job that Jean Paul Satre's editors failed to do.  Here is "No Exit"            While ($True) { $OtherPeople = "Hell" } Exit [Monday evening update: I decided this was a better interpretation of NoExit]  I bet old Jean Paul was the life&nbs...

Speeding Up PowerShell Startup
Jul 11, 2008
Post comments count 0
Post likes count 0

Speeding Up PowerShell Startup

PowerShell Team
PowerShell Team

I talked about this before but a number of people have missed it so here it is under a better title.  In V1, we had a problem which caused our assemblies to not get ngen'ed during installation.  If you don't know what "ngen" is, don't worry - you don't need to.  All you need to know is that we didn't do the step that makes things go fast on your machine.  The instructions for how to fix this are HERE. You should stop what you are doing and go run that script.  If you've already done this in the past, it will be harmless but if you haven't, you'll be amazed at the improvement in star...

Bash vs PowerShell
Jul 7, 2008
Post comments count 0
Post likes count 0

Bash vs PowerShell

PowerShell Team
PowerShell Team

Marcus Nasarek did a nice comparison of Bash vs PowerShell in Linux magazine HERE.  It is only 2 pages but he covers the key elements and has been very fair to it.  I appreciate the fact that he took the time to clearly understand PowerShell.  In the past, a number of people in the Linux community have assumed they knew what we were doing and did comparisons based upon their assumptions.  Those weren't very interesting.   Enjoy!  Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn....

Show-SnapinCmdlet
Jul 4, 2008
Post comments count 0
Post likes count 0

Show-SnapinCmdlet

PowerShell Team
PowerShell Team

Shay Levy has a review of the latest/greatest IIS PowerShell provider CTP2 HERE. In that review, he shows how you can use Get-Command to show all the cmdlets in a snapin.  That works great but produces a linear list of cmdlets.  I think the following produces a easier way to digest the information: function Show-SnapinCmdlet ($snapin, $column=6){    Get-Command -PSSnapin $snapin | sort Noun,Verb | Format-Wide -GroupBy Noun -Property Verb -Column $Column } Give it a try and see if you like it. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team b...

IIS7 PowerShell Provider Tech Preview 2
Jul 2, 2008
Post comments count 0
Post likes count 0

IIS7 PowerShell Provider Tech Preview 2

PowerShell Team
PowerShell Team

IIS team is happy to announce release of   IIS7 PowerShell Provider Tech Preview 2   Here is a quick overview: What’s new with TP2? ·         IIS7 Powershell provider now supports SSL (installing and acquiring a certificate, creating an ssl site binding) ·         Tech Preview 2 ships with 40 new cmdlets. All of these cmdlets are for day-to-day IIS tasks like creating web-sites, web-applications, enabled request tracing, adding a handler or a module. The complete list is at http://learn.iis.net/page.aspx/492/using-th...

Congratulations to the PowerGUI Team
Jul 2, 2008
Post comments count 0
Post likes count 0

Congratulations to the PowerGUI Team

PowerShell Team
PowerShell Team

Kirk Munro blog entry HERE says that PowerGUI has just it the 100,000 download milestone.  This comes on the heels of them winning the Breakthrough Product Award at TechEd.  These guys are on a roll! Congratulations to the entire team!  Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

PowerPack Challenge '08
Jun 30, 2008
Post comments count 0
Post likes count 0

PowerPack Challenge '08

PowerShell Team
PowerShell Team

Quest is holding a PowerGUI scripting contest starting tomorrow July 1.  If you are not familar with PowerGUI, it is a PowerShell scripting and execution GUI.  If you aren't already a PowerGUI user, here is a great opportunity to kick the tires.  If you are already a PowerGUI user, here is an opportunity to turn that skill into prizes (winners recieve $250 and $500 gift certificates to Amazon.com). You can get more information about the contest HERE.  Full Disclosure:  I am one of the judges. Enjoy! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows ...

New AD Cmdlets from Quest
Jun 26, 2008
Post comments count 0
Post likes count 0

New AD Cmdlets from Quest

PowerShell Team
PowerShell Team

Rod Trent from MyITForum.com  has the details HERE  Enjoy! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

#7 Best all time Microsoft Product
Jun 26, 2008
Post comments count 0
Post likes count 0

#7 Best all time Microsoft Product

PowerShell Team
PowerShell Team

Check out what EWeek has declared to be the #7 Best Microsoft Product:   http://www.eweek.com/c/a/Security/The-Best-and-Worst-Microsoft-Products/8/   And that is Version 1 -  wait until they see Version 2!   SNOOPY DANCE!     Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

SQL Use of MiniShells
Jun 22, 2008
Post comments count 0
Post likes count 0

SQL Use of MiniShells

PowerShell Team
PowerShell Team

The SQL team has been receiving a lot of bashing lately over some of the decisions they made integrating PowerShell into SQL 2008.  I thought I would take a couple minutes to clarify a few things, eat some sin and talk about a constructive engagement model between the community and the feature teams implementing PowerShell cmdlets. First let me declare my long standing admiration for the SQL team.  Those superstars have consistently been one of the teams that really GOT what it meant to release software for production environments.  They have a great quality culture and process and they have top-sh...

Getting Credentials From The Command Line
Jun 20, 2008
Post comments count 0
Post likes count 0

Getting Credentials From The Command Line

PowerShell Team
PowerShell Team

When you use the Get-Credential cmdlet, you get a GUI dialog box to enter the credentials.  This is the "Common Criteria Certified" way of handling credentials.  It is also a pain in the butt at times.  If you are an admin, you can alter this and request credentials via the command line as follows:   PS> $key = "HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds"PS> Set-ItemProperty $key ConsolePrompting TruePS> Get-Credential cmdlet Get-Credential at command pipeline position 1Supply values for the following parameters:CredentialUser: ntdev\jsnoverPassword for user ntdev\jsnover: **...

Group Policy Health Cmdlet
Jun 19, 2008
Post comments count 0
Post likes count 0

Group Policy Health Cmdlet

PowerShell Team
PowerShell Team

SDMSoftware has just released a Group Policy Health Cmdlet HERE. They have a great, high-quality, 9 minute DEMO VIDEO showing what the cmdlet does and how to work it. Nice stuff. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Windows PowerShell Virtual User Group Meeting #6 – June 24th.
Jun 19, 2008
Post comments count 0
Post likes count 0

Windows PowerShell Virtual User Group Meeting #6 – June 24th.

PowerShell Team
PowerShell Team

Marco Shaw is hosting the 6th PowerShell Virtual User Group meeting on June 24th. (See http://marcoshaw.blogspot.com/2008/06/windows-powershell-virtual-user-group.html for details and sign-up). He has graciously allowed Wassim and I to present some of the new post-CTP2 things that the PowerShell team is working on. This should be an excellent opportunity to see the latest and greatest and also to provide us with feedback on these new features. I'm going to be talking about the new Modules feature in PowerShell V2. Modules are essentially a replacement for the old V1 snap-in concept. We haven't talked a lot about...

Push-Noun
Jun 19, 2008
Post comments count 0
Post likes count 0

Push-Noun

PowerShell Team
PowerShell Team

We looked at a lot of CLI models when designing PowerShell.  One of them was netsh.  One of the things I had a love/hate relationship with was netsh's use of context.  In netsh, you can set context via navigation and then you don't need to provide that context on the command line.  For instance you navigate into the FIREWALL and then you perform a set of operations and you don't need to say that you are working on the firewall because it picks it up from the context. I thought I would experiment with this a little this morning.  I don't know if this is useful or not but it shows a couple...

PowerShell V1 and V2 Running On WS08 Server Core
Jun 18, 2008
Post comments count 0
Post likes count 0

PowerShell V1 and V2 Running On WS08 Server Core

PowerShell Team
PowerShell Team

Yup- that's right.  Check it out at superstar Karl Prosser's blog HERE.  He even has a video of it working. The blog is somewhat of a tease in that he is going to wait till tomorrow to tell us how he did it.  I'm constantly amazed by what the community can do if you give them the right tools! Thanks Karl! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

When Will PowerShell V2 Ship?
Jun 17, 2008
Post comments count 0
Post likes count 0

When Will PowerShell V2 Ship?

PowerShell Team
PowerShell Team

By far, the most frequently asked question at TechEd 2008 was, "When will PowerShell V2 Ship?".  We are expressly prohibited from answering that question and I know that that can be frustrating.  I can say this: We are now feature complete with V2.  History has shown that when we reach this stage of development, it takes us a year, plus or minus a quarter, before it is generally available. Let me be quick to add that past performance is NOT an guarantee of future performance.  At the end of the day, we have an extensive quality process and the community lets us know when it is ready...

Windows, PowerShell and WMI – Unveiling Microsoft's Best Kept Secret
Jun 17, 2008
Post comments count 0
Post likes count 0

Windows, PowerShell and WMI – Unveiling Microsoft's Best Kept Secret

PowerShell Team
PowerShell Team

I mentioned that one of my favorite TechEd 2008 talks was Ben Pearce's talk, "Windows, PowerShell and WMI - Unveiling Microsoft's Best Kept Secret".  Attached is Ben's presentation.  You can get his demos at the following locations: http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-1-administering-windows.aspx http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-2-administering-servers-in-bulk.aspx http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-3-how-do-i-know-which-classes-to-use.aspx http://blogs.technet.com/benp/archive/2008/06/12/tech-ed-2008-demo-...

Explaining Objects To Non-Programmers
Jun 17, 2008
Post comments count 0
Post likes count 0

Explaining Objects To Non-Programmers

PowerShell Team
PowerShell Team

One of my favorite TechEd 2008 talks was Ben Pearce's talk, "Windows, PowerShell and WMI - Unveiling Microsoft's Best Kept Secret".  It was a great talk all up but the one thing I walked away saying, "I've got to steal that", was Ben's explaining of Objects. Anyone that has every tried to explain PowerShell to friends or co-workers will inevitably come across a look of fear and panic when you mention the word "Object".  I've seen it hundreds of times.  I explain how objects actually simplify the problem but after seeing Ben's talk, I realized that the problem might be that some people don't even kn...

Working With Web Services (Post CTP2 V2 Feature)
Jun 14, 2008
Post comments count 0
Post likes count 0

Working With Web Services (Post CTP2 V2 Feature)

PowerShell Team
PowerShell Team

Let me start by first apologizing for sharing some information that you are not going to be able to go out and try right away.  During one of the interactive Q&A sessions at TechEd, people asked about working with Web Services.  I referred to a feature that we were working on and then Hal Rottenberg asked me to blog about some of the details.  I'm not sure that this is a good idea because while we have it coded up and in the nightly builds, that is not a guarantee that it will make it into the next version (we often have to cut features in order to create bandwidth to increase the quality of ot...

Block Comments in V2
Jun 14, 2008
Post comments count 0
Post likes count 0

Block Comments in V2

PowerShell Team
PowerShell Team

Smith Catar was looking at my Tech Ed demos and noticed that I used block comments.  These are not in the CTP that you have so I guess I sorta let this one leak out.  Yes - V2 will have BLOCK COMMENTS!!! Block comments start with "<# and end with "#>".  e.g. <#  This isablock comment#> Happy happy.  Block comments - you asked for them, you'll get them.  Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsof...

Get-OSSku.ps1
Jun 13, 2008
Post comments count 0
Post likes count 0

Get-OSSku.ps1

PowerShell Team
PowerShell Team

Nitin Bhat the WMI PM recently pointed HERE to answer the question, how do know what OS SKU a machine is running? You can run the expression $((gwmi win32_operatingsystem).OperatingSystemSKU) to the the value and then look it up on that table. I decided to turn it into a script you can use.  It is rock-simple but it saves you the typing and there's some value in that.  I've included it below and attached it as well. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCente...

Best of Tech Ed: Breakthrough Product of the year => PowerGUI
Jun 13, 2008
Post comments count 0
Post likes count 0

Best of Tech Ed: Breakthrough Product of the year => PowerGUI

PowerShell Team
PowerShell Team

The Best of Tech Ed 2008 were awarded and PowerGUI won Breakthrouth Product of the Year.  WOW what an honor and acknowledgement of great work! Congratulations to Dmitry, Kirk and the rest of that team!  You guys have brought a lot of great visibility to Quest Software.  Your bosses should be fetching you cups of coffee and getting you bigger offices  :-) If you aren't already running PowerGUI - what are you waiting for? Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windo...

PowerShell & OpenXML
Jun 13, 2008
Post comments count 0
Post likes count 0

PowerShell & OpenXML

PowerShell Team
PowerShell Team

Eric White just posted an amazing set of Cmdlets on CodePlex.  They allow you to use PowerShell to manipulate OpenXML documents to do all sorts of fun things, like create graphs from the output of PowerShell, automatically generate documents from XML, and extract comments from a document.  Below is an 8-minute video introducing you to the technology and a blog post with more details. PowerTools for Open XML Introduction (Video) Blog: http://blogs.msdn.com/ericwhite/archive/2008/06/11/processing-open-xml-documents-server-side-using-powershell.aspx Get PowerTools For Open XML   Enjoy, J...

Yes, But What About The FLAVOR?
Jun 13, 2008
Post comments count 0
Post likes count 0

Yes, But What About The FLAVOR?

PowerShell Team
PowerShell Team

 Kirk Munro posted a blog entry HERE saying how thrilled he was at level of presence PowerShell had at TechEd 2008. It was a VERY good TechEd for PowerShell.  There were lots of breakout sessions, lots of hands on labs and interactive Q&A, lots of vendor support in the exhibit, lots of books, quite a few mentions in keynote demos and presentations.  That was all great but what impressed me the most was the number of people that said how PowerShell had saved their butts, made them heros with their peers or allowed them to do things that they could never do. It reminded me of this great...

TechEd: MGT384 What's Coming In PowerShell V2 – DEMOs
Jun 12, 2008
Post comments count 0
Post likes count 0

TechEd: MGT384 What's Coming In PowerShell V2 – DEMOs

PowerShell Team
PowerShell Team

Attached are the demos I used in that talk. Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx WhatsComingInV2Demos.zip

TechEd: MGT384 What's Coming In PowerShell V2
Jun 12, 2008
Post comments count 0
Post likes count 0

TechEd: MGT384 What's Coming In PowerShell V2

PowerShell Team
PowerShell Team

Attached are the slides I presented at TechEd yesterday.  Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx Mgt384-Jsnover-WhatsComingPowerShellV2.pptx

PowerShell Eventing QuickStart
Jun 10, 2008
Post comments count 0
Post likes count 0

PowerShell Eventing QuickStart

PowerShell Team
PowerShell Team

  The second CTP of PowerShell V2 (CTP2) introduces another new feature called PowerShell Eventing. PowerShell Eventing lets you respond to the asynchronous notifications that many objects support. We didn’t get a chance to fully document these cmdlets in the CTP2, though, so here’s a quick start and primer to help you explore the feature. Discovering Events Before playing with PowerShell eventing, you’ll probably want to find an object that supports events. But how do you know what an object supports? You will most commonly discover this through API documentation ("To receive notifications, subscribe to the...

Windows PowerShell Sessions @ TechEd IT Pro
Jun 10, 2008
Post comments count 0
Post likes count 0

Windows PowerShell Sessions @ TechEd IT Pro

PowerShell Team
PowerShell Team

Windows PowerShell Sessions   Breakout Sessions   MGT253 Introduction to Windows PowerShell    Tuesday, June 10 1:15 PM - 2:30 PM, S220 C   Speaker(s): Wassim Fayed Level: 200 - Intermediate   MGT384 What’s Coming in Windows PowerShell V2?    Wednesday, June 11 1:00 PM - 2:15 PM, S320 C  Speaker(s): Jeffrey Snover Level: 300 - Advanced   SVR387 Windows, PowerShell, and Windows Management Instrumentation: Unveiling Microsoft’s Best Kept Secret    Thursday, June 12 10:15 AM - 11:30 AM, S310 E   Speaker(s): Ben Pearce Level: 300 - Adv...

CredSSP for second-hop remoting
Jun 5, 2008
Post comments count 0
Post likes count 0

CredSSP for second-hop remoting

PowerShell Team
PowerShell Team

PS C:\> $r = New-PSSessionPS C:\> icm $r {Get-PfxCertificate c:\monad\TestpfxFile.pfx}Enter password:Invoke-Command : The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation.At line:1 char:4+ icm <<<<  $r {Get-PfxCertificate c:\monad\TestpfxFile.pfx} l am trying to run Get-PfxCertificate in a remote runspace, but why does it fail? What is delegation? PowerShell remoting supports a new authentication mechanism called CredSSP.  "CredSSP enables an application to delegate the user’s creden...

V2:  Custom Enums
Jun 3, 2008
Post comments count 0
Post likes count 0

V2: Custom Enums

PowerShell Team
PowerShell Team

Once again MOW proves what a clever guy he is.  Check out his blog entry PowerShell V2 CTP2: making Custom Enums using Add-Type. He shows how you can make your own enums using a very simple function he wrote (Add-Enum) which leverages our new Add-Type cmdlet.  Wonderful stuff. Add-Type is one of those huge game-changing features that we've added to V2 and it will take all of us a while to understand the full range of scenarios that it enables.  The things that we had in focus for this were: We had a couple others but these were the biggies.  There is an important aspect to Add-Type that y...

Show-PowerShell / Hide-PowerShell
Jun 2, 2008
Post comments count 0
Post likes count 0

Show-PowerShell / Hide-PowerShell

PowerShell Team
PowerShell Team

During the Week of WPF, someone requested an example of how to minimize the PowerShell window. Here's a quick module to make it happen.  Copy/paste the code below into Documents\WindowsPowerShell\Packages\PowerShell\PowerShell.psm1 $script:showWindowAsync = Add-Type –memberDefinition @” [DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow); “@ -name “Win32ShowWindowAsync” -namespace Win32Functions –passThru function Show-PowerShell() {      $null = $showWindowAsync::ShowWin...

New Free Windows PowerShell Quick Reference Card
May 30, 2008
Post comments count 0
Post likes count 0

New Free Windows PowerShell Quick Reference Card

PowerShell Team
PowerShell Team

I've been working with the folks over at Developer Zone on a quick reference card for PowerShell, based on my book. The card is now complete and is available as a free download. (PDF, registration required.) This is an 8-page card that covers the PowerShell language, common commands and  examples. The card was written primarily for developers (it is Developer Zone after all) and for people with existing scripting experience. Even so, if you're using PowerShell, it should be a handy reference to the environment. Thanks -bruce =============================== Bruce Payette [MSFT] Principal Developer, Windows P...

WPF & PowerShell – Part 7 (Sharing Hosts)
May 28, 2008
Post comments count 0
Post likes count 0

WPF & PowerShell – Part 7 (Sharing Hosts)

PowerShell Team
PowerShell Team

Well here we are at the end of a week of WPF.  We've learned how to create basic, simple user interactive interfaces.  We've seen a brief glimmer of the golden UI layer that is WPF, and have seen how we can use PowerShell to add easy interactivity to XAML.  You've seen tricks to help you work your way through .NET code, and help you unwrap the mysteries of WPF. We've seen how we can use PowerShell's list processing technology allows for simple binding to WPF's controls, and how WPF applets can help you present a simple front ends to PowerShell functionality.  We've gotten a very brief taste of...

WPF &amp; PowerShell – Part 6 (Running Functions in the Background)
May 27, 2008
Post comments count 0
Post likes count 0

WPF &amp; PowerShell – Part 6 (Running Functions in the Background)

PowerShell Team
PowerShell Team

For the next part in the series, I've introduced another update to the Show-Control function you first met in Part 4.  In this update, I've added the ability to run the control you've created in a background runspace as a switch. In order to do this, Show-Control employs a neat little trick.  It actually creates a background runspace, uses Get-Command to find out its own definition, and packs itself into the runspace it just created.  Then it removes the switch parameter that told it to run in the background, but adds every other argument.  It also makes sure to recreate the event handlers tha...

WPF & PowerShell – Part 5 ( Using WPF & PowerShell Modules)
May 26, 2008
Post comments count 0
Post likes count 0

WPF & PowerShell – Part 5 ( Using WPF & PowerShell Modules)

PowerShell Team
PowerShell Team

In the last post we met XAML, and I gave you a core function (Show-Control) that will help you make interactive WPF controls quite nicely in PowerShell. You can see that, by using Show-Control, it is possible to reduce the size and complexity of a script that creates UI.  Today, I'll show you how to build small applications by building functions and modules you can use later. But before we get into that, I'll explain some more of the benefits I see of using scripts to produce user interfaces: Let's focus on the 3rd benefit as we build up a few controls that rely on each other.  First, let's ma...

PowerShell and WPF:  WTF
May 25, 2008
Post comments count 0
Post likes count 0

PowerShell and WPF: WTF

PowerShell Team
PowerShell Team

A number of people are confused by the WPF/PowerShell series and are "asking WTF?".  Aaron has a blog entry, WPF and PowerShell Series - I don't get it.  Caywen left a comment on the first in posting saying, "Ugh, I could make a peanut butter and squid sandwich, but that doesn't mean you should." (I like the visual on that one!). I thought I would take a couple of minutes to explain a couple of points and provide some context. PowerShell is NOT a CLI I bet that one took you by surprise.  Yup - it's true PowerShell is not a CLI.  PowerShell is an AUTOMATION technology.  Cmdl...

WPF & PowerShell — Part 4 (XAML & Show-Control)
May 24, 2008
Post comments count 0
Post likes count 0

WPF & PowerShell — Part 4 (XAML & Show-Control)

PowerShell Team
PowerShell Team

We're not halfway through our week of WPF, and I'm pretty sure at this point that you have an all right grounding in the basics of WPF & PowerShell, but so far, the scripts haven't really been very much like most PowerShell scripts, and the UIs have not been like most WPF UIs.  The scripts have been a little odd because they haven't really made use of a common convention of PowerShell... the pipeline.   The WPF examples have also been a little verbose because they do not include any XAML. XAML is an XML format you can use to write user interfaces that use WPF.  Because WPF is very property...

WPF & PowerShell — Part 3 (Handling Events)
May 23, 2008
Post comments count 0
Post likes count 0

WPF & PowerShell — Part 3 (Handling Events)

PowerShell Team
PowerShell Team

So far, most of the wpf and powershell scripts you have seen have seen just show you something, but don’t do anything that interactive. However, In order to make real applications you need to be able to handle events. Luckily, PowerShell can make that pretty easy. It is possible to cast a script block to an event handler. The script block has two variables: $this (which is the sender), and $_, which contains the event arguments. Here’s a simple example of using this to click a button: $window = New-Object Windows.Window $eventHandler = [Windows.Input.MouseButtonEventHandler]{$this.Close()} $w...

WPF & PowerShell – Part 2 (Exploring WPF (and the rest of .NET) with Scripts)
May 23, 2008
Post comments count 0
Post likes count 0

WPF & PowerShell – Part 2 (Exploring WPF (and the rest of .NET) with Scripts)

PowerShell Team
PowerShell Team

In my previous post, I showed you how to create “Hello World” scripts using Windows Presentation Foundation (WPF) and Windows PowerShell. While “Hello World” is relatively easy to write with WPF, it is only the tip of the iceberg of the types of quick user interfaces you can write. Windows Presentation Foundation provides an amazing array of controls for an incredible array of purposes.  Out of the box, with just one control, you can: ·         Show a listbox ·         Play a video or audio file ·     &nb...

WPF & PowerShell – Part 1 ( Hello World & Welcome to the Week of WPF )
May 22, 2008
Post comments count 0
Post likes count 1

WPF & PowerShell – Part 1 ( Hello World & Welcome to the Week of WPF )

PowerShell Team
PowerShell Team

Welcome to the Week of WPF.  During the next 7 days, I’ll help show you how you can use WPF and PowerShell together. PowerShell could always script almost everything in .NET, but, prior to the recent CTP2 you could not script Windows Presentation Foundation (WPF) in PowerShell. Now you can script everything that WPF can do within PowerShell. This means you can write pretty sleek looking UIs in nice little PowerShell scripts. There are a lot of things you can do with this capability, but let’s start things off simple.   Windows Presentation Foundation (WPF) is a set of .NET libraries for making next-gene...

Strict Mode:  V1 Debug Tool V1 / V2 Best Practice
May 21, 2008
Post comments count 0
Post likes count 0

Strict Mode: V1 Debug Tool V1 / V2 Best Practice

PowerShell Team
PowerShell Team

When we designed PowerShell we decided that we wanted to have Shell syntax and semantics because this is what was missing from the market and because it supports the ad hoc development practice that is so suited to the needs of administrators.  We also observed that most shells ran out of power pretty quickly and people had to throw away their scripts and start from scratch with a more powerfull scripting language like Perl.  Sadly, sometimes those environments ran out of power as well and people had to throw them away and start from scratch using a systems programming language like C++. ...

The Future Is Here Today
May 21, 2008
Post comments count 0
Post likes count 0

The Future Is Here Today

PowerShell Team
PowerShell Team

Would like to see what a PowerShell V2 world would look like?  If so, check out Jaykul Bennett's Select-Grid script HERE.  Here is what impresses me so much about this: Imagine hundreds, thousands, tens of thousands of other 200 line scripts with similar power.  Imagine people taking this base script and adding 10 more lines to to things just they way they need them to be.  The might not have been able to write the script from scratch but it is not that hard to add 10 lines to an existing script.Now imagine that have a graphics friend and you ask them to replace the WPF with something b...

PowerShell on WS08 Server Core!!!!
May 15, 2008
Post comments count 0
Post likes count 0

PowerShell on WS08 Server Core!!!!

PowerShell Team
PowerShell Team

Superstar Dmitry Sotnikov has done the world a great service today by documenting how to get PowerShell running on WS08 Server Core HERE.  Just to be clear, this is  not a MSFT supported configuration.  That does NOT mean that we think it won't work.  What it means is that if it doesn't, you have to leverage the community to help you figure it out instead of Microsoft support. [Insert your favorite snarky remark here]  :-) As admins, it is just a simple fact of life that we have to color outside the lines to get our jobs done.   Yes - it would be best if we could ...

TIOBE: PowerShell on its way to the top 20 (Programming Languages)
May 14, 2008
Post comments count 0
Post likes count 0

TIOBE: PowerShell on its way to the top 20 (Programming Languages)

PowerShell Team
PowerShell Team

The TIOBE Programming Community Index provides a monthy rating of the popularity of programming languages.  This month's headline was: PowerShell on its way to the top 20 I'm not sure how they rate popularity or how they came up with that title (given that right now we are at 36) but I liked the headline! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Doug Finke's Amazing 7 Minute  C# => PowerShell Demo
May 14, 2008
Post comments count 0
Post likes count 0

Doug Finke's Amazing 7 Minute C# => PowerShell Demo

PowerShell Team
PowerShell Team

Doug Finke has just posted a blog entry HERE with an awesome 7 minute video demo HERE.  I HIGHLY recommend this as a great use of 7 minutes of your life (or as Doug points out, you can type Ctrl-Shift-G to speed it up and it will be a great use of 4-5 minutes of your life :-) ) In the demo, he starts out writing and running some C# code. He then takes advantage of the new PowerShell V2 feature Add-Type to run this code from a PowerShell script.  Then, step by step, he transform the original C# code into PowerShell and ends up with a single line of PowerShell.  Each step produces a running PowerShel...

In Praise of TypeConverters – Spread the Love
May 10, 2008
Post comments count 0
Post likes count 0

In Praise of TypeConverters – Spread the Love

PowerShell Team
PowerShell Team

I just got through reading Scott Hanselman's blog entry:  TypeConverters: There's not enough TypeDescripter.GetConverter in which he referenced  Jesse Liberty's blog entry: Did You Know That... Type Converters allow you to use property attributes in Complex Types and decided to pile on. Developers - you should stop what you are doing and get TypeConverters in focus.  Here is the big picture way to think about it:  As developers, our mission in life is to make the lives of others easier by providing them the functions they need in they way they need them.  TypeConverters play a huge role ...

Remoting with PowerShell QuickStart
May 9, 2008
Post comments count 0
Post likes count 0

Remoting with PowerShell QuickStart

PowerShell Team
PowerShell Team

PowerShell V2 introduces a new capability which allows you to remotely manage machines in your organization. I will give a basic overview of PowerShell remoting here and follow it up with some adavanced topics later. Are you ready for the fun.. A remote interaction involves 2 endpoints – Client and a Server. The same computer or system can act both as a client and as a server. Configuration To enable an endpoint for PowerShell remoting you need to do the following: Step 1: Install PowerShell CTP2 of PowerShell V2 Step2: Install CTP of WinRM Step 3: Configure WinRM for PowerShell remoting. This can be done from...

Fun with Script Cmdlets
May 8, 2008
Post comments count 0
Post likes count 0

Fun with Script Cmdlets

PowerShell Team
PowerShell Team

  Script Cmdlets are one of the coolest things about the newer version of PowerShell.  A Script cmdlet allows you to use all of the variety of cmdlet parameter sets inside of PowerShell functions. Since Script Cmdlets are PowerShell functions, and the PowerShell engine prefers to run functions rather than commands, you can use Script Cmdlets to override an existing cmdlet.  You might want to do this to add or remove parameters from a cmdlet you use often.  Also, you might just want to see what a cmdlet’s parameters look like in a script cmdlet, so you can go write your own. Luckily, Powershel...

PowerShell Transactions QuickStart
May 8, 2008
Post comments count 0
Post likes count 0

PowerShell Transactions QuickStart

PowerShell Team
PowerShell Team

The second CTP of PowerShell V2 (CTP2) introduces full engine support for transactions – groups of actions that can be finalized or undone in an all-or-nothing way. Wikipedia gives a great overview of transactions here: http://en.wikipedia.org/wiki/Database_transactions.   We put a ton of thought into how to expose this normally developer-centric concept in a way suitable for system administration and system administrators. We would LOVE to hear your feedback on what concepts or behaviours make sense, and especially which ones do not.   We didn’t get a chance to fully document these cmdlets in the CTP2,...

Announcing the release of Community Technology Preview-2 (CTP2) of Windows PowerShell V2
May 2, 2008
Post comments count 0
Post likes count 0

Announcing the release of Community Technology Preview-2 (CTP2) of Windows PowerShell V2

PowerShell Team
PowerShell Team

The Windows PowerShell Team is pleased to release the second Community Technology Preview (CTP2) of Windows PowerShell V2! This release adds a plethora of new features. PowerShell remoting now allows a one-to-one interactive experience. Thought about partitioning and organizing PowerShell scripts? Use modules to create self-contained and reusable units. This release introduces transactions support in PowerShell engine and APIs along with an update to the Registry provider to support them. We introduced eventing support in Powershell engine for listening, forwarding and acting on management and system events. Supp...

MMS: What's Coming In PowerShell V2
May 1, 2008
Post comments count 0
Post likes count 0

MMS: What's Coming In PowerShell V2

PowerShell Team
PowerShell Team

MMS is going well.  Yesterday Dan and Bruce presented an Introduction To PowerShell talk and then we all presented a What's Coming In PowerShell V2 talk.  The slides are attached.  Cheers! 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 SE02_Snover_v08.pptx

PowerShell Presence at MMS
Apr 29, 2008
Post comments count 0
Post likes count 0

PowerShell Presence at MMS

PowerShell Team
PowerShell Team

It is great to see how prominent PowerShell is at this years MMS.   Here are some highlights so far: Now that PowerShell has shipped in Windows Server 2008, the Microsoft machine has started to really kick in. 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

MMS Talk:  System Center Foundation Technologies
Apr 29, 2008
Post comments count 0
Post likes count 0

MMS Talk: System Center Foundation Technologies

PowerShell Team
PowerShell Team

Yesterday, Bruce Payette and I delivered a talk on System Center Foundation Technologies which covered WMI, BITS, WSMAN, PowerShell Engine and the CLI/Scripting experience.  What we did was to walk System Center Virtual Machine Manager (SCVMM)'s architecture and then highlight how it uses these technologies to do its magic.  For each component we discussed its Attached is the deck. 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.m...

Dynamics of Technology Adoption and Market Competitiveness
Apr 28, 2008
Post comments count 0
Post likes count 0

Dynamics of Technology Adoption and Market Competitiveness

PowerShell Team
PowerShell Team

Today is Partner day at MMS where we have special sessions focused to the special needs of ISV and IHVs.  I'll be giving an 1.5 hour talk: System Center Foundation Technologies  in which I discuss the management technologies that ship in Windows that the System Center products build upon.  Most, but not all, System Center products have been shipping for quite a long time so it presents a bit of challenge.  Whenever an new technology comes out, retrofitting an existing product to leverage it is a complex equation.  You might think that as soon as a new platform technology becomes availab...

Get-Random
Apr 27, 2008
Post comments count 0
Post likes count 0

Get-Random

PowerShell Team
PowerShell Team

I saw THIS posting over on Mark Minasi's forums that caught my eye.  It gives you a random help file under the motto of: "A powershell help file a day, keeps Don Jones away".  :-) Don responded pointing out one of our new V2 cmdlets:  Get-Random.  Since that cat is out of the bag and Get-Random is so cool, let's explore it: PS>Get-Help Get-Random NAME    Get-Random SYNOPSIS    Gets a random number or selects objects randomly from a collection. SYNTAX    Get-Random [-Count [<Uint32>]] [[-InputObject] [<psobject>]] [-SetSeed [<in&nbs...

Heading to Microsoft Management Summit (MMS) Where We'll Show PowerShell CTP2
Apr 25, 2008
Post comments count 0
Post likes count 0

Heading to Microsoft Management Summit (MMS) Where We'll Show PowerShell CTP2

PowerShell Team
PowerShell Team

A number of us are headed to Vegas this weekend to prep for MMS were we will be showing the latest and greatest PowerShell V2 features.  It pays to attend these conferences as you get the first look at our new stuff.  If you recall, CPT1 was released at IT Forum in Barcelona last year.   We are really excited to show off what we have been working on.  CTP2 is the largest/most expansive set of changes we've ever made to PowerShell.  I think it is going to take everyone a long time to comprehend the true magnitude and ramifications of what we are delivering in CTP2 - it is truly game c...

The PowerShell Team
Apr 25, 2008
Post comments count 0
Post likes count 0

The PowerShell Team

PowerShell Team
PowerShell Team

Here are the superstars that have been working hard to bring you PowerShell:   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

Get-PowerShell
Apr 25, 2008
Post comments count 0
Post likes count 0

Get-PowerShell

PowerShell Team
PowerShell Team

During the filming of our Management & Services Division video, the producer wanted me to stand next to one of the posters we produced promoting PowerShell.  This is the poster:     BTW - I'm old but not THAT old.  They edited my mustache to make it look like a milk mustache.  :-< 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

Changes in upcoming CTP
Apr 24, 2008
Post comments count 0
Post likes count 0

Changes in upcoming CTP

PowerShell Team
PowerShell Team

In my earlier blog, I mentioned that we had changed things since the previous CTP.  Rather than leave everyone wondering whether they were doomed or not, I decided to have an early release of that portion of the release notes.    Here they are:   Breaking Changes to Windows PowerShell 1.0 1. The value of the PowerShellVersion registry entry in HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine has been changed to 2.0. 2. Added new language keywords: Data, Cmdlet, and DynamicParam. Any commands called data, cmdlet or dynamicParam are interpreted as language keywords and result in pa...

How Could You Top CTP1?
Apr 24, 2008
Post comments count 0
Post likes count 0

How Could You Top CTP1?

PowerShell Team
PowerShell Team

(Did I give it away by putting the "1" next to the CTP?) Well put your seatbelts on baby because CTP2 is in the cooker and will be available sometime soon.  I'm writing this note to remind everyone of what a CTP is and is not.  The original CTP: Watch this Space blog is worth re-reading.  Wait, let me be more precise - go read that blog again.  Do you remember PROMISED that we'd listen and act upon (a subset of) your feedback and that that meant that things would change?  Well we got some great feedback and have made a bunch of changes.   I think you are going to ...

Management & Services Division (MSD)
Apr 23, 2008
Post comments count 0
Post likes count 0

Management & Services Division (MSD)

PowerShell Team
PowerShell Team

We recently did a short internal "who are we" video about our organization (MSD).  I don't know how it got out into the wild but you can check it out over on YouTube HERE.  It's 3 minutes, fun and there are a couple scenes of me saying things that are either really stupid or really clever. (seemed clever at the time but upon viewing ... well... :-) ) 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/techne...

$MindWarpingPower = $Cmdlets + $ScriptBlock_Parameters
Apr 20, 2008
Post comments count 0
Post likes count 0

$MindWarpingPower = $Cmdlets + $ScriptBlock_Parameters

PowerShell Team
PowerShell Team

A while ago I blogged about the power of Flexible Pipeling Scriptblock parameters.  The mechanics of this are quite simple:  In a pipeline environment, if you provide a SCRIPTBLOCK to a parameter which does not take a SCRIPTBLOCK or an OBJECT, the PowerShell engine assigns the current pipeline object to the variable "$_", runs the scriptblock and uses whatever value it returns for the value of that parameter.    Looking back at this, I don't think we've done a good enough job explaining it or promulgating its use because it is incredibly powerful and I just don't see it being used...

WMI Object Identifiers and Keys
Apr 15, 2008
Post comments count 0
Post likes count 0

WMI Object Identifiers and Keys

PowerShell Team
PowerShell Team

Recently one of MVPs, Darren Mar-Elia (Group Policy Guru from SDMSoftware [which as a set of FREE PowerShell GP cmdlets HERE])  was working with our WMI type accelerators and got the following error: $ld = '\\sdmlaptop1\root\cimv2:Win32_LogicalDisk.Caption="C:"' $disk = [WMI] $ld Cannot convert value "\\sdmlaptop1\root\cimv2:Win32_LogicalDisk.Caption="C:"" to type "System.Management.ManagementObject". Error: "Invalid object path " At line:1 char:17 + $disk = [WMI] $ld <<<< This is a great opportunity to discuss WMI Key properties.  WMI is an awesome piece of infrastructure.  It has a ri...

PowerShell Running Inside of Emacs
Apr 15, 2008
Post comments count 0
Post likes count 0

PowerShell Running Inside of Emacs

PowerShell Team
PowerShell Team

Dino Chiesa has a couple of blogs showing how he was able to get PowerShell running as an "inferior shell" within Emacs.  Apparently "inferior shell" is an emacs term of art and not a dig at PowerShell :-).  I've always respected the all consuming nature of emacs and the love it has from its users.  I used to joke that "emacs isn't an editor, it was a way of life".  Emacs lovers log into emacs and that is where they hang out - all day.  They can do almost everything from within emacs. Well know Dino shows how they can hang out in emacs and  run PowerShe...

IIS 7.0 PowerShell Support
Apr 14, 2008
Post comments count 0
Post likes count 0

IIS 7.0 PowerShell Support

PowerShell Team
PowerShell Team

Quite a few people have expressed disappointment about the lack of IIS cmdlets or namespace provider.  It's been a long sad tale.  It  turns out that the IIS team (and Sergei Antonov in particular) was one of the first groups to truly "get" PowerShell.  I can't tell you how many teams, in the early days, looked at us like we had a rat's tail hanging out of our mouth.  The IIS team embraced PowerShell early and did a great prototype of a namespace provider.  Actually, now that I think about it, I think they were the first group to ever do a namespace provider.  Things...