We all have our BigFix shortcuts and cheat sheets for things but what are some of the most common things you’ve got saved in that notepad to just copy and paste and save yourself time typing?
For me, the one I love and use the most is:
tail -f /var/opt/BESClient/__BESData/__Global/Logs/$(date +%Y%m%d).log
The time this has probably saved me is absolutely mental
Others that I have saved are:
// Adding a wait
parameter “startTime”="{now}"
pause while { (now-time(parameter “startTime”) < 180*second) }
// Use the client properties
if {value of setting "x" of client as string = "x" or value of setting "x" of client as string = "y"}
// Short for client folder
"{(client folder of current site as string) & "/__Download/x.xxx"}"
// Pre-Fetch Block
begin prefetch block
add prefetch item name= sha1= size= url=http://x.com:52311/Uploads/ sha256=
collect prefetch items
end prefetch block
Then there’s this one that causes me headaches as there are too many ways to do it…
//execute ps1 regardless of version
if {exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native registry}
waithidden {pathname of file ((it as string) of value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native registry)} -executionpolicy remotesigned -File "{pathname of client folder of current site & "\__Download\x.ps1"}"
else if {not exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of native registry}
waithidden cmd.exe /c powershell.exe -executionpolicy remotesigned -File "{pathname of client folder of current site & "\__Download\x.ps1"}"
endif