JSteenberge
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by JSteenberge
-
-
You can do this, but need psexec and Windows is not designed to really do this. It's a security flaw since each user session is supposed to be a controlled session. That said, the below works for me (with a copy of psexec somewhere on the machine .... can copy to anywhere on machine via script).
#Add command to copy psexec to computer
Copy-Item -Path \\server\share\psexec.exe -Destination C:\scripts\psexec.exe
#Get the console user session ID
$session = tasklist /fo CSV | findstr Console ; $session = $session.Split(",")[3] ; $session.split('"')[1]
#Launch notepad via session variable
& .\psexec.exe -s -i $session notepad.exeAgain, this is a security flaw and some apps may not work as well as notepad does but it does work.
Reg edit powershell scripts
in PowerShell
Posted
We use powershell scripts within Pulseway to do this often. I use the registry to keep track of custom installs for non-msi applications. I'll DM you here.