Skip to content

Instantly share code, notes, and snippets.

@alainassaf
Created February 7, 2017 19:55
Embed
What would you like to do?
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