Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
Read in English
Read in English Edit
Twitter LinkedIn Facebook Email

Sample scripts for system administration

A collection of examples walks through scenarios for administering systems with PowerShell.

Working with objects

How-To Guide

  • Viewing object structure
  • Selecting parts of objects
  • Removing objects from the pipeline
  • Sorting objects
  • Creating .NET and COM objects
  • Using static classes and methods
  • Getting WMI objects with Get-CimInstance
  • Manipulating items directly

Managing computers

How-To Guide

  • Changing computer state
  • Collecting information about computers
  • Creating Get-WinEvent queries with FilterHashtable

Managing processes & services

How-To Guide

  • Managing processes with process cmdlets
  • Managing services
  • Working with printers
  • Performing networking tasks
  • Working with software installations
  • Decode a PowerShell command from a running process

Working with output

Concept

  • Redirecting output
  • Using format commands to change output view

Managing drives & files

How-To Guide

  • Managing current location
  • Managing PowerShell drives
  • Working with files and folders
  • Working with files folders and registry keys
  • Working with registry entries
  • Working with registry keys

Creating UI elements

How-To Guide

  • Creating a custom input box
  • Creating a graphical date picker
  • Multiple selection list boxes
  • Selecting items from a list box
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2023
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2023