To get the AppData directory, use the GetFolderPath method:
[Environment]::GetFolderPath([Environment+SpecialFolder]::ApplicationData)
Or, as Andy mentions in his comment, simply:
[Environment]::GetFolderPath('ApplicationData')
Martin Buberl Apr 12 2018-12-12T00: 00Z
source share