O'Reilly logo

Microsoft® Windows PowerShell™ Step By Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

One Step Further: Windows Environment Settings

In this exercise, we explore Windows environmental settings.

  1. Open Windows PowerShell.

  2. Use the Get-WmiObject cmdlet to view the common properties of the WIN32_Environment WMI class. Use the gwmi alias to make it easier to type. This command is shown here:

    gwmi win32_environment
  3. The partial output from this command is shown here:

    VariableValue              Name                       UserName
    -------------              ----                       --------
    C:\PROGRA~1\CA\SHARED~1... AVENGINE                   <SYSTEM>
    %SystemRoot%\system32\c... ComSpec                    <SYSTEM>
    NO                         FP_NO_HOST_CHECK           <SYSTEM>
  4. To view all the properties of the WIN32_Environment class, pipeline the object returned by the Get-WmiObject cmdlet to the Format-List cmdlet while specifying the asterisk. Use the up arrow to retrieve the previous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required