Enable SSH across all vmHosts

I had the need to enable SSH on all my hosts to make configuration changes.  Instead of manually going to each host and enabling the service I searched for a powercli command.  I was able to find the following little snipit – and it did exactly what I wanted

Get-VMHost | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} | Start-VMHostService

This rolled through each host in the cluster and turned on the service.

When I was done I changed start to stop and turned off SSH across all the hosts.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s