powershell try catch connect-viserver
try {
Write-debug "Connecting to vCenter, please wait.."
#Connect to vCenter
Connect-ViServer -server $vcInfo.server -credential $creds -ErrorAction Stop | Out-Null
}
catch [Exception]{
$status = 1
$exception = $_.Exception
Write-debug "Could not connect to vCenter"
$msg = "Could not connect to vCenter"
LogSysTo-File $msg $status $env:username $exception.message
}
Also in C++:
- error installed react native using npx react native init
- certbot remove certificate for domain
- how to exit bash in container
- bash params
- change mode in linux
- linux alias bashrc
- github.com developer
- github add image to readme
- kubectl delete pods wildcard
- linux startup script
- laravel installer
- install react dependencies
- install angular fire
- git branch specific files
- git flow finish feature
- git diff current repo and other branch
- certbot remove domain
- certbot list all domains
- grep all lines after first match
- linux history command
- how to get out of git bash editor
- what does le mean in linux
- github see the username
- sed line