PowerShell: удаляем ICQ для всех пользователей
Удаляем ICQ для всех пользователей сервера:
1 2 3 4 5 6 7 8 |
Stop-Process -Name "icq" -Force Get-ChildItem 'C:\Users\*\AppData\Local\ICQ' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue Get-ChildItem 'C:\Users\*\AppData\Roaming\ICQ' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue Get-ChildItem 'C:\Users\*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ICQ' | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue Get-ChildItem -Path "C:\Users\*\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\ICQ.lnk" | Foreach-Object {Remove-Item $_ -Force} Get-ChildItem -Path "C:\Users\*\AppData\Roaming\Microsoft\Windows\Start Menu\ICQ.lnk" | Foreach-Object {Remove-Item $_ -Force} Get-ChildItem -Path "C:\Users\*\Desktop\ICQ.lnk" | Foreach-Object {Remove-Item $_ -Force} Get-ChildItem -Path "C:\Users\*\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\ICQ.lnk" | Foreach-Object {Remove-Item $_ -Force} |
So I ran the following (before stopping “all” the processes):
1 2 |
Get-Process "*Chrome*" | select StartTime Get-Process "*Chrome*" | Stop-Process |