Hello Varma,
You can use the below command:Get-ChildItem -Path Env:To also export to csv use: Get-ChildItem -Path Env: | Export-Csv test.csv
PowerShell command to list all the environment variables of virtual machine
Varma
1,495
Reputation points
Is there any PowerShell command to list all the environment variables available in Virtual machine and export to CSV file
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
Accepted answer
-
shiva patpi 13,366 Reputation points Microsoft Employee Moderator
2024-02-12T01:16:30.49+00:00