Managing Processes with PS and SCCM

Welcome Forums General PowerShell Q&A Managing Processes with PS and SCCM

This topic contains 3 replies, has 2 voices, and was last updated by

 
Moderator
1 year, 7 months ago.

  • Author
    Posts
  • #65286

    Participant
    Points: 0
    Rank: Member

    Hi All,

    I am wanting to create a CI in SCCM that,

    1. Checks to see if a proces is running as admin.
    2. If not, runs the process as an admin.

    Can something like this be done?

    Regards

  • #65299

    Moderator
    Points: 0
    Team Member
    Rank: Member

    Do you mean running with a specified user who has admin rights configured?
    Or do you want to check if a process has been elevated to run with admin rights (UAC)?

  • #65301

    Moderator
    Points: 0
    Team Member
    Rank: Member

    If you want to check if a process is elevated the page below might help:

    #PSTip Detecting if a certain process is elevated

  • #65302

    Moderator
    Points: 0
    Team Member
    Rank: Member

    Starting a process as admin is more difficult because you would need to embed the credentials into the CI script which is not good practice. Have you thought about running the application as service? The free tool NSSM (http://nssm.cc/) can help you to run basically any application as service.

The topic ‘Managing Processes with PS and SCCM’ is closed to new replies.