Getting the path of AppData using PowerShell

Getting the path of %AppData% using PowerShell + $env: usage

There are 2 ways to find the folder location of AppData on a  PC, and to check appdata path.

The first method uses the simple $env: command. This command has long been used by C# users to make multi platform software, in the case where your AppData or any other environmental variable may be living somewhere other than the normal factory set location.

Simply open up powershell and type:

$env:APPDATA

Getting the path of %AppData% using PowerShell + $env: usage

Method 2 is basically doing the exact same as above, but this time using a call and answer approach:

Get-Childitem env:APPDATA | %{ $_.Value }

path of %AppData% using PowerShell + $env:  call

Below are some extra $env: variables that you may find useful;

Name                           Value
----                           -----
TEMP                           C:\DOCUME~1\bob\LOCALS~1\Temp
SESSIONNAME                    Console
PATHEXT                        .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PS1;.PSC1
USERDOMAIN                     WINGROUP
PROCESSOR_ARCHITECTURE         x64
SystemDrive                    C:
APPDATA                        C:\Users\bob\Application Data
windir                         C:\WINDOWS
USERPROFILE                    C:\Users\bob

 

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *