August, 2013

  • Creating Lab Computer Objects

    So I’m getting my preparation done for TechEd 2013 on the Gold Coast and needed to fill my ConfigMgr hierarchy with some dummy computer objects. My session being PowerShell for ConfigMgr 2012 SP1, of course I went straight to PowerShell to do the work for me. 

    I’m not looking for anything too special; 1000 laptops, 1000 desktops and 500 servers for my demo domain

    ConfigMgr can be a little picky when it comes to AD System Discovery, such as requiring a matching DNS record and a valid Operating System value. All of the options below are required otherwise you get errors in the ADSysDis.log.


    Here’s my script (note: you must have the Active Directory PowerShell module installed on the local machine)


    Import-Module ActiveDirectory
    $LaptopCount = 1001
    $DesktopCount = 1001
    $ServerCount = 501
    # Create Laptops
    While ($Count -lt $LaptopCount)
    New-ADComputer -Name "CON-LAP-$Count" -DNSHostName "CON-LAP-$" -OperatingSystem "Windows 7 Enterprise" -OperatingSystemVersion "6.1 (7600)"
    Add-DnsServerResourceRecord -ZoneName -Name "CON-LAP-$Count" -IPv4Address "" -A
    $Count = $Count + 1
    $Count = 1
    # Create Desktops
    While ($Count -lt $DesktopCount)
    New-ADComputer -Name "CON-DSK-$Count" -DNSHostName "CON-DSK-$" -OperatingSystem "Windows 7 Enterprise" -OperatingSystemVersion "6.1 (7600)"
    Add-DnsServerResourceRecord -ZoneName -Name "CON-DSK-$Count" -IPv4Address "" -A
    $Count = $Count + 1
    $Count = 1
    # Create Servers
    While ($Count -lt $ServerCount)
    New-ADComputer -Name "CON-SVR-$Count" -DNSHostName "CON-SVR-$" -OperatingSystem "Windows Server 2012 Enterprise" -OperatingSystemVersion "6.2 (9200)"
    Add-DnsServerResourceRecord -ZoneName -Name "CON-SVR-$Count" -IPv4Address "" -A
    $Count = $Count + 1

    Active Directory Computer accounts


    DNS A Records


    Matt Shadbolt

  • Teched Australia 2013: Powershell for ConfigMgr 2012 SP1


    SMIC1608_blogBling_speaking For the second year running, I’ll be speaking at the Teched Australia 2013 conference on the Gold Coast, Australia.

    The session will cover the Powershell integration into ConfigMgr 2012 SP1.

    I’ll be posting all the scripts, video and transcript after the event.

    Hope to see you there!

    Powershell for ConfigMgr 2012 SP1
    Wednesday, September 4
    5:00 PM – 6:15 PM
    Meeting Room 7&8