Tag Archives: Powershell

Introducing MCP Support in AI Shell Preview 6

This post was originally published on this site

AI Shell Preview 6 is here!

We are super excited to announce the latest preview release of AI Shell. This release focuses on
enhancing the user experience with new features, improved error handling, and better integration
with Model Context Protocol (MCP) tools.

What’s new at a glance

  • MCP client integration
  • Built-in tools
  • Resolve-Error command improvements
  • Aliases and flows for staying in your terminal

MCP Integration

AI Shell now acts as an MCP client, which allows you to add any MCP server to your AI Shell
experience. Connecting to an MCP server massively improves the capability of your AI Shell giving
you the tools that provide more relevant data or carry out actions!

AI Shell MCP Client

Adding MCP Servers

To add an MCP server, create an mcp.json file in $HOME.aish folder. The following example
shows two MCP servers: everything and filesystem. You can add any MCP servers you want.

{
    "servers": {
      "everything":{
        "type":"stdio",
        "command":"npx",
        "args":["-y", "@modelcontextprotocol/server-everything"]
      },
      "filesystem": {
        "type": "stdio",
        "command": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/server-filesystem",
          "C:/Users/username/"
        ]
      }
    }
  }

If it’s a remote MCP server, change the type to https. You know that you have successfully added
an MCP server when you see it in the AI Shell UI. You can confirm that it’s running by checking the
status of the server through the /mcp command. Using /mcp also lists each MCP Server and the
tools available.

Screenshot of MCP servers registered in AI Shell

NOTE

You must have Node.js or uv installed to use MCP servers that
use those command lines tools.

Standalone experience with AI Shell and MCP Servers

MCP servers enhance your standalone experience with AI Shell, allowing your command line to use MCP
servers and AI to perform tasks. For example, @simonb97/server-win-cli is an MCP server that
allows you to run commands on your Windows machine, whether it be PowerShell, CMD, Git Bash, or any
configured shell you use! It also provides configuration settings to define which commands and
operations are allowed to run.

CAUTION

Please note this is a community MCP server and not an
official Microsoft MCP Server. We encourage you to do your own research and testing before using
it.

AI Shell with MCP Server

Additional MCP servers:

Built-in Tools for AI Shell

This release introduces built-in tools that are now accessible to agents within AI Shell. These
commands are similar to MCP Server tools, but are exclusive to the AI Shell experience. These tools
are designed to enhance the AI Shell experience by providing context-aware capabilities and
automation features. They can be used in conjunction with the MCP servers to create a powerful
AI-driven shell environment.

Tool Name Description
get_working_directory Get the current working directory of the connected PowerShell session, including the provider name (e.g., FileSystem, Certificate) and the path (e.g., C:\, cert:\).
get_command_history Get up to 5 of the most recent commands executed in the connected PowerShell session.
get_terminal_content Get all output currently displayed in the terminal window of the connected PowerShell session.
get_environment_variables Get environment variables and their values from the connected PowerShell session. Values of potentially sensitive variables are redacted.
copy_text_to_clipboard Copy the provided text or code to the system clipboard, making it available for pasting elsewhere.
post_code_to_terminal Insert code into the prompt of the connected PowerShell session without executing it. The user can review and choose to run it manually by pressing Enter.
run_command_in_terminal This tool allows you to execute shell commands in a persistent PowerShell session, preserving environment variables, working directory, and other context across multiple commands.
get_command_output Get the output of a command previously started with run_command_in_terminal.

Note

The built-in tools rely on the side-car experience with a
connected PowerShell session and provide enhanced context awareness and automation capabilities.

Here is a simple demo showing how you can have AI Shell run commands on your behalf using the
run_command_in_terminal tool:

Run command in terminal tool

This example shows how additional context is provided to AI Shell to improve results:

Getting more context with built-in tools

You can also use the get_terminal_content tool to get the content from the connected terminal and
provide it to AI Shell to help it understand what you are trying to do:

Getting content from the screen ran before AI Shell starts to get assistance

Resolve-Error Command Improvements

Previously the Resolve-Error command was only able to run after an error occurred in the previous
command. Now, Resolve-Error identifies which command the user wants to troubleshoot:

  • If the last error’s command matches the most recent command in history, it’s assumed to be the one
    the user is interested in.
  • If the last error’s command isn’t the most recent and $LastErrorCode is null or zero, the error
    likely comes from an earlier command, not the very last one.
  • If $LastErrorCode is non-zero and $? is false, the last command was a failing native command.
  • If $LastErrorCode is non-zero but $? is true, it’s unclear which command or failure the user
    is focused on, so the agent analyzes the terminal content to determine the relevant context.

This logic allows AI Shell to better understand what the error the user is trying to resolve is
rather than requiring you to ask for AI’s help immediately after an error occurs.

Staying in your shell

The Invoke-AIShell and Resolve-Error commands allow you to stay in your working terminal to
interact with the AI Shell agent. To learn more about the parameters added, see the
previous blog post that details these features. For your convenience, these commands have
aliases that make them quicker to use.

Command Name Alias
Invoke-AIShell askai
Resolve-Error fixit

Fixing an error and utilizing fixit and askai commands

Conclusion

We hope that these enhancements make your experience with AI Shell more powerful! We are always
looking for feedback and suggestions, so please submit issues or feature requests in our
GitHub repository.

Thank you so much!

AI Shell Team

Steven Bucher & Dongbo Wang

The post Introducing MCP Support in AI Shell Preview 6 appeared first on PowerShell Team.

Announcing Microsoft.PowerShell.PlatyPS 1.0.0

This post was originally published on this site

We’re pleased to announce the general availability (GA) release of
Microsoft.PowerShell.PlatyPS v1.0.0.

PlatyPS is the tool that Microsoft uses to create the PowerShell content you get from Get-Help
and build the content published as PowerShell documentation on Microsoft Learn.

PowerShell help files are stored as Microsoft Assistance Markup Language (MAML), an XML
format. PlatyPS simplifies the authoring process by allowing you to write the help files in
Markdown, then convert to MAML. Markdown is widely used in the software industry,
supported by many editors including Visual Studio Code, and easier to author.

With this release, Microsoft.PowerShell.PlatyPS is the supported tool. This release is a
substantial rewrite with all new cmdlets. platyPS v0.14.2 is no longer supported. We encourage
all users to upgrade to Microsoft.PowerShell.PlatyPS for the latest features, performance
improvements, and ongoing support. If you have scripts that use the older version of platyPS,
you must rewrite them to use the new cmdlets.

Microsoft.PowerShell.PlatyPS includes several improvements:

  • Re-write in C# leveraging markdig for parsing Markdown (the same library used by
    Microsoft Learn to render Markdown)
  • Provides a more accurate description of a PowerShell cmdlet and its parameters and includes
    information that was previously unavailable
  • Creates an object model of the help file that you can manipulate and supports chaining cmdlets for
    complex operations
  • Increased performance – processes 1000s of Markdown files in seconds

Microsoft.PowerShell.PlatyPS runs on:

  • Windows PowerShell 5.1+
  • PowerShell 7+ on Windows, Linux, and macOS

Installing Microsoft.PowerShell.PlatyPS

To begin working with Microsoft.PowerShell.PlatyPS 1.0.0, install the module from PSGallery.

Install-PSResource -Name Microsoft.PowerShell.PlatyPS

Documentation to get started

For this release, the cmdlet reference is available at Microsoft.PowerShell.PlatyPS.
For an example of how to use the new cmdlets, see Example #1 in New-MarkdownCommandHelp.

Call to action

Our goal is to make it easier for you to update and maintain PowerShell help files. We value your
feedback. Stop by our GitHub repository and let us know of any issues you find.

Interested in contributing to the PlatyPS project? We welcome feature ideas and contributions.
Please follow the contribution guidance in the Github Readme.

Jason Helmick

Sr. Product Manager, PowerShell

The post Announcing Microsoft.PowerShell.PlatyPS 1.0.0 appeared first on PowerShell Team.

Announcing Microsoft Desired State Configuration v3.1.0

This post was originally published on this site

We’re pleased to announce the General Availability of Microsoft’s Desired State Configuration (DSC)
version 3.1.0. This release marks a significant milestone in our effort to deliver cloud-native
configuration management for cross-platform environments. DSC is a declarative configuration and
orchestration platform that defines a standard way of exposing settings for applications and
services. DSC v3.1.0 is built on collaboration with key improvements driven by partner requests.
Special thanks to the Windows Package Manager (WinGet) team and the incredible support of the DSC
community.

For additional details about the initial DSC v3.0.0 release, see:

What’s New in DSC v3.1

This release continues our momentum by delivering features and improvements
driven by real world use, partner feedback, and community contributions.

DSC v3.1 includes updates and fixes across the platform. Here are some of the
most important improvements:

WinGet and partner-driven enhancements

  • Core infrastructure updates to enable DSC-based management in WinGet scenarios.
  • Extended resource invocation APIs, allowing for richer integration by external tools.
  • Increased flexibility for configuration refresh and reporting, driven by partner needs.

Resource authoring improvements

  • Improved handling and validation for resource schema files, with clearer error messages.
  • Fixed issues with module loading and path resolution that impacted PSDSC resources.
  • More robust handling of resources with required and optional properties.

Cross-Platform reliability and bug fixes

  • Fixed several Linux-specific issues in resource execution, state detection, and error
    reporting.
  • Improved Windows compatibility, particularly for recent versions and in mixed-OS
    environments.
  • Addressed inconsistencies in the application of ensure properties and desired state
    evaluation.

Performance and quality

  • Optimized configuration drift detection, resulting in faster and more reliable test
    operations.
  • Reduced occurrence of configuration runs left in an indeterminate or failed state.
  • Improved error handling for edge cases in set, test, and get operations.

Diagnostics and usability

  • Expanded logging and diagnostics, making it easier to trace resource behavior and
    configuration activity.
  • Improved the clarity and usefulness of error and warning messages across platforms.
  • More consistent reporting of operation outcomes in both interactive and automated
    scenarios.

For a full list of changes, see the DSC v3.1 changelog

Installing DSC

To get started, follow these steps to install DSC on your system:

On Windows, you can install DSC from the Microsoft Store using winget. By installing from the
Store or using winget, you get automatic updates for DSC.

Search for the latest version of DSC:

winget search DesiredStateConfiguration --source msstore
Name                              Id           Version Source
---------------------------------------------------------------
DesiredStateConfiguration         9NVTPZWRC6KQ Unknown msstore
DesiredStateConfiguration-Preview 9PCX3HX4HZ0Z Unknown msstore

Install DSC using the id parameter:

# Install latest stable
winget install --id 9NVTPZWRC6KQ --source msstore
# Install latest preview
winget install --id 9PCX3HX4HZ0Z --source msstore

On Linux and macOS, you can install DSC using the following steps:

  1. Download the latest release from the PowerShell/DSC repository.
  2. Expand the release archive.
  3. Add the folder containing the expanded archive contents to your PATH environment variable.

Support lifecycle

DSC follows semantic versioning.

The first release of DSC version 3.0.0 is a Stable release. DSC version 3.1.0 is the current Stable
release. Patch releases update the third digit of the semantic version number. For example, 3.1.1 is
a patch update to 3.1.0. Stable releases receive patches for critical bugs and security
vulnerabilities for three months after the next Stable release. For example, version 3.1.0 is
supported for three months after 3.2.0 is released.

Always update to the latest patch version of the release you’re using.

Call to action

For more information about Desired State Configuration v3.0 (DSC), see the DSC documentation.
We value your feedback. Stop by our GitHub repository and let us know of any issues you find.

Jason Helmick

Sr. Product Manager, PowerShell

The post Announcing Microsoft Desired State Configuration v3.1.0 appeared first on PowerShell Team.

Get started with Microsoft Desired State Configuration v3.0.0

This post was originally published on this site

This is the second post in a multi-part series about the new release of DSC.

Microsoft Desired State Configuration (DSC) v3.0.0 is a modern, cross-platform configuration
management framework designed to help administrators and developers declaratively define and enforce
system states. Whether you’re managing infrastructure, deploying applications, or automating system
configurations, DSC provides a flexible and scalable approach to configuration as code.

TIP

This post uses the following terminology:

  • DSC refers to Desired State Configuration (DSC) v3.0.0.
  • PSDSC refers to PowerShell Desired State Configuration (PSDSC) v1.1 and v2.

Installing DSC

To get started, follow these steps to install DSC on your system:

On Windows, you can install DSC from the Microsoft Store using winget. By installing from the
Store or using winget, you get automatic updates for DSC.

winget search DesiredStateConfiguration
winget install --id <insert-package-id> --source msstore

On Linux and macOS, you can install DSC using the following steps:

  1. Download the latest release from the PowerShell/DSC repository.
  2. Expand the release archive.
  3. Add the folder containing the expanded archive contents to your PATH environment variable.

Getting started with the DSC command

The dsc command operates on a configuration document or invokes specific resources to manage
settings.

Run the following command to display the dsc command help:

dsc --help
Apply configuration or invoke specific DSC resources

Usage: dsc.exe [OPTIONS] <COMMAND>

Commands:
  completer  Generate a shell completion script
  config     Apply a configuration document
  resource   Invoke a specific DSC resource
  schema     Get the JSON schema for a DSC type
  help       Print this message or the help of the given subcommand(s)

Options:
  -l, --trace-level <TRACE_LEVEL>    Trace level to use [possible values: error, warn, info, debug, trace]
  -t, --trace-format <TRACE_FORMAT>  Trace format to use [default: default] [possible values: default, plaintext, json]
  -h, --help                         Print help
  -V, --version                      Print version

Use the command to get version information.

dsc --version
dsc 3.0.0

To learn more, see the dsc command reference documentation.

Access DSC resources with dsc resource

The dsc resource command displays or invokes a specific DSC resource. The dsc resource command
contains subcommands for listing DSC resources and invoking them directly.

Use the following command to display a list of installed DSC resources.

dsc resource list
Type                                        Kind      Version  Caps      RequireAdapter  Description
----------------------------------------------------------------------------------------------------
Microsoft.DSC.Transitional/RunCommandOnSet  Resource  0.1.0    gs------                  Takes a si…
Microsoft.DSC/Assertion                     Group     0.1.0    gs--t---                  `test` wil…
Microsoft.DSC/Group                         Group     0.1.0    gs--t---                  All resour…
Microsoft.DSC/PowerShell                    Adapter   0.1.0    gs--t-e-                  Resource a…
Microsoft.Windows/RebootPending             Resource  0.1.0    g-------                  Returns in…
Microsoft.Windows/Registry                  Resource  0.1.0    gs-w-d--                  Manage Win…
Microsoft.Windows/WMI                       Adapter   0.1.0    g-------                  Resource a…
Microsoft.Windows/WindowsPowerShell         Adapter   0.1.0    gs--t---                  Resource a…

When the command includes the adapter option, dsc checks for any resource adapters with a matching
name. Classic PowerShell resources are part of the Microsoft.Windows/WindowsPowerShell adapter.

dsc resource list --adapter Microsoft.Windows/WindowsPowerShell
Partial listing

Type                                                   Kind      Version  Caps      RequireAdapter
----------------------------------------------------------------------------------------------------
PSDesiredStateConfiguration/Archive                    Resource  1.1      gs--t---  Microsoft.Windo…
PSDesiredStateConfiguration/Environment                Resource  1.1      gs--t---  Microsoft.Windo…
PSDesiredStateConfiguration/File                       Resource  1.0.0    gs--t---  Microsoft.Windo…
PSDesiredStateConfiguration/Group                      Resource  1.1      gs--t---  Microsoft.Windo…
PSDesiredStateConfiguration/GroupSet                   Resource  1.1      gs--t---  Microsoft.Windo…
PSDesiredStateConfiguration/Log                        Resource  1.1      gs--t---  Microsoft.Windo…

To learn more, see the dsc resource command reference documentation.

Manage a basic configuration

The dsc config command includes subcommands for managing the resource instances defined in a DSC
configuration document.

The following YAML configuration document calls the classic PowerShell resource WindowsFeature
from the PSDesiredStateConfiguration module to install a Windows web server (IIS) on Windows
Server.

$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
resources:
  - name: Use Windows PowerShell resources
    type: Microsoft.Windows/WindowsPowerShell
    properties:
      resources:
        - name: Web server install
          type: PSDesiredStateConfiguration/WindowsFeature
          properties:
            Name: Web-Server
            Ensure: Present

To set a machine to the configuration, use the dsc config set subcommand. The following example
shows how you can send the configuration document to DSCv3 using PowerShell:

Get-Content ./web.config.dsc.yaml | dsc config set

To learn more, see the dsc config command reference documentation.

Next steps

Learn more about Authoring Enhancements in Desired State Configuration v3.0.0.

Call to action

For more information about DSC v3.0, see the DSCv3 documentation. We value your feedback. Stop
by our GitHub repository and let us know of any issues you find.

Jason Helmick

Sr. Product Manager, PowerShell

The post Get started with Microsoft Desired State Configuration v3.0.0 appeared first on PowerShell Team.

Announcing Microsoft Desired State Configuration v3.0.0

This post was originally published on this site

This is the first post in a multi-part series about the new release of DSC.

We’re pleased to announce the General Availability of Microsoft’s Desired State Configuration (DSC)
version 3.0.0.

This version marks a significant evolution in cloud-native configuration management
for cross-platform environments. DSC is a declarative configuration and orchestration platform that
defines a standard way of exposing settings for applications and services. It’s a tool for managing
systems and applications by describing what they should look like rather than how to make it that
way. DSC simplifies system, service, and application management by separating what to do from how to
do it.

Benefits of DSC

  • Declarative and Idempotent: DSC configuration documents are declarative JSON or YAML files
    that define the desired state of your system in a straight-forward way. They include the instances
    of DSC resources that need configuration. DSC ensures the system matches that state, repeatedly if
    needed, without making unnecessary changes.
  • Flexible: DSC Resources define how to manage state for a particular system or application
    component. Resources can be authored in any language, not only PowerShell.
  • Cross-Platform: DSC works on Linux, macOS, and Windows without needing extra tools or
    dependencies.
  • Integratable: Designed to be easily integrated into existing configuration solutions. DSC
    returns schematized JSON objects for trace messages and command output. Tool developers and script
    authors can easily validate and parse the output for integration with other configuration tools
    and frameworks. DSC simplifies how you call it by accepting JSON from stdin for all configuration
    and resource commands. DSC resources include a manifest that defines the resource properties as a
    JSON schema and how to invoke the resource. You can reuse this definition across various
    toolchains for tighter integration with DSC.
  • Backwards compatible: This release of DSC can use all existing PowerShell 7 and Windows
    PowerShell DSC resources.

With DSC, you can:

  • Create configuration files that define how your environment should look.
  • Write DSC resources in any programming language to manage your systems and applications.
  • Invoke DSC resources to perform specific actions.
  • Define a standard way for applications and services to make their settings discoverable and
    usable. This means that you can discover and invoke resources directly, even without DSC.

Differences from PowerShell DSC

Windows PowerShell 5.1 includes PowerShell Desired State Configuration (PSDSC). We refer to as
classic DSC, which encompasses PSDSC v1.1 and v2. However, DSC can use any classic DSC resources
that exist today, including the script-based and class-based PSDSC resources. You can use PSDSC
resources in DSC with both Windows PowerShell and PowerShell.

The release of DSC is a major change to the DSC platform. DSC differs from PSDSC in a few important
ways:

  • DSC no longer includes or supports the Local Configuration Manager (LCM).
  • DSC doesn’t depend on PowerShell. You can use DSC without PowerShell installed and manage
    resources written in bash, python, C#, Go, or any other language.
  • DSC doesn’t include a local configuration manager. DSC is invoked as a command-line tool. It doesn’t
    run as a service.
  • The PSDSC configuration documents used Managed Object Format (MOF) files. Few tools were able to
    parse MOF files, especially on non-Windows platforms. DSC isn’t compatible with MOF files, but you
    can still use all existing PSDSC resources.
  • DSC is built on industry standards, such as JSON, JSON Schema, and YAML. These standards make DSC
    easier to integrate into tools and workflows compared to PSDSC.
  • DSC configuration documents are defined in JSON or YAML. The configuration documents use
    expression functions to enable dynamic values, rather than using PowerShell code to retrieve
    environment variables or join strings.
  • DSC supports supplying parameter values for configuration documents at runtime either as JSON
    or by pointing to a parameters file instead of generating a configuration MOF file before
    applying the configuration.
  • Unlike PSDSC, DSC returns strongly structured output. This structured output adheres to a
    published JSON Schema, making it easier to understand the output and to integrate it into your own
    scripts, reporting, and other tooling. When you test or set resources and configurations
    with DSC, the output tells you how a resource is out of the desired state or what DSC changed
    on your system.

Features of DSC

  • Groups: DSC supports a new resource kind that changes how DSC processes a list of resources.
    Resource authors can define their own group resources and configuration authors can use any of the
    built-in group resources.The DSC repository has an example that shows how you can group resources together and use
    the dependsOn keyword to define the order those groups are applied in a configuration.
  • Assertions: Use the Microsoft.Dsc/Assertion (a special group resource) to validate the
    environment before running the configuration.The DSC repository has an example that shows how you can use an assertion to manage a
    resource that should only run on a specific operating system.
  • Importers: DSC supports a new resource kind that pulls in a configuration from an external
    source for reuse in the current configuration document. Resource authors can define their own
    importer resources and configuration authors can use the built-in Microsoft.DSC/Include
    resource.The DSC repository has an example that shows how you can use the Microsoft.Dsc/Include
    resource to reuse a separate configuration document file, enabling you to compose a complex
    configuration from smaller, simpler configuration documents.
  • Exporting: DSC supports a new operation that resources can implement to return the list of all
    existing instances of that resource. You can use the dsc resource export command to get
    every instance of that resource on a machine. Use the dsc config export command to look up
    a set of resources and return a new configuration document containing every instance of those
    resources.
  • Configuration functions: DSC configuration documents support a set of functions that
    enable you to change how DSC processes the resources.The DSC repository has an example that shows how you can reference the output from one
    resource in the properties of another.

Support lifecycle

DSC follows semantic versioning. The first release of DSC, version 3.0.0, is a Stable release.

The first release of DSC, version 3.0.0, is a Stable release. Patch releases update the third
digit of the semantic version number. For example, 3.0.1 is a patch update to 3.0.0. Stable releases
receive patches for critical bugs and security vulnerabilities for three months after the next
Stable release. For example, version 3.0.0 is supported for three months after 3.1.0 is released.

Always update to the latest patch version of the release you’re using.

Next steps

As I mentioned at the top of this post, this was the first in a series of posts about the new DSC. For the subsequent posts:

  • DSC refers to Desired State Configuration (DSC) v3.0.0
  • PSDSC refers to PowerShell Desired State Configuration (PSDSC) v1.1 and v2

Now you are ready for the next post: Get Started with Desired State Configuration v3.0.0 (DSC)

Call to action

For more information about Desired State Configuration v3.0 (DSC), visit the
DSC documentation. We value your feedback. Stop by our GitHub repository and let us
know of any issues you find.

Jason Helmick

Sr. Product Manager, PowerShell

The post Announcing Microsoft Desired State Configuration v3.0.0 appeared first on PowerShell Team.

Microsoft Update changes for PowerShell 7

This post was originally published on this site

Microsoft Update (MU) changes for PowerShell 7

It has been a while since we’ve updated folks on the latest behaviors for Microsoft Update! This
post gives some background on Microsoft Update, explains our update rules, and announces our plans
for updating your installs of PowerShell 7.2.

About Microsoft Update

Microsoft Update (MU) is a service that provides automatic updates for Microsoft products and services. We first started using MU in PowerShell 7.2. MU provides a convenient way to automatically update PowerShell 7, which ensures you can control your update schedule, test it against your environment, and scale across your enterprise with ease.

Enabling MU

During MSI installation, two checkboxes control update settings:

  • Enable updates for PowerShell through Microsoft Update or WSUS (recommended)
    Allows the system to receive updates for PowerShell 7 through Microsoft Update, Windows Server
    Update Services (WSUS), or System Center Configuration Manager (SCCM).
  • Enable Microsoft Update when I check for updates (recommended)
    Permits the system to receive updates for all supported Microsoft software, not just Windows.

We recommend that you select both options to ensure comprehensive update coverage.

If you want to set these options while installing PowerShell from the command line, you can find
detailed instructions in the PowerShell documentation.

Update Availability

After we release a new PowerShell version, it can take up to two weeks before the update is
available through Microsoft Update. We strive to publish the update no later than 2 weeks after the
GitHub release, but there is no guarantee. There may be circumstances that delay the update. If you
need the update before it’s available via MU, you can download it directly from the
PowerShell Releases page on GitHub.

What is the expected behavior of MU?

We defined the rules for updates in an intentional way to ensure that users who are using LTS
versions stay on LTS versions. This means that you might not be updated to the latest version of
PowerShell 7 when you expected.

These are the rules for updates:

  • If you are running 7.4 (LTS), you will receive updates to 7.4 (LTS)
  • If you are running 7.5 (stable), you will receive updates to 7.5 (stable)
  • If you are running any preview or release candidate (rc) version, you will receive updates to next
    latest preview version as they come out.

We will never update an LTS version to a stable non-LTS version, like 7.4 to 7.5. However, a stable
non-LTS release WILL be upgraded to the higher LTS release when support for the stable release
ends. The only time we update an LTS version to a different version would be when an LTS version is
out of support. For example, we will update 7.4 to 7.6 (next LTS) once 7.4 goes out of support.

Preview versions will never be updated to the latest stable version. Instead, we will update you to
the latest preview release. This means if you are on 7.5-rc.1 you will be updated to 7.6-preview.2
(since preview.1 was skipped) instead of 7.5.

NOTE

Beginning March 14, 2025, we will be updating users who are on 7.2 to 7.4.

Helpful Links

Hopefully this post helps you understand the MU process. If you want more information about our MU
release process, PowerShell releases, or the PowerShell Support Lifecycle, check out the following
articles.

Feedback

As always, we look forward to your feedback. You can provide feedback via GitHub Issues.

Thank you so much!

Steven Bucher

PM on the PowerShell Team

The post Microsoft Update changes for PowerShell 7 appeared first on PowerShell Team.

PowerShell 7.5 GA is now available

This post was originally published on this site

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 7 is supported on Windows, Linux, and macOS. Consult the documentation for installation instructions and supported platforms.

What’s new in this release?

The PowerShell 7.5 milestone focused on security, quality and community contributions. A few highlights include:

  • PSResourceGet now supports ACR as a container gallery, for more information check out the documentation
  • PSReadLine has been updated to version 2.3.6
  • New cmdlets ConvertTo-CliXml and ConvertFrom-CliXml (Thanks @ArmaanMcleod!)
  • Performance improvements to the += operation for an array of objects. (Thanks @jborean93!)
  • Web cmdlet improvements as well as improvements to other cmdlets (Thanks @CarloToso, @ArmaanMcleod, @Snowman-25 and @LNKLEO!)
  • Many Tab completion improvements (Thanks @MartinGC94 and @ArmaanMcleod!)
  • Many engine improvements. (Thanks @JustinGrote, @jborean93! and @ArmaanMcleod!)
  • New experimental features PSDirectToVariable, PSNativeWindowsTildeExpansion, and PSSerializeJSONLongEnumAsNumber (Thanks @jborean93 and @domsleee!)
  • This release also contained a number of bug fixes — for the full list of changes please refer to the changelog

For more information on what’s changed, see What’s new in PowerShell 7.5.

Experimental feature changes

The following experimental features were converted to mainstream features in PowerShell 7.5:

  • PSCommandNotFoundSuggestion
  • PSCommandWithArgs
  • PSModuleAutoLoadSkipOfflineFiles

PowerShell 7.5 also includes the following experimental features:

  • PSRedirectToVariable
  • PSNativeWindowsTildeExpansion
  • PSSerializeJSONLongEnumAsNumber

For more information, see Using Experimental Features in PowerShell.

What’s next?

We are also releasing previews of PowerShell 7.6, our next long term servicing (LTS) release. We appreciate all the efforts of the community, both individuals and working group members. We look forward to your continued feedback and contributions!

Jason

PowerShell Team

The post PowerShell 7.5 GA is now available appeared first on PowerShell Team.

PowerShell 7.5 RC-1 is now available

This post was originally published on this site

We’re proud to announce the availability of PowerShell 7.5.0-rc.1! This is the first release
candidate version of PowerShell 7.5 and is considered a “go-live” release meaning that it’s a
supported release in production. 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?

Since PowerShell 7 is supported on Windows, Linux, and macOS, and there are a
many ways to install it. If you installed the previous PowerShell 7.5 preview release on
Windows and opted into Microsoft Update, you will be automatically updated to 7.5.0-rc.1.

Note

Automatic updates aren’t available immediately after a release. It can take up to 2 weeks to get the
latest versions deployed to all release channels.

What’s new in this release?

The PowerShell 7.5 milestone focused on security, quality and community contributions.
A few highlights include:

  • PSResourceGet now supports ACR as a container gallery, for more information check out the
    documentation
  • PSReadLine has been updated to version 2.3.6
  • New cmdlets ConvertTo-CliXml and ConvertFrom-CliXml(Thanks @ArmaanMcleod!)
  • Web cmdlet improvements as well as improvements to other cmdlets
  • Tab completion improvements
  • This release also contained a number of bug fixes — for the full list of changes please refer to
    the changelog

For more information on what’s changed, see What’s new in PowerShell 7.5.

Experimental Features that were made stable for 7.5

The following experimental features were converted to mainstream features in PowerShell 7.5:

  • PSCommandNotFoundSuggestion
  • PSCommandWithArgs
  • PSModuleAutoLoadSkipOfflineFiles

What’s next?

We expect to release PowerShell 7.5 GA in January 2025. We’ll have a separate blog post when the GA
release is available. We appreciate all the efforts of the community, both individuals and
working group members, and look forward to your continued feedback and contributions!

Sydney

PowerShell Team

The post PowerShell 7.5 RC-1 is now available appeared first on PowerShell Team.

Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1

This post was originally published on this site

PlatyPS is the primary tool for creating the PowerShell help displayed using Get-Help.
PowerShell help files are stored in an XML format known as
Microsoft Assistance Markup Language (MAML). Prior to PlatyPS, the help files were hand
authored using complex tool chains. Markdown is widely used in the open source community,
supported by many editors including Visual Studio Code, and easier to author. PlatyPS
simplifies the process by allowing you to write the help files in Markdown and then converted to
MAML.

Announcing Microsoft.PowerShell.PlatyPS

We’re pleased to announce the release of Microsoft.PowerShell.PlatyPS 1.0.0-Preview1. With
this release, there are two versions of PlatyPS.

  • platyPS v0.14.2 is the current version of PlatyPS that’s used to create PowerShell help files
    in Markdown format.
  • Microsoft.PowerShell.PlatyPS is the new version of PlatyPS that includes several improvements:
    • Provides a more accurate description of a PowerShell cmdlet and its parameters
    • Increased performance – processes 1000s of Markdown files in seconds
    • Creates an object model of the help file that you can manipulate in memory
    • Provides cmdlets that you can chain together to perform complex operations

Our main goal for this release is to address long standing issues, add more schema driven
features, and improve validity checking along with performance. This release is a substantial
rewrite with all new cmdlets. If you have scripts that use the older version of PlatyPS, you must
rewrite them to use the new cmdlets.

In this Preview release, we focused on:

  • Re-write in C# leveraging markdig for parsing Markdown.
  • New Markdown schema that includes all elements needed for Get-Help, plus information that was
    previously unavailable.
  • The new cmdlets produce objects, supporting chaining cmdlets for complex operations.
  • Full serialization to YAML to support our publishing pipeline.
  • Automatic conversion of existing Markdown to the new object model.
  • Export of the object model to Markdown, Yaml, and MAML.
  • The module contains the following cmdlets:
    • Compare-CommandHelp
    • Export-MamlCommandHelp
    • Export-MarkdownCommandHelp
    • Export-MarkdownModuleFile
    • Export-YamlCommandHelp
    • Export-YamlModuleFile
    • Import-MamlHelp
    • Import-MarkdownCommandHelp
    • Import-MarkdownModuleFile
    • Import-YamlCommandHelp
    • Import-YamlModuleFile
    • New-CommandHelp
    • New-MarkdownCommandHelp
    • New-UpdateableHelp
    • Test-MarkdownCommandHelp
    • Update-CommandHelp
    • Update-MarkdownCommandHelp

Microsoft.PowerShell.PlatyPS runs on:

  • Windows PowerShell 5.1+
  • PowerShell 7+ on Windows, Linux, and macOS

Installing Microsoft.PowerShell.PlatyPS

To begin working with Microsoft.PowerShell.PlatyPS 1.0.0 Preview1, download and install the
module from PSGallery.

Install-PSResource -Name Microsoft.PowerShell.PlatyPS -Prerelease

Documentation to get started

For the preview1 release, the cmdlet reference is available in the GitHub repository at
Microsoft.PowerShell.PlatyPS. We’re working on publishing the documentation to the Learn
platform before the next release.

For an example of how to use the new cmdlets, see Example #1 in New-MarkdownCommandHelp.

Call to action

Our goal is to make it easier for you to update and maintain PowerShell help files. We value your
feedback. Stop by our GitHub repository and let us know of any issues you find.

Jason Helmick

Sr. Product Manager, PowerShell

The post Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1 appeared first on PowerShell Team.

Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1

This post was originally published on this site

PlatyPS is the primary tool for creating the PowerShell help displayed using Get-Help.
PowerShell help files are stored in an XML format known as
Microsoft Assistance Markup Language (MAML). Prior to PlatyPS, the help files were hand
authored using complex tool chains. Markdown is widely used in the open source community,
supported by many editors including Visual Studio Code, and easier to author. PlatyPS
simplifies the process by allowing you to write the help files in Markdown and then converted to
MAML.

Announcing Microsoft.PowerShell.PlatyPS

We’re pleased to announce the release of Microsoft.PowerShell.PlatyPS 1.0.0-Preview1. With
this release, there are two versions of PlatyPS.

  • platyPS v0.14.2 is the current version of PlatyPS that’s used to create PowerShell help files
    in Markdown format.
  • Microsoft.PowerShell.PlatyPS is the new version of PlatyPS that includes several improvements:
    • Provides a more accurate description of a PowerShell cmdlet and its parameters
    • Increased performance – processes 1000s of Markdown files in seconds
    • Creates an object model of the help file that you can manipulate in memory
    • Provides cmdlets that you can chain together to perform complex operations

Our main goal for this release is to address long standing issues, add more schema driven
features, and improve validity checking along with performance. This release is a substantial
rewrite with all new cmdlets. If you have scripts that use the older version of PlatyPS, you must
rewrite them to use the new cmdlets.

In this Preview release, we focused on:

  • Re-write in C# leveraging markdig for parsing Markdown.
  • New Markdown schema that includes all elements needed for Get-Help, plus information that was
    previously unavailable.
  • The new cmdlets produce objects, supporting chaining cmdlets for complex operations.
  • Full serialization to YAML to support our publishing pipeline.
  • Automatic conversion of existing Markdown to the new object model.
  • Export of the object model to Markdown, Yaml, and MAML.
  • The module contains the following cmdlets:
    • Compare-CommandHelp
    • Export-MamlCommandHelp
    • Export-MarkdownCommandHelp
    • Export-MarkdownModuleFile
    • Export-YamlCommandHelp
    • Export-YamlModuleFile
    • Import-MamlHelp
    • Import-MarkdownCommandHelp
    • Import-MarkdownModuleFile
    • Import-YamlCommandHelp
    • Import-YamlModuleFile
    • New-CommandHelp
    • New-MarkdownCommandHelp
    • New-UpdateableHelp
    • Test-MarkdownCommandHelp
    • Update-CommandHelp
    • Update-MarkdownCommandHelp

Microsoft.PowerShell.PlatyPS runs on:

  • Windows PowerShell 5.1+
  • PowerShell 7+ on Windows, Linux, and macOS

Installing Microsoft.PowerShell.PlatyPS

To begin working with Microsoft.PowerShell.PlatyPS 1.0.0 Preview1, download and install the
module from PSGallery.

Install-PSResource -Name Microsoft.PowerShell.PlatyPS -Prerelease

Documentation to get started

For the preview1 release, the cmdlet reference is available in the GitHub repository at
Microsoft.PowerShell.PlatyPS. We’re working on publishing the documentation to the Learn
platform before the next release.

For an example of how to use the new cmdlets, see Example #1 in New-MarkdownCommandHelp.

Call to action

Our goal is to make it easier for you to update and maintain PowerShell help files. We value your
feedback. Stop by our GitHub repository and let us know of any issues you find.

Jason Helmick

Sr. Product Manager, PowerShell

The post Announcing Microsoft.PowerShell.PlatyPS 1.0.0-Preview1 appeared first on PowerShell Team.