PS C:\> $myobj = ‘2222’ PS C:\> $myobj.pstypenames System.String System.Object PS C:\> $myobj.pstypenames.add(‘Greg’) PS C:\> $myobj.pstypenames System.String System.Object PS C:\> [psobject]$myobj2=’2222′…
Latest Posts
-
-
For a user with read-only Get-VMHostHardware fails with Permission to perform this operation was denied Add the Host-Cim-CimInteraction privilege.
-
i came up with this today
PowerShell1234567891011121314151617181920<span class="pln">add</span><span class="pun">-</span><span class="pln">type </span><span class="pun">@</span><span class="str">"using System.Net;using System.Security.Cryptography.X509Certificates;public class TrustAllCertsPolicy : ICertificatePolicy {public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate,WebRequest request, int certificateProblem) {return true;}}"</span><span class="pun">@</span><span class="pun">[</span><span class="typ">System</span><span class="pun">.</span><span class="typ">Net</span><span class="pun">.</span><span class="typ">ServicePointManager</span><span class="pun">]::</span><span class="typ">CertificatePolicy</span> <span class="pun">=</span> <span class="typ">New</span><span class="pun">-</span><span class="typ">Object</span> <span class="typ">TrustAllCertsPolicy</span>you can look up the thumbprint to compare which one it isget-childitem Cert:\CurrentUser\My$superadmin = get-childitem Cert:\CurrentUser\My\YOUR_SUPERADMIN_CERT_HASHinvoke-webrequest -Uri "https://infralab.local:32768/ejbca/publicweb/webdist/certdist?cmd=lastcert&installtobrowser=&subject=CN%3dgregu.host.com&format=chain&hidemenu=false" -method "Get" -Certificate $superadminwhat's left is to generate the cert order via csr. this just just downloading the already made cert. -
Add basic authentication for the REST API built using PowerShell Polaris module. https://github.com/PowerShell/Polaris https://github.com/Stephanevg/PSHTML https://github.com/stijnc/polaris-pshtml-docker
-
apply https://kb.vmware.com/s/article/2136693Â after replacing certificates in case vami is not presenting new certificate.
-
https://<vcenter-FQDN>/lookupservice/mob Using this link: https://<center-FQDN>/lookupservice/mob/?moid=ServiceRegistration&method=List You can access the list() method, you have to fill out the filterCriteria Leave it ‘blank’:…
-
Really good stuff ! https://blogs.vmware.com/performance/2019/06/writing-performant-tagging-code-tips-and-tricks-for-powercli.html
-
Really short: check you naa in vsphere/vsan you are looking for, then using perccli installed in your esxi use: ./perccli /c0…
-
Virtual Center
Virtual Center 6.7U1b upgrade fails with: Update installation failed, vCenter is non-operational
In order to reproduce, get a VC/PSC 6.7 . Make the /storage/log full 100% . Installation fails with unexpected problem. Step…
-
Ok, i have no idea how EXACTLY that works, nobody could explain this to me, including my vmware TAM. But this…
-
https://blogs.vmware.com/PowerCLI/2017/01/spotlight-move-vm-cmdlet.html Did you know of an additional cool vMotion capability in vSphere 6.0? Automating Cross vCenter vMotion (xVC-vMotion) between the same…
-
I know this has nothing to do with VMware, or powershell … i wrote this to check some price on path…