Judical Posted June 1, 2016 Report post Posted June 1, 2016 Hello, Is there a way to do this? I have tried several different methods and it just ends up adding the computer name to admin group. When run a package from SCCM with admin rights %username% ends up being the computer name. Is there a way around this? -Judical Quote Share this post Link to post Share on other sites More sharing options...
Apexes Posted June 1, 2016 Report post Posted June 1, 2016 That could be because when running as SCCM it'll run as the system account. Not sure there's really a way for you to achieve this adding a currently logged in user. Quote Share this post Link to post Share on other sites More sharing options...
Judical Posted July 7, 2016 Report post Posted July 7, 2016 deleted resolved Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted July 7, 2016 Report post Posted July 7, 2016 deleted resolved So how did you fix this? Quote Share this post Link to post Share on other sites More sharing options...
Judical Posted July 15, 2016 Report post Posted July 15, 2016 for /F "tokens=1,2" %%i in ('qwinsta /server:%COMPUTERNAME% ^| findstr "console"') do set tempVar=%%j Quote Share this post Link to post Share on other sites More sharing options...