mamoth100's Posts

I was in the middle of moving the correct answer and got caught up with a walk up at work. You caught me in the middle of it. Apologies. Thank you for the additional code.
Well, I gave the code a shot It seems as though when the PS Object is passed to the job it only pulls from the last logged into server even though multiple vCenters are connected and the $glob... See more...
Well, I gave the code a shot It seems as though when the PS Object is passed to the job it only pulls from the last logged into server even though multiple vCenters are connected and the $global:DefaultVIServers shows all of them. Once passed to the job, the job only pulls data from the last vCenter connected to. Weird.
Perfect. Thank you LucD. That will make me feel better that things will line up with vCenter names and SessionIDs.
I think I solved it by parsing the array that is passed to the job $code = {      param (           [array]$arrServer,           [array]$arrSessionId      )      Set-PowerCLIConfigur... See more...
I think I solved it by parsing the array that is passed to the job $code = {      param (           [array]$arrServer,           [array]$arrSessionId      )      Set-PowerCLIConfiguration -DisplayDeprecationWarnings $false -Confirm:$false | Out-Null      $intCount = 0      foreach ($strServer in $arrServer)      {           Connect-VIServer -Server $strServer -Session $arrSessionId[$intCount] | Out-Null           $intCount++      }      (Get-VM).Count } $sJOb = @{      ScriptBlock  = $code      ArgumentList = $global:DefaultVIServers.Name, $global:DefaultVIServers.SessionId } Start-Job @sJOb Seems messy and not reliable since the SessionID may or may not be in the right order. Although, the way it is, it does work for either single entries or multiple entries. I'm just not 100% that the SessionID will always be in the same order as the vCenter servers list so they match up.
Is there a simple way to pass mutliple vCenters to a job? Using: $global:DefaultVIServers.Name and $global:DefaultVIServers.SessionId Seems like no matter how I pass those to the Job, it ju... See more...
Is there a simple way to pass mutliple vCenters to a job? Using: $global:DefaultVIServers.Name and $global:DefaultVIServers.SessionId Seems like no matter how I pass those to the Job, it just doesn't reconnect like it does if it's a single vCenter (I even tried to force them to a string and connect)
Thank you LucD as always! I saw the session option, but how to pass it wasn't clear on the documentation page. Thank you.
When you use Start-Job, the connection information for vCenter is not passed. Is there a way to pass connection information for vCenter to a job? Or is there a best practice to do so? Or should t... See more...
When you use Start-Job, the connection information for vCenter is not passed. Is there a way to pass connection information for vCenter to a job? Or is there a best practice to do so? Or should the job always re-login each time it's called? Just looking for information on the best way to handle jobs and the vCenter connection. Thanks
I hope these are easy questions even though I can't seem to find something that would answer them. Have a two node VSAN cluster and looking to deploy the witness VM. Can this VM be over a WAN... See more...
I hope these are easy questions even though I can't seem to find something that would answer them. Have a two node VSAN cluster and looking to deploy the witness VM. Can this VM be over a WAN link? Is this a supported topology for VSAN? If we are allowed to do #1 above. Can we place two witness servers (the first one in one datacenter and the second is another datacenter) to connect to a single VSAN (making it a 4 node VSAN). This way, if a link goes down, we still have voting and the cluster can still reach a quorum. Thank you!
Since I cannot find this is any documents, I’m hoping someone here knows I have an environment with two sites linked by a WAN. vCenter is hooked by Enhanced Linked Mode and we have products... See more...
Since I cannot find this is any documents, I’m hoping someone here knows I have an environment with two sites linked by a WAN. vCenter is hooked by Enhanced Linked Mode and we have products that Life Cycle Manager can help upgrade in both sites. I’m wonder what the best deployment method is. Do I deploy one Life Cycle Management appliance to handle both sites or is there a reason I’d want to deploy one appliance per site? Thank you!
Thank you so much! I will give it a go as well and report back!
This issue being, that isn't what I'm trying to do. The VM in vCenter is deleted. So, it's no longer there. When you delete a VM from vCenter, SRM sees the delete and says "Invalid. The VM has be... See more...
This issue being, that isn't what I'm trying to do. The VM in vCenter is deleted. So, it's no longer there. When you delete a VM from vCenter, SRM sees the delete and says "Invalid. The VM has been removed". So, I was looking for a way to remove that from SRM via PowerCLI. The unprotect option seems to require me to do a Get-VM. But the VM is gone. If I go into SRM, select the deleted VM, I can do a Remove Protection and that gets rid of that entry. No stopping the vCenter service. I was wondering how to do the same thing with PowerCLI.
It wouldn't be the vCenter database. It would be the SRM database. I just don't see that KB being valid since the cleanup needs to happen SRM side.
Thank you LucD! Unfortunatly the VM object is removed from vCenter (completely deleted). So there isn’t a way to interact with the VM object like the script on that KB article states. Was ... See more...
Thank you LucD! Unfortunatly the VM object is removed from vCenter (completely deleted). So there isn’t a way to interact with the VM object like the script on that KB article states. Was hoping there was a way to remove the invalid object in SRM like you would do by selecting the object in SRM and clicking Remove Protection. Thing is, with PowerCLI, to remove protection or add protection it seems to require you to get the VM object from vCenter and then pipe it to the add or remove protection cmdlets/API. But since the VM is gone from vCenter, I don’t see a way to force a removal from SRM except to use the web interface to clear it.
Looking for a way to remove protection from a deleted VM. When a VM is deleted out of vCenter, it goes into an invalid state In SRM. I’m wondering if there is a way through PowerCLI to clean ... See more...
Looking for a way to remove protection from a deleted VM. When a VM is deleted out of vCenter, it goes into an invalid state In SRM. I’m wondering if there is a way through PowerCLI to clean it up. I have a script to add protection using Meadowcroft’s module. I just don’t see a way with his cmdlets or the native SRM API to remove a VM from SRM if the actual VM is removed. Thanks!
I saw his script. But it just seemed overkill for what I wanted to do. I was hoping for an easier route than all that code. But if that’s what I have to do, I’ll do that. I will I’ll give the... See more...
I saw his script. But it just seemed overkill for what I wanted to do. I was hoping for an easier route than all that code. But if that’s what I have to do, I’ll do that. I will I’ll give the Move-VM a shot. That seems much easier. Thank you!
Thanks for the response LucD! Yep. All connections are through FQDN of the vCenter machines. I have 2 vCenters hooked via Enhanced Linked Mode (each having their own external PSC). All compone... See more...
Thanks for the response LucD! Yep. All connections are through FQDN of the vCenter machines. I have 2 vCenters hooked via Enhanced Linked Mode (each having their own external PSC). All components are 6.5U2. Thanks!
Not finding a lot of information on this so I thought I'd ask here. Is there a trick to getting cross vCenter clones to happen? When I do a New-VM or New-Template and call a VM or template on ... See more...
Not finding a lot of information on this so I thought I'd ask here. Is there a trick to getting cross vCenter clones to happen? When I do a New-VM or New-Template and call a VM or template on one vCenter and put the destination datastore of the other vCenter it tosses an error: New-Template : 9/17/2018 9:57:04 AM     New-Template            Arguments must be from the same server. The vCenters in question are in Enhanced Linked Mode on the same SSO domain and such. Wondering if there is a way to make this happen. Thanks!
It does appear I can force days into the CSR with openssl. openssl x509 -req -days 1094 -in /certs/psc_ha_vip.csr -out /certs/psc_ha_vip.crt -CA /var/lib/vmware/vmca/root.cer -CAkey /var/lib/v... See more...
It does appear I can force days into the CSR with openssl. openssl x509 -req -days 1094 -in /certs/psc_ha_vip.csr -out /certs/psc_ha_vip.crt -CA /var/lib/vmware/vmca/root.cer -CAkey /var/lib/vmware/vmca/privatekey.pem -extensions v3_req -CAcreateserial -extfile /certs/psc_ha_csr_cfg.cfg So I was able to get the PSC Machine Cert to less than 3 years. But vCenter will be the next hurdle as that will probably end up with a 5 year cert. I really wish there was a way to just tell VMCA to only issue 3 year certs.
Thanks Adam Eckerle and daphnissov ! I did see this for the hosts within vCenter after posting the thread. However, there doesn't seem to be a way to control this for the PSC Machine Cert nor ... See more...
Thanks Adam Eckerle and daphnissov ! I did see this for the hosts within vCenter after posting the thread. However, there doesn't seem to be a way to control this for the PSC Machine Cert nor the cert vCenter gets from the VMCA. Once we get down to vCenter... there do seem to be controls for the hosts. I'm wondering if it's possible to actually do it more so on the PSC Machine certificate and the vCenter cert that it gets from the PSC. I tried today. I got the internal CA cert chain done (which has a validity period of 5 years.. as we do not expect this solution to be around in 5 years) and loaded it into the VMCA. It was successful. During that load, it goes through and issues a Machine cert to that same PSC. The cert was issues for the same validity period as the VMCA cert. And due to regulations, we need the cert validity period to be 3 years or less on all devices. What I didn't want to have happen was the VMCA certs expire at the same time the PSC Machine certs and vCenter certs. Below is the cert... I know I had to black out the Issued By... but I can validate that it was indeed the VMCA. You can see it chucked it out to the PSC's Machine Cert as 5 years.
For certificates that are issued from the VMCA (talking 6.0/6.5), is there a way to specify the maximum validity period of the certificate that the VMCA hands out? Just wondering if this can be a... See more...
For certificates that are issued from the VMCA (talking 6.0/6.5), is there a way to specify the maximum validity period of the certificate that the VMCA hands out? Just wondering if this can be adjusted lower. Thank you!