This website uses cookies to ensure you get the best experience on our website. Learn more
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.
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)
Related Articles
-
Failing Specops Deploy package
A customer had a problem with a App Deploy package that’s not working. He says it works fine when executing manually with runas administrator, but it’s not working when using Specops Deploy, on a computer target. I asked him for the package to have a look at it. He was trying to execute a script…
Read More -
Friends or Simpsons? New data shows which TV shows are most popular in breached passwords
Looking to catch up with your favorite TV show as it returns this month? You might want to rethink expressing your fandom in your password, as new research from the Specops team shows which TV shows are most popular in breached password data. According to our new research, The Flash took the #1 TV show spot, showing up over…
Read More -
How to evaluate breached password detection services
Keeping tabs on breached passwords is a must for those embroiled in the IT security battle. According to the 2020 Data Breach Investigations Report, 80% of data breaches in 2020 stemmed from stolen or brute-forced credentials. The stakes are high. Just one problematic endpoint in your environment can cause far-reaching consequences. Consequently, organizations have come…
Read More