Waclaw Chrabaszcz
... there is no spoon ...

SCCM 2012 SP1 – Welcome PowerShell on board!

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"

get-psdrive
#TST CMSite sccm.TESTDOMAIN.NET
cd tst:

# 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

#boundaries
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"

#bundary group
New-CMBoundaryGroup -Name "BoundaryGroup"
Add-CMBoundaryToGroup -BoundaryName "ADsite" -BoundaryGroupName "BoundaryGroup"
Add-CMBoundaryToGroup -BoundaryName "IPSubnet" -BoundaryGroupName "BoundaryGroup"
Add-CMBoundaryToGroup -BoundaryName "IPRange" -BoundaryGroupName "BoundaryGroup"

#distribution points
New-CMDistributionPointGroup -Name "DistributionPointsGroup"
Add-CMDistributionPointToGroup -DistributionPointName "sccm.TESTDOMAIN.NET" -DistributionPointGroupName "DistributionPointsGroup"

#admins
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 ?

 




Feedback

# How To Make Money

Great post guys.. 1/21/2013 2:51 PM | Rob Colville

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

Thanks! I hope I will create something interesting for you soon :) 2/10/2013 3:26 PM | wchrabaszcz

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

It may seem that materials that focus completely on the exam are the best ones to use, but this is not always the case. Oracle certification tests are designed to cover a broad range of topics, but they do not cover everything an Oracle professional needs to know for their daily work.
2/27/2013 3:04 AM | Mike

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

Mike i am not taking your point. My blog is MY OWN and it is something between personal Knowledge Base and dairy. I am really sad seeing that you are mistaking true passion with the exam cheating. I think as most IT pros i have 90% of my knowledge in my head and 10% on the blog. Yes my bad i am blogging a bit for myself. So I don't need to explain myself basics of any technology. If you are on my level or higher you don't need to read 2 pages of boring explanations, you (or rather I ) are looking for pure, clean explanation, why and how to fix it. If you need some more backgroud in any of my blogging topcic please ask in comment for refferences, i will do my very best to help you to understand this area.
Thanks and regards! 3/2/2013 10:05 AM | wchrabaszcz

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

This is exactly what I was telling my friend about, it's honestly helped my health and my progress tremendously Nopalea Reviews I mean without it I wouldn't be here! 3/19/2013 8:04 AM | Victor

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

@wchrabaszcz

Thanks for the post... But you do realise that every comment on this page, other than mine and yours, is spam? Mike, Rob Colville, and Victor.. all spam. They've got links to other sites attached to their name or within their posts. 3/21/2013 2:45 AM | Brendan

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

You have good content and I would like to know if you have any other posts about this.This post has helped me to have another perspective. ffxiv gil 3/21/2013 3:52 AM | Carsion

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

Great information on your site here. I love this post because we can get some useful information from your blog. 3/21/2013 3:53 AM | ffxiv gil

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

Thanks all. I will try to keep this level :) 3/21/2013 10:15 AM | wchrabaszcz

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

You have good content and I would like to know if you have any other posts about this.This post has helped me to have another perspective. 4/10/2013 6:59 PM | CK

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

That's great - but if you try to use powershell with ConfigurationManager from a remote machine, and you do an 'import-pssession', you don't get the Config-Manager PSDrive representing the site - and the powershell cmdlets for Config-Manager don't run. 7/15/2013 4:20 PM | FG Clodt

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

Hello, (sac prada)
This is really a interesting facts! I like the way you write and deliver to us your article content. Fantastic work! 7/30/2013 3:18 PM | thank

# re: SCCM 2012 SP1 – Welcome PowerShell on board!

Nice cover, the MS guide examples are also available but your examples are better. Did anyone work out how to add the OU targets to discovery, even Get-CMDiscoveryMethod -Name "ActiveDirectoryUserDiscovery" does not list it though. - Ian
9/18/2013 2:29 PM | Ian Hunt

Post a comment