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.
Answer accepted by question author
-
shiva patpi 13,376 Reputation points Microsoft Employee Moderator
2024-02-12T01:16:30.49+00:00