Customizing the PowerShell Environment

  • Bryan Cafferky


PowerShell provides an amazing level of customization and transparency. In this chapter, we will discuss how PowerShell supports configuration using three types of variables: automatic, preference, and environment. Automatic variables are created and used by PowerShell to support its operations and can be read by scripts to get context-specific information. Preference variables control PowerShell’s behavior and can be modified to suit our needs. Environment variables are not specific to PowerShell. They are variables used by Windows applications including PowerShell and can be created, read, and set by PowerShell scripts. We’ll review how to use aliases to create our own names for PowerShell cmdlets. We will use PowerShell drives to dynamically create short names for provider locations. Finally, we’ll discuss how to use all these features to customize PowerShell sessions on startup using a special script called a profile.


Preference Variable Field Separator Network Drive Property Bool Drive Mapping 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Bryan Cafferky 2015

Authors and Affiliations

  • Bryan Cafferky
    • 1
  1. 1.MAUS

Personalised recommendations