Last active
September 12, 2022 06:14
-
-
Save tinuwalther/83e63e418a76b0a4557a194925647a8b to your computer and use it in GitHub Desktop.
MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Citrix Workspace AutoStart | |
if((id -u) -eq 0){ | |
@( | |
'/Library/LaunchAgents' | |
'/Library/LaunchDaemons' | |
) | ForEach-Object { | |
$citrixitem = Get-ChildItem $_ | Where-Object Name -match citrix | |
Write-Host ($citrixitem | Select-Object Name, FullName | Out-String) | |
$citrixitem | ForEach-Object { | |
Rename-Item -Path $($_.FullName) -NewName $($_.FullName -replace '.plist', '.bak') -PassThru | |
} | |
} | |
}else{ | |
Write-Warning 'Running this command with elevated privileges' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment