Windows PowerShell Module Documentation

repository·main·Indexed 19 days ago

https://github.com/microsoftdocs/windows-powershell-docs

Official documentation for Windows client, Windows Server, and MDOP PowerShell modules. Includes installation guides for Windows management modules via Optional Features and Windows Capabilities, and detailed PowerShell 7 compatibility references for Windows Server 2016, 2019, 2022, and 2025. Provides technical details on the Active Directory module, including CRUD operations, account policy management, and domain/forest administration.

Tokens
239K
Snippets
593
Records
918
Agent score
61%

What's inside Windows PowerShell Docs

  1. Overview of the Hyper-V Module

    main

    The Hyper-V module provides a set of PowerShell cmdlets designed to manage Hyper-V virtualization technologies on Windows and Windows Server. This module allows for the programmatic management of virtual machines, virtual hard disks, network adapters, and other Hyper-V specific resources. The cmdlets are organized alphabetically by their verb.

    Module Metadata:

  2. Overview of the ClusterAwareUpdating Module

    main

    The ClusterAwareUpdating module provides a set of cmdlets designed to manage Cluster-Aware Updating (CAU) on Windows Server clusters. It allows administrators to automate the process of scanning cluster nodes for updates, installing those updates, and managing the self-updating role that facilitates these operations.

    Key capabilities include:

    • Managing the CAU clustered role (adding, enabling, disabling, or removing).
    • Executing and monitoring updating runs (Invoke-CauRun, Get-CauRun, Stop-CauRun).
    • Scanning nodes for updates without immediate installation (Invoke-CauScan).
    • Managing software updating plug-ins (Register-CauPlugin, Get-CauPlugin).
    • Reporting and diagnostics (Export-CauReport, Get-CauReport, Save-CauDebugTrace).
  3. Overview of Windows PowerShell documentation

    main
    This repository contains the official PowerShell module documentation for Windows client, Windows Server, and the Microsoft Desktop Optimization Pack (MDOP). The documentation is written specifically for IT professionals to assist with managing and automating Windows environments.
  4. Overview of the DISM Module

    main

    The Deployment Image Servicing and Management (DISM) platform is used to mount and service Windows images before deployment. It allows you to manage Windows image (.wim) files or virtual hard disks (.vhd or .vhdx).

    Key capabilities include:

    • Mounting and dismounting Windows images.
    • Installing, uninstalling, configuring, and updating Windows features, packages, and drivers.
    • Changing the edition of a Windows image.
    • Managing app packages (.appx) that install for each new user.

    DISM is available as a PowerShell module and as a command-line tool (DISM.exe). The command-line tool is included in the Windows Assessment and Deployment Kit (Windows ADK).

  5. Manage Hyper-V with PowerShell Cmdlets

    main
    The Hyper-V module provides a comprehensive set of cmdlets for managing Hyper-V hosts, virtual machines (VMs), virtual hard disks (VHDs), virtual switches, and replication settings. You can use these cmdlets to automate the entire lifecycle of virtualization, from creating new VMs and configuring hardware (DVD drives, SCSI controllers, network adapters) to managing storage (VHD conversion, merging, and optimization) and ensuring high availability through replication and failover.
  6. Check PowerShell 7 module compatibility for Windows Server 2022

    main
    This documentation provides a status list of Microsoft-published PowerShell modules and their compatibility with PowerShell 7 on Windows Server 2022. These modules are used for managing various Microsoft products and services. Modules in this list are either updated to work natively with PowerShell 7 or have been tested for compatibility. Use this list to verify if your management modules will function correctly when running in a PowerShell 7 environment instead of Windows PowerShell.
  7. Use Get-ADReplicationUpToDatenessVectorTable to check replication status

    main

    The Get-ADReplicationUpToDatenessVectorTable cmdlet displays the highest Update Sequence Number (USN) for specified domain controllers. This information is used to determine how up-to-date a replica is with its replication partners. Because USN values are local to each domain controller, they are used to track object modifications during the replication process.

    Get-ADReplicationUpToDatenessVectorTable -Target corp-DC01
  8. Enable-SbecAutologger cmdlet overview

    main

    The Enable-SbecAutologger cmdlet enables the forwarding of events to the Setup and Boot Event Collector (SBEC) by modifying the AutoLogger settings in the registry.

    Key Behaviors:

    • Reboot Required: Changes have no immediate effect on currently running log sessions; they take effect only after the operating system reboots and the AutoLogger service restarts.
    • Dual Requirement: You must enable both AutoLogger and BCD (Boot Configuration Data) settings to successfully forward events to the Boot Event Collector.
    • Modes of Operation: You can target a local computer, remote computers (via WinRM/PSSession), or offline disk images (WIM or VHD).
    • Session Types:
      • Use -Logger for sessions where forwarding is automatically disabled once the OS boot sequence completes and the logging subsystem is functional.
      • Use -PermLogger for sessions that should continue forwarding events all the time (e.g., SetupPlatform).
    • Real-time vs File: By default, only real-time mode sessions are enabled for forwarding. Use -ForceLogger to switch file-based sessions to real-time mode.
    Enable-SbecAutologger -ComputerName "Server01"
  9. Generate Code Integrity policy rules with New-CIPolicyRule

    main

    The New-CIPolicyRule cmdlet from the ConfigCI module is used to generate Code Integrity (CI) policy rules for drivers or specific file paths. You can specify the level of detail for the rules (e.g., Publisher, Hash, FileName) and provide either an array of DriverFile objects or a specific driver file path.

    Key Concepts

    • Rule Levels: You define how strictly a rule is applied using the -Level parameter. Common levels include Publisher, Hash, FileName, and FilePath.
    • Fallback Mechanism: If the cmdlet cannot generate a rule at your primary -Level, you can use the -Fallback parameter to specify alternative levels to attempt in order.
    • Allow vs. Deny: By default, the cmdlet creates 'Allow' rules. Use the -Deny switch to create 'Deny' rules instead.
    # Example: Create policy rules for drivers using Get-SystemDriver
    $DriverFiles = Get-SystemDriver -ScanPath '.\temp\' -UserPEs -OmitPaths '.\temp\ConfigCITestBinaries' -NoScript
    New-CIPolicyRule -Level FileName -DriverFiles $DriverFiles
  10. Manage Cluster-Aware Updating with the ClusterAwareUpdating module

    main

    The ClusterAwareUpdating module provides cmdlets to manage Cluster-Aware Updating (CAU) on Windows Server clusters. It allows you to automate the process of scanning cluster nodes for updates and installing them while maintaining cluster availability.

    Key capabilities include:

    • Adding, enabling, disabling, or removing the CAU clustered role.
    • Performing scans (Invoke-CauScan) and full updating runs (Invoke-CauRun).
    • Managing software updating plug-ins (Register-CauPlugin, Get-CauPlugin).
    • Monitoring and reporting on updating runs (Get-CauRun, Get-CauReport, Export-CauReport).