PowerShell

Save PowerShell Console session commands and there output in to text file.

  Hi, These days i am very busy in some other projects so that’s why this months i post only few articles. Sorry for that. Does anytime you think to save all the commands and there output in to text file? it like storing all of the PowerShell Consoles session data. If yes and you… Continue reading Save PowerShell Console session commands and there output in to text file.

PowerShell

Accessing Windows Environment Variables using PowerShell.

  Hi, Before working on script i always thought that these windows “Environment Variables” are not so important, but as i start working on PowerShell and start working on script i realise that these windows “Environment Variables” are very useful. I uses these windows “Environment Variables” in most of my scripts. Why these windows “Environment… Continue reading Accessing Windows Environment Variables using PowerShell.

PowerShell

Enumerating Registry Keys

  Enumerating Registry Keys To enumerate all subkeys in a Registry key, you might be using a line like this: PS> Dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Select-Object -expand PSPath Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AddressBook Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Connection Manager (…) It will return the PowerShell-style path including the provider name, not just the Registry path. If you used the -Name parameter, on the other… Continue reading Enumerating Registry Keys