well my undestaing from previousthreads is if erroraction is stop then only it will throw the exception in catch block . considering again the below piece of code i expect esxi name and corres...
See more...
well my undestaing from previousthreads is if erroraction is stop then only it will throw the exception in catch block . considering again the below piece of code i expect esxi name and corresponding error try { connect-viserver -server $v -Credential $cred|Out-Null -ErrorAction stop } catch { $V }
actually i want to see exact error meesage in catch block as some hosts not connecting as they are in non responding state . throwing exception in catch block.
Hi Luc, i am checking to how many hosts a given root password is working and connecting . though it is working by comparing $allesxi and $co(conncted esxi). can yu modify it so that it specidi...
See more...
Hi Luc, i am checking to how many hosts a given root password is working and connecting . though it is working by comparing $allesxi and $co(conncted esxi). can yu modify it so that it specidically print name in catch block . $esxi=Get-Content C:\users\jvmishra\desktop\firstnameinfqdn.txt | Sort-Object -Unique $esxi.Count $cred=Get-Credential $domain=".test.com" $allesxi = @() foreach($e in $esxi) { $v=$e+$domain $allesxi += $v try { connect-viserver -server $v -Credential $cred|Out-Null -ErrorAction stop } catch { } } $co=$global:DefaultVIServers write-host "folowing hosts are not connected with given root password " -ForegroundColor Gray
i will let you know .however for example when i was using coonect-viserver to connet esxi the password prompt took long time to appear .its one of the things i observed like wise getting output...
See more...
i will let you know .however for example when i was using coonect-viserver to connet esxi the password prompt took long time to appear .its one of the things i observed like wise getting output from get commands also took longer time.
also i have recently updated powercli to 12.0.0.0 and my expectation was it will be faster but i am experincing it has become slower and not sure how i am modules of other versions being dispalye...
See more...
also i have recently updated powercli to 12.0.0.0 and my expectation was it will be faster but i am experincing it has become slower and not sure how i am modules of other versions being dispalyed in following thouh 6.s msi was uninstalled completely. I HATE SLOW ....:smileycry:
hi Luc, below is the screenshot wherein remotesyslog server is configured as per below ip . is it possible to check for how many days it will retain the logs . as per my understanding this s...
See more...
hi Luc, below is the screenshot wherein remotesyslog server is configured as per below ip . is it possible to check for how many days it will retain the logs . as per my understanding this setting is something configured internal to remote host and can not be found from esxi side .is that correct???
thanks luc . i remember it was indeed very slow as i can recall one the scripts . however in order to get proper output of following Datastore = $ds.Name Path = $result.Fold...
See more...
thanks luc . i remember it was indeed very slow as i can recall one the scripts . however in order to get proper output of following Datastore = $ds.Name Path = $result.FolderPath File = $_.Path Size = $_.FileSize do we need to use pscustom object instead od new-object??
Hi Luc , if you can check the following i am looking to check each datasore for .iso file .i dont think there is direct way of doing this .can you please check the folowing script if this works...
See more...
Hi Luc , if you can check the following i am looking to check each datasore for .iso file .i dont think there is direct way of doing this .can you please check the folowing script if this works fine ?? $datastoresFR=get-datastore $count=$datastoresFR.count foreach($d in $datastoresFR) { $ds=get-datastore -name $d for ($i=0; $i -le $count ; $i++) { New-PSDrive -Location $ds -Name DS[$i] -PSProvider VimDatastore -Root '\' | Out-Null Set-Location DS[$i]:\ $isofile=Get-ChildItem *.iso if($isofile.count -ge "1") { write-host "there are/is .iso files stored in " $ds.name $isofile Remove-PSDrive -Name DS[$i] -Confirm:$false } } }