Im writing a script that removes user profiles with in powershel using this command
Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and (!$_.loaded)} | Remove-WmiObject
How would i go about adding a progress bar to the command, so that when one profile has been removed it would go up type of thing, this is part of a gui program and the console is hidden
write-progresswrite-progressto the command, as this command in its self is recursive, the only documentation for this is with it in loops of some form