SCCM: Getting the machine OU

By YellowOnline on Friday 19 April 2013 10:16 - Comments (0)
Category: SCCM, Views: 14.305

At one point you might be interested to get from your SCCM database the OU in which a machine resides. And find out that you don't have that information. Here's a solution.

Read more »

Export SCCM Boundaries to Excel with PowerShell

By YellowOnline on Wednesday 11 May 2011 13:30 - Comments (2)
Category: SCCM, Views: 11.398

Last Monday I created two scripts: Import-SCCMBoundaries and Export-SCCMBoundaries. I'm not posting the first one as it's merely a wrapper around the ConfigMgr Site Bound Tool from David Delgado.
In case it might help anyone, here's the Export-script. It queries WMI for the current boundaries and exports them to Excel in exactly the same format as Site Bound uses. Good idea for backing up your boundaries :)

- It is culture independent thanks to some code I lent from Jeffrey Snover
- Because I did not include my own logging cmdlet, I replaced all occurrences of the that cmdlet by a Write-Host.
- I wasn't planning to publish this when I created it, so it is poorly documented. Feel free to ask questions.

Concerning the question why I do not simply export to CSV:
1) I wanted the output to be exactly the same as the input for the Site Bound Tool.
2) CSVs are problematic in a multilingual environment because the delimiter depends on the culture. Even though CSV stands for Comma Seperated Value, a lot of CSV are semi-colon seperated. I cannot stress the importance of internationalization enough - a very common problem in any company that does not default to "en-US".
3) It also shows how to export something to Excel in PoSh.

Read more »