Thanks LucD. Try and catch works well in this case. I still have another problem with error redirection and will continue to discuss here. Please be patient as I am new to redirection. Assuming...
See more...
Thanks LucD. Try and catch works well in this case. I still have another problem with error redirection and will continue to discuss here. Please be patient as I am new to redirection. Assuming $InvalidCluster is invalid. Get-Cluster $InvalidCluster 2>&1 | Tee-Object -FilePath .\error.log -Append #This works fine and write error to screen and file However, This doesnt work and I am confused. Get-Cluster $InvalidCluster | Remove-Cluster -confirm:$false 2>&1 | Tee-Object -FilePath .\error.log -Append #Write only to screen , not to file Do I need Try-Catch? Its confusing why the latter is not working.
I am unable to capture error to logfile of get-view unmount luns command. Usual way to redirecting using 2>&1 | tee -append $logfile or out-file wont work. Here is an example: $StorageSys = Get-Vi...
See more...
I am unable to capture error to logfile of get-view unmount luns command. Usual way to redirecting using 2>&1 | tee -append $logfile or out-file wont work. Here is an example: $StorageSys = Get-View $VMHost.Extensiondata.ConfigManager.StorageSystem $storagesys.UnmountVmfsVolume($invaliduuid) 2>&1 | Tee-Object -Append $logFile $storagesys.UnmountVmfsVolume($invaliduuid) | outfile -append $logfile #### Prefer Tee method as i need screen output too any workaround? Thanks, Max
I am looking for way to get associated deploy-rule based on cluster. I have no luck finding that on Get-cluster with all related info and extensiondata. The closet one i got is from (get-deployrule...
See more...
I am looking for way to get associated deploy-rule based on cluster. I have no luck finding that on Get-cluster with all related info and extensiondata. The closet one i got is from (get-deployrule).itemlist.name but the position of name depends on list of items configured in deployrule. any other way to do it?
Hi, Set-VMHost -VMHost $vmhost -State "Maintenance" Above command doesnt move powered off vms , although its default behaviour in vSphere UI while placing Maintenance Mode (ticked checked box usin...
See more...
Hi, Set-VMHost -VMHost $vmhost -State "Maintenance" Above command doesnt move powered off vms , although its default behaviour in vSphere UI while placing Maintenance Mode (ticked checked box using UI). Is there any parameter that we can set in set-vmhost command to achieve this? regards, Max
Hi All, I have a requirement to export out Host Profile "Individual Host" Customization in regular interval. Lets say monthly or quarterly. I have looked at PowerCLI option and dont see any c...
See more...
Hi All, I have a requirement to export out Host Profile "Individual Host" Customization in regular interval. Lets say monthly or quarterly. I have looked at PowerCLI option and dont see any cmd that can export out. There is no schedule task option in GUI too. Is there any other way to achieve this? Thank you.
Hi there, Currently we have assigned user groups from vCenter layer (top most) and propagated down to child objects. I wanna control a particular group ( lets say, Group-A) to deny access to a...
See more...
Hi there, Currently we have assigned user groups from vCenter layer (top most) and propagated down to child objects. I wanna control a particular group ( lets say, Group-A) to deny access to a cluster. What if I assign Group-A to have "No Access" role and apply it on the cluster level that i wanna control, Will "No Access" take affect or previously applied role from vCenter layer? What is the best way to achieve this? The requirement is to deny access to a cluster and the rest stays the same. Thanks, Max
Hi All, How can I query the host profile and associated hosts with it? The closest thing I get is this. (Get-VMhostProfile hostprofilename).extensiondata.entity Type ...
See more...
Hi All, How can I query the host profile and associated hosts with it? The closest thing I get is this. (Get-VMhostProfile hostprofilename).extensiondata.entity Type Value ----- ------ HostSystem host-3026 HostSystem host-3028 But, I am not getting the hostname and get only host value.
Thanks LucD. You are right. Setting -HAAdmissionControlEnabled switch to True set back to default and uncheck the setting. Get-Cluster test01 | Set-Cluster -HAAdmissionControlEnabled:$True -C...
See more...
Thanks LucD. You are right. Setting -HAAdmissionControlEnabled switch to True set back to default and uncheck the setting. Get-Cluster test01 | Set-Cluster -HAAdmissionControlEnabled:$True -Confirm:$false
Hi All, with update of HA behaviour in 6.5, I have to update Admission Control setting in my environment. I need to uncheck "Override failover capacity...". I am looking for PowerCLI command ...
See more...
Hi All, with update of HA behaviour in 6.5, I have to update Admission Control setting in my environment. I need to uncheck "Override failover capacity...". I am looking for PowerCLI command to do it as I have a number of clusters to be updated. The only closet place I can find is under (Get-Cluster test01).ExtensionData.Configuration.dasconfig.admissioncontrolpolicy Is there anyway to do this via PowerCLI? Thanks!
Hi All, I understand there are 3 options to select when putting host into MM using Webclient . Like many others, I still use C# client for daily tasks. What option does it choose when putting...
See more...
Hi All, I understand there are 3 options to select when putting host into MM using Webclient . Like many others, I still use C# client for daily tasks. What option does it choose when putting host into MM using C# client? Is it default option "Ensure accessibility"? Many Thanks! Max
Thanks LucD. This works like a charm! Here is the good blog to learn more on -PipelineVariable . PowerShell V4 – PipelineVariable Common Parameter | Keith Hill's Blog
Dear All, I am still new to PowerCLI. My goal is to find death luns path in all the hosts. I can use this command Get-VMHost | Get-ScsiLun | Get-scsilunpath | Where {$_.state -eq “Dead”}. ...
See more...
Dear All, I am still new to PowerCLI. My goal is to find death luns path in all the hosts. I can use this command Get-VMHost | Get-ScsiLun | Get-scsilunpath | Where {$_.state -eq “Dead”}. This will give me nice the output like this. But No VMhost name. Name SanID State Preferred ------- ------- ------ ---------- vmhba.xxx xx.xx.xx Dead True How can I have another column that includes hostname? Thank you! Max
I had the same issue.. I have 3 nodes and 2 nodes were not contributing. I followed the "Eddie's blog". My case was due to the issues with certificate. I renewed the certificate of 2 hosts (reb...
See more...
I had the same issue.. I have 3 nodes and 2 nodes were not contributing. I followed the "Eddie's blog". My case was due to the issues with certificate. I renewed the certificate of 2 hosts (rebooted - may not be necessary) and all back to normal.
Hi All, I am new to vSAN. In default vSAN storage policy, there is no raid configuration information. My requirement is to have Raid-1 as default. Unfortunately, I cant find any documentation...
See more...
Hi All, I am new to vSAN. In default vSAN storage policy, there is no raid configuration information. My requirement is to have Raid-1 as default. Unfortunately, I cant find any documentation on this. Hope some experts can advise on this. Thanks, Max