Skip to content

Instantly share code, notes, and snippets.

@tinuwalther
Last active September 12, 2022 06:14
Show Gist options
  • Save tinuwalther/83e63e418a76b0a4557a194925647a8b to your computer and use it in GitHub Desktop.
Save tinuwalther/83e63e418a76b0a4557a194925647a8b to your computer and use it in GitHub Desktop.
MacOS
# 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