jvm2016's Posts

i am going to check this one more time tomorrow ..
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 }
thanks luc .if i dont write anything in catch block as per my initial post will it not write the corresponding error (whatever) in that block??
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:
i understand .let me check if we can get an account with correct permissions .
thanks .i do not have root password or anyother userid to use posh-ssh.
thought of asking how yu stopping running script iam using clt+C   or clt+Z  to stop it works somestimes but not always .is there any other way??
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 its working if i set any value other than 15 mins which is deafault using set-advanced settings do i need to reboot host after changing value?
Hi Luc, can we alter esxi root password lockout policy though powercli
thanks luc
thanks or replying i will attach screensgots if it happens again.
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??
i am checking this if yu coud suggest the one which i posted will work or not .??
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 } } }
Hi All , has anyone found issues with tool version 10.3 . especially after restore operations .
Thanks Luc for your support and patience .