![]() To view the current value of Path System variable, use the following command: System.Environment::GetEnvironmentVariable ('Path','Machine') -Split ' ' This command will list all the System variables under Path. Powershell reads the module pathes from the PSModulePath environment variable. To view and change the System (Machine) variables, follow these steps: Launch Windows PowerShell console with administrator privilege. The method to set an environment variable is ::SetEnvironmentVariable().įor example: You want to add a additional user path, D:\MyModules, for powershell modules. PS D:\> $myPowershellModulePathes=::GetEnvironmentVariable("PSModulePath ","user") ![]() ![]() PS D:\> ::GetEnvironmentVariables("user") The environment of an user contains two parts: The user and the system part. Powershell can set,edit or delete environment variables as well as cmd.exe command line interpreter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |