Table of Contents

Free Active Directory Auditing Tool!

Try it now

Upgrade your Specops Deployment servers using Powershell

Table of Contents

Upgrade your Specops Deployment servers using Powershell

A few weeks ago, I visited a customer with a large Specops Deploy environment: about 60 sites and one deployment server on each site.

Instead of upgrading from the Specops Deploy GUI, I used two PowerShell scripts and the awesome Specops Deploy cmdlets.

First, I wanted to get all the Deployment Servers in the domain. A good way of doing that is querying AD for all machines with a Service Connection Point called Specops Deploy Deployment Server, and writing those host names to a text file.

Upgrade your SD servers using Powershell - pic 1

The “collect servers” script:

$filePath = "C:\Temp\DeploymentServers.txt"
Remove-Item $filePath -ErrorAction SilentlyContinue
$serviceConnectionPoint = Get-ADObject -Filter 'ObjectClass -eq "serviceConnectionPoint" -and Name -eq "Specops Deploy Deployment Server"' 
$serviceConnectionPoint | ForEach-Object {
    $AdsiObject = [ADSI]"LDAP://$_"
    $DeploymentServerName = ($AdsiObject.PSBase.Parent).dnsHostName
    write-host -fore Green "Adding deployment server $DeploymentServerName to file"
    $DeploymentServerName | Out-File -FilePath $filePath -Append
} 

I can use the text file with my next script: the “upgrade” script which will upgrade all servers named in the text file C:\Temp\DeploymentServers.txt.When each upgrade is complete, it will also remove the Multicast configuration from Windows Deployment Services. If you don’t see yourself as a network infrastructure guru, and also plan to deploy over 50 machines at the same time, you might want to remove Multicast from WDS. This will do it for you.

The “upgrade” script:

Import-Module SpecopsDeploy;
Get-Content -Path C:\Temp\DeploymentServers.txt | foreach {
    Write-Host ""
    Write-Host "Upgrading Server $_ ..." ;
    try
    {
        Upgrade-SDDeploymentServer -ServerName $_
        Remove-SDMulticastStream $_ 
        $_ | out-file -append -filepath 'c:\SuccessfulUpgrades.txt'
        Write-Host -fore Green "Successfully upgraded $_"
    }
    catch
    {
        Write-Host -fore Red "Failed to upgrade $_"
        $_ | out-file -append -filepath 'c:\FailedUpgrades.txt'
    }
} 

I hope this will help our customers with large Specops Deploy environments.

Happy Deployment!

(Last updated on November 5, 2024)

mikael ingelin

Written by

Mikael Ingelin

Product specialist from Stockholm, Sweden has worked in the IT industry for over 25 years. For the past 10 years he has been working at Specops Software and before this he was responsible for the complete IT infrastructure at one of Sweden’s largest law firms. He has a broad practical and theoretical experience of managing, architecture and deploying complex IT infrastructures. Extensive knowledge of virtualization, Windows Server, Windows security, Active Directory and Group Policy.

Back to Blog

Free Active Directory Auditing Tool!