Forum Discussion
Ameerm2023
Apr 27, 2023Copper Contributor
Not getting the values in CSV
I have the PowerShell scripts which is giving output saved as CSV file if i run the scripts manually but If create the windows scheduler to run it automatically i am not getting any result saved in t...
Axel Andersen
Apr 28, 2023Copper Contributor
You could try to use a fully qualified path for the files:
$Root = "C:\EveryoneCanWriteHere\UserUsage" #<- set ACL on this folder
$Disabled = "$Root\DisabledUsers.csv"
$enabled = "$Root\EnabledUsers.csv"
Tweak the ACL if needed to allow the account running the task the correct access. Then you can run the task without elevated privileges.
$Root = "C:\EveryoneCanWriteHere\UserUsage" #<- set ACL on this folder
$Disabled = "$Root\DisabledUsers.csv"
$enabled = "$Root\EnabledUsers.csv"
Tweak the ACL if needed to allow the account running the task the correct access. Then you can run the task without elevated privileges.