PowerShell: Creating Active Directory Managed Service Accounts

Hey folks, I’ve recently been trying to learn more about Active Directory Managed Service Accounts (MSAs), which are basically self-managing service accounts. You don’t have to manage the Service Principal Name (SPN) or password for MSAs, which makes them very good choices for running applications. You can read more about …

Continue reading

PowerShell: Retrieve List of SCCM Site Codes

If you’re using System Center Configuration Manager (SCCM / ConfigMgr) 2007, you may want to discover how many SCCM sites you have from Active Directory. Of course, this assumes that you have Active Directory publishing enabled on your primary sites. When enabled, SCCM automatically places site information underneath the CN=System …

Continue reading

PowerShell: Creating the System Management Container

If you’ve ever worked with Systems Management Server (SMS) 2003 or System Center Configuration Manager (ConfigMgr / SCCM) 2007, you probably are familiar with the step of creating the “System Management” container underneath the “CN=System,DC=mydomain,DC=com” container in Active Directory. Normally you have to go into ADSIEdit.msc in order to do …

Continue reading

PowerShell: Removing a list of computers from Active Directory

@Kid_Zer0 on Twitter recently asked the following question: “Need to delete a list of computers from AD – anyone know how to do this in #PowerShell or #VBScript (List is from a file)” I’ve previously written several versions of an Active Directory cleanup script, but if you’re not seeking something …

Continue reading