PS Service env:APPDATA path

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Post Reply
User avatar
daniel kusnir
Posts: 43
Joined: Thu May 25, 2017 8:22 am

PS Service env:APPDATA path

Post by daniel kusnir »

hello

do you know why running service returns $env:Appdata path :

C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\

while regular script points to standard user appdata folder c:\users\<user>\appdata\Roaming

User avatar
daniel kusnir
Posts: 43
Joined: Thu May 25, 2017 8:22 am

Re: PS Service env:APPDATA path

Post by daniel kusnir »

ah just found out. since its running under service account, it has different path to profile

Post Reply