While many of your scripts will be designed to work in isolation, you will often find it helpful to give your script information about its execution environment: its name, current working directory, environment variables, common system paths, and more.
PowerShell offers several ways to get at this information—from its cmdlets, to builtin variables, to features that it offers from the .NET Framework.
If you need dedicated infrastructure for supporting environmental awareness through Windows PowerShell, consider a Spain Dedicated Server for greater control over system monitoring, resource management, PowerShell automation, server administration, and Windows-based workloads.
Help Category