Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Remove signures from users when you dont have centralized server
- $MSLocation = $env:USERPROFILE.ToString() + "\AppData\Roaming\Microsoft\"
- $SignaturesLocation = $MSLocation + "Signatures"
- Try {
- "User profile location - " + $SignaturesLocation
- cd $SignaturesLocation
- Get-ChildItem *.txt | Rename-Item -NewName { $_.name -Replace '\.txt$','.txt.bkp' }
- Get-ChildItem *.htm | Rename-Item -NewName { $_.name -Replace '\.htm$','.htm.bkp' }
- Get-ChildItem *.rtf | Rename-Item -NewName { $_.name -Replace '\.rtf$','.rtf.bkp' }
- }
- Catch [System.Exception] {
- Write-Host -ForegroundColor Red "Signature removal failed"
- Write-Host -ForegroundColor Green "This script only supports Windows Vista,Windows 7, Windows 8, Windows 8.1, or Windows 10"
- Write-Host -ForegroundColor Red "Your version of Windows is" ([System.Environment]::OSVersion.Version).ToString()
- Write-Host -ForegroundColor Red "Description of errror : "
- $error[0].ToString() + $error[0].InvocationInfo.PositionMessage
- }
Add Comment
Please, Sign In to add comment