Modifying guest network interface with the Invoke-VMScript cmdlet

With the news that the ‘Set-VMGuestNetworkInterface’ cmdlet is to be deprecated in the next release of PowerCLI (http://blogs.vmware.com/PowerCLI/2014/11/announcement-future-cmdlet-deprecation.html), the question is how do I now modify the guest network interface? The ability to perform this action can now be moved to the Invoke-VMScript cmdlet, which is a pretty cool way to invoke a script in … More Modifying guest network interface with the Invoke-VMScript cmdlet

PowerCLI: Adding multiple disks to a virtual machine using the New-HardDisk cmdlet

I was recently adding a number of  hard disks to a virtual machine on an number of SCSI controller devices, so rather than using the vSphere Web Client I looked at using the New-HardDisk cmdlet in order to repeat this task of adding a new virtual machine hard disk . I wanted to create the virtual … More PowerCLI: Adding multiple disks to a virtual machine using the New-HardDisk cmdlet

Encoding image files into a base64 string using Powershell

I was recently looking at encoding image files into a Base64 string to place directly into HTML and CSS, whilst there is a number of useful online tools to complete this task, I decided to have a look at performing this task using Windows Powershell. This can be achieved by using the [convert]::ToBase64String method and is … More Encoding image files into a base64 string using Powershell

Powershell: Securing credentials using the PSCredential class

This a pretty old one but a script block at times I revert back to in particular when there is a requirement to specify user credentials in order to complete a task. When requiring to store credentials in a script block, these should not be entered in plain text from a security perspective and can … More Powershell: Securing credentials using the PSCredential class

PowerCLI: Starting and Stopping the SSH service on multiple ESXi hosts

I was recently looking at enabling the SSH service on multiple ESXi hosts in a cluster to invoke a change using remote access, in order to do so I was able to start and stop the SSH service on each ESXi host using PowerCLI. Firstly, I established a connection to the vCenter Server and created … More PowerCLI: Starting and Stopping the SSH service on multiple ESXi hosts