web analytics

Blog

How to add an Administrative user

Posted by:

To add an Administrative user

  1. Set up a connection to the SMS Provider.
  2. Identify the necessary information.
  3. Create an instance of the SMS_APermission WMI class
  4. Set the CategoryID, CategoryName, CategoryTypeID, RoleID and RoleName properties
  5. Create an instance of the SMS_AdminWMI class
  6. Depending on the configuration, set the correct value

Examples

This example adds an Application Administrator

Example Output

You can download the code examples from here



About the Author:

Kaido Järvemets is a developer, consultant, trainer specializing in Microsoft System Center Configuration Manager and PowerShell Solutions at Coretech. Kaido frequently speaks at European conferences and had his US debut as speaker at MMS April 2013. Kaido is well-known in the Configuration Manager communities where he’s a key player in the PowerShell game. Kaido host one of the most complete Configuration Manager PowerShell library’s in the world with hundreds of free code samples ready to download and implement – www.cm12sdk.net. Kaido has been awarded Microsoft Most Valuable Professional (MVP) in Microsoft Enterprise Client Management for his work with Configuration Manager from 2011 – to present. Kaido is the founder of System Center User Group Estonia in 2011.

Discussion

  1. Fred  May 15, 2013

    This is great sample code, but where do you get the SID? Surely you don’t want to create a bunch of users with identical SIDs.

    (reply)

Add a Comment