Monday, January 21, 2013 10:41 AM
I don't know how about you, but for me PowerShell is the only reason to migrate from SCCM 2007 to SCCM 2012. As an old-school SMS and SCCM admin I am not sure about user-centric distribution. Let's say straight. App-V and XenApp are much better in follow me apps, than classic MSIs. OK, let's stick the point. I have about 5 hours of experience with SCCM PowerShell module, and I can say there are pros and cons. What made me really sad: SCCM modules works only in x32 environment. It's a big mistake I think, especially, when Microsoft is trying to push us into x64 architecture. What is good … let's create some initial configuration:
Import-Module "C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
#TST CMSite sccm.TESTDOMAIN.NET
# need to set OU for searching
Set-CMDiscoveryMethod -ActiveDirectorySystemDiscovery -Enabled $true
Set-CMDiscoveryMethod -ActiveDirectoryUserDiscovery -Enabled $true
Set-CMDiscoveryMethod -ActiveDirectoryGroupDiscovery -Enabled $true
Set-CMDiscoveryMethod -ActiveDirectoryForestDiscovery -Enabled $true
New-CMBoundary -Name "ADsite" -Type ADSite -Value "Datacenter1"
New-CMBoundary -Name "IPSubnet" -Type IPsubnet -Value "192.168.1.0"
New-CMBoundary -Name "IPRange" -Type IPrange -Value "192.168.1.1-192.168.1.254"
New-CMBoundaryGroup -Name "BoundaryGroup"
Add-CMBoundaryToGroup -BoundaryName "ADsite" -BoundaryGroupName "BoundaryGroup"
Add-CMBoundaryToGroup -BoundaryName "IPSubnet" -BoundaryGroupName "BoundaryGroup"
Add-CMBoundaryToGroup -BoundaryName "IPRange" -BoundaryGroupName "BoundaryGroup"
New-CMDistributionPointGroup -Name "DistributionPointsGroup"
Add-CMDistributionPointToGroup -DistributionPointName "sccm.TESTDOMAIN.NET" -DistributionPointGroupName "DistributionPointsGroup"
New-CMAdministrativeUser -RoleName "Full Administrator" -Name "TESTDOMAIN\Domain Admins"
and small tip:
btw. Anyone knows how to add LDAP path into Discovery or Boundary Group to Distribution Point using PowerShell magic ?