How to print environment variables to the console in PowerShell?

You can use PowerShell cmdlet Get-ChildItem to print all the environment variables available in your current PowerShell session. Here is a quick example for your reference –

Leave a Reply