PowerShell Script to create a custom Security Role???

Does anyone have a PowerShell script to create a custom security role?

August 25th, 2015 10:45am

I'm getting closer...

I created a 'Security Role' in my lab with all the settings I need and exported the role to an XML file.

Then I used the 'Import-CMSecurityRole -XmlFileName' to import the security role.

Then I use 'New-CMAdministrativeUser...' to create the new user with my custom role and assign Collections and Security Scopes to it.

I'm using 'New-CMSecurityScope...' to create a new securitry scope.

The piece I'm missing is how to add the security scope to objects programatically.

I want to avoid the SCCM Admin from having to add the Security Scope to objects manually through the SCCM Admin console.

Does anyone know of a way to to add a Security Scope to objects via a script/powershell?

Free Windows Admin Tool Kit Click here and download it now
August 26th, 2015 11:10am

It depends on the object you want to modify, here's how to do it for an application: https://technet.microsoft.com/library/jj821745(v=sc.20).aspx (Set-CMApplication)
August 26th, 2015 11:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics