Hello, I have a PowerShell script that I use to run a couple of things related to a remote server and processes.BTW - I'm very new to PS.
Here are the snippets: (I dont run both, but either one serves my purpose...)
Get-Process -ComputerName name| Sort-Object ProcessName | Out-File C:\temp\processes_01v.txt -Width 120
OR
TASKLIST /v /fi "STATUS eq running" /s name | SORT > C:\temp\processes_01v_b.txt
Both fail given my current access to the server is very limited. The server teams decided to give me a service account to run the script. Is there a way to run the script as someone else? i.e. elevate the rights of the script so I run it as admin?