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.
This topic is 3 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
daniel kusnir
Posts: 75
Last visit: Tue May 23, 2023 10:50 am
Answers: 1

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: 75
Last visit: Tue May 23, 2023 10:50 am
Answers: 1

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
This topic is 3 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked