30 lines
674 B
PowerShell
30 lines
674 B
PowerShell
|
|
<#
|
||
|
|
Author: Gabe Kerntke
|
||
|
|
Date: 05-02-2024
|
||
|
|
|
||
|
|
.Synopsis
|
||
|
|
Script deletes each users Zoom meeting appdata folder
|
||
|
|
|
||
|
|
.Modified
|
||
|
|
2024-05-02 (GabeK) - Original script created
|
||
|
|
|
||
|
|
#>
|
||
|
|
|
||
|
|
#Region Functions
|
||
|
|
|
||
|
|
Function DeleteFolder {
|
||
|
|
$users = Get-ChildItem C:\Users
|
||
|
|
foreach ($user in $users) {
|
||
|
|
$path = "C:\Users\$($user.Name)\AppData\Roaming\Zoom"
|
||
|
|
If (Test-Path $path) {
|
||
|
|
Remove-Item $path -Force -Recurse
|
||
|
|
Write-Output "$user Zoom Meeting's Appdata folder has been deleted"
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
Write-Output "The path $path does not exist for $user."
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
#Region Script Start
|
||
|
|
DeleteFolder
|