Skip to content

Instantly share code, notes, and snippets.

@alainassaf
Created February 7, 2017 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alainassaf/d67470175e0403774d0313c7ad0aac70 to your computer and use it in GitHub Desktop.
Save alainassaf/d67470175e0403774d0313c7ad0aac70 to your computer and use it in GitHub Desktop.
Code snippet 4 from run-delprof2.ps1
# Get computers in workergroup
$wgservers = (Get-XAWorkerGroupServer -ComputerName $XMLBroker -WorkerGroupName $workergroup)
# Run DelProf against servers in workergroup
foreach ($server in $wgservers) {
$sname = $server.servername.Tostring()
$arg1 = '-c:' + $sname
$arg2 = '/u'
& $Delproflocation $arg1 $arg2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment