PowerShell Team
Automating the world one-liner at a time…
Latest posts
PowerShell, OpenSSH, and DSC team investments for 2026
Planned team investments for 2026 for PowerShell, OpenSSH, DSC, and related tooling.
Introducing MCP Support in AI Shell Preview 6
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
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
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!
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
Planned team investments for 2025 for PowerShell, OpenSSH, DSC, and related tooling.
Authoring Enhancements in Microsoft Desired State Configuration v3.0.0
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
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
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
We are pleased to share a new preview release of AI Shell!
Microsoft Update changes for PowerShell 7
This blog outlines the expected behavior of MU releases for PowerShell 7.
PowerShell 7.5 GA is now available
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
We are pleased to announce the public preview of AI Shell.
PowerShell 7.5 RC-1 is now available
Availability of PowerShell 7.5 RC1
Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1
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
PSResourceGet 1.1 preview 1 is available
PowerShell and OpenSSH team investments for 2024
Planned team investments for 2024 for PowerShell, OpenSSH, and related tooling.
PowerShell 7.4 General Availability
PowerShell 7.4 GA has been released.
PowerShell 7.4 Release Candidate 1
Availability of PowerShell 7.4 RC1
PowerShell Extension for Visual Studio Code Fall 2023 Update
PowerShell Extension for Visual Studio Fall 2023 Update
PSResourceGet is generally available
PSResourceGet is generally available
PSReadLine 2.3.4 GA Release
We are excited to announce the general availability of PSReadLine 2.3.4!
PowerShellGet 3.0.22-beta22 is now available
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)
Announcing the General Availability (GA) release of PowerShell Crescendo 1.1.0, a framework for the
PSResourceGet Release Candidate is Now Available
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
This blog outlines the PowerShell Adapter Feedback Provider module
PSResourceGet Preview 24 is Now Available
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
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
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
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
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?
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
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
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
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
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
PowerShell Extension for Visual Studio Spring 2023 Update
PSReadLine 2.3.1-beta1 Release
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
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
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
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
Team investments for 2023 across PowerShell, PowerShellGallery, OpenSSH, and supporting tools
PowerShell Extension for Visual Studio Code January 2023 Update
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
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
**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
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
General availability of PowerShell 7.3
PSScriptAnalyzer (PSSA) 1.21.0 has been released
Announcing the release of PSScriptAnalyzer 1.21
PowerShellGet 3.0 Preview 17
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
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
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
Get the latest PowerShell feature information in your terminal with Get-WhatsNew
PowerShell Extension for Visual Studio Code July 2022 Update
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
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
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
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
How to use Python to call the PowerShell engine without running the PowerShell executable
PSReadLine 2.2.6 enables Predictive Intellisense by default
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
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
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)
Announcing the General Availability (GA) release of PowerShell Crescendo, a framework for the
PowerShell and OpenSSH team investments for 2022
Planned team investments for 2022 for PowerShell and OpenSSH.
PSReadLine 2.2 GA
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
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
How to resolve errors in PowerShellGet v1 when attempting to install the NuGet package provider.
PowerShellGet 3.0 Preview 12 Release
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)
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!
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
Announcing general availability of PowerShell 7.2
Announcing PowerShell Crescendo Preview.4
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
We are annoucing that the PSArm experimental module is no longer under active development.
PowerShellGet 3.0 Preview 11 Release
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
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
SecretManagement 1.1 is now generally available
Announcing PowerShell Crescendo Preview.3
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
We are going to begin previewing our updates to PowerShell 7 with Microsoft Update.
PowerShell for Visual Studio Code May 2021 Update
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
Potential breaking change in the latest preview of SecretManagement 1.1 module release
Announcing PSDesiredStateConfiguration on PowerShell Gallery
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
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
Learn how to measure and improve startup time of your $Profile
Announcing the preview of PSArm
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
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
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
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
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
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
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
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
<Summary of the post>
SecretManagement and SecretStore Release Candidates
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
Important changes included in the PowerShell 7.2 Preview 2 release
Announcing PowerShell Crescendo Preview.1
<Summary of the post>
Incident Report – PowerShell Gallery Downtime October 30, 2020
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!
Announcing the new pipeline for publishing updateable help
SecretManagement preview 6 and SecretStore preview 4
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
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
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
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
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
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!
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
Design changes to SecretManagement module preview
SecretManagement Preview 3
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
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
Update on PowerShell 7.1 release
Semantic Highlighting in the PowerShell Preview extension for Visual Studio Code
Semantic Highlighting now supported in VS Code for PowerShell scripts
Public Preview of Notebook Mode in the PowerShell Preview extension for Visual Studio Code
Opening PowerShell script files (.ps1) in Notebook Mode in the PowerShell extension for Visual Studio Code
PSScriptAnalyzer 1.19.1
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
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
How to wrap native commands to take better advantage of the PowerShell environment
Native Commands in PowerShell – A New Approach
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
() 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
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
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
Announcing the availability of the beta version of our new PowerShell cmdlet generator for AutoRest.
DSC Resource Kit Release February 2019
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)
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)
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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!
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
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
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
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
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
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
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
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!
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
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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
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
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
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
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!
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
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
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
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
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
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!
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
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
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
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
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
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
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
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
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
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
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
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
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!
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
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
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
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
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!
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
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
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
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
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
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!
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
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
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
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
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
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
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
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
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!
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?
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
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
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
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
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
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
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!
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Improving the PowerShell feedback experience with UserVoice
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
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
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
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!
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”
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
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!
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.
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
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. ...
Package Management Preview for PowerShell 4 & 3 is now available
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
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
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)
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
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)
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
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!
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
// <![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
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
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
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
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
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
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
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
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
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
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 …
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
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
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
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
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
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
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
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
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
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
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
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
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?
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
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
(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)
[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
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
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
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
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!
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
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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”
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
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
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
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
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
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
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
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
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
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
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!
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
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!
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
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
[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
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
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
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
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
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
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!
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
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
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!
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
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
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#!!
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
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
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
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
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
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
<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
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.
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
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
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
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
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?
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
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
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!
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
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
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?
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
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
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
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
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
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
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
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
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
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
// 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
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
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?
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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)
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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!
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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?
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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
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
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
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. ...
Configuring WSMAN Limits
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
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
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
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
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
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
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”
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?
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
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
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
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
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’
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
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
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
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.
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?
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
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
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
“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
“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
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
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
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
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
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!
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
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
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
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]
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
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
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
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
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
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!
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
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?
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
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
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
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!
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
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
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
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
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?
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
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>
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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”)
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
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!
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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!
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
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
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 {  ...
Get-ProgID
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
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
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
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
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
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
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
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
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?
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?
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
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)
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
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
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
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
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
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
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
.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
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
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
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
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
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?
Today, on our internal discussion list, someone asked if there were any advantages to testing with PowerShell versus testing with C#. I was able to come up with 10 quick reasons to test with PowerShell: I hope these reasons help convince other software testers to use PowerShell. It can really make testing a lot simpler. Hope this helps, James Brundage [MSFT]
Using PowerShell to Protect Against Conficker (Enabling and Disabling AutoRun.inf)
On the front page of MSN.com today, there’s details about a new worm, Conficker, that spreads using the good old fashioned autorun.inf tricks. It infects USB drives so that, when you plug the drive into another computer, it automatically runs and infects the machine. The article mentioned a post on Nick Brown’s blog that instructs you on various ways to disable autorun.inf files and gives a .REG file for disabling autorun.inf. Here’s the .REG file: Recently, I’ve started to like taking small registry hacks and turning them into functions, so here’s a pair of functions that I wrote to automate t...
Group Policy Cmdlets in Windows 7
Lilia Gutnik has posted a blog entry HERE showing an example of the Windows 7 Group Policy cmdlets. Check it out. Experiment! Enjoy! Engage! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
How To Make Your Own Module Repository
Andy Schneider (from Get-PowerShell.com) recently asked me how he could make sure that everyone at Avanade could get a consistent set of modules. I run into a somewhat similar problem here at Microsoft, where I want to take scripts I've built to work with internal applications and make them easy for people to use, even if they're not already using PowerShell. I don't want the scripts to be broadly available (after all, what is someone outside of Microsoft going to do with a script that works with Product Studio?) but I want the scripts (and PowerShell) to be installed or updated with a single click. D...
Please Join Me for a Power Scripting Podcast Tonight @ 9PM EST (6PM PST)
I’m going to be doing a PowerScripting Podcast tonight @ 9PM EST. There’s a live chat room where you can ask questions and pick the brains of a tester / avid scripter on the PowerShell team. It should be fun. I hope to see your questions there. http://powerscripting.wordpress.com/2009/01/14/tomorrow-on-powerscripting-live-james-brundage/ Hope this Helps, James Brundage [MSFT]
Windows 7 Troubleshooting
Windows 7 has a cool new extensible troubleshooting framework which is entirely based on PowerShell scripts. Rafael Rivera has written a very good step-by-step guide for how to author a Win7 Troubleshooting Pack HERE. Check it out. Experiment! Enjoy! Engage! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Podcast Discussing WSMAN 1/14/2008
Tomorrow evening I'll be doing the Mind Of Root podcast with Steve Murawski to discuss WSMAN. WSMAN is the new standard management protocol to talk to all sorts of heterogeneous devices and is the protocol that PowerShell Remoting is based upon. As a general rule, management protocols take forever to become relevant but I believe that WSMAN is going to catch on like wildfire. I'll discuss why during the podcast. More details HERE. Experiment! Enjoy! Engage! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http:/...
Interactive remoting in CTP3
Today let's talk about one of the cool new features of Windows PowerShell V2 - Interactive Remoting. Let’s start with an example: As you can see Enter-PSSession starts interactive remoting session and Exit-PSSession takes you out of it. The aliases for these commands are etsn and exsn. You can also use exit keyword instead of Exit-PSSession. Interactive remoting uses the same remoting infrastructure as other PowerShell remoting cmdlets. WinRM provides the transport and maintains a listener service, which is responsible for creation of the remote PowerShell sessions. Similar to Invoke-Command, you can use compu...