Blog
Projects
About
Backtrack:
Blog
›
PowerCLI: Starting/stopping SS…
Comments
PowerCLI: Starting/stopping SSH service on ESX hosts
posted on December 20th 2018, at 11:17
by
lunarg
Starting or stopping the SSH service on multiple ESXi hosts can be a tedious job when having to do this via the vSphere (Web)Client. Fortunately, you can also use PowerCLI to start/stop services quickly. With a little scripting, you can expand this to start/stop services on a set of hosts, a cluster, or the entire vCenter.
First, start PowerCLI and make a connection to the vCenter. For automation, you can use something like this (note that you have to add code for credentials, if needed):
if (-not (Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue)) { Add-PSSnapin VMware.VimAutomation.Core | Out-Null }Connect-VIServer vcenter.domain.local
Once that's done, you can ga
...
read more
add a comment
Tags
computer
windows
software
vmware
microsoft
linux
exchange
hardware
network
news
mac
powershell
home
office365
msoffice
ad
server
sqlserver
dell
soaring
internet
esx
sbs
mssql
rds
events
terminalserver
powercli
hp
virtualization
Archive
«
‹
December 2024
›
»
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Links
-
@harkx
-
Cats & Dogs
-
Jargon-free Security Guide
Quote
«
When a bird does poo poo in your eye, be happy elephants don't fly.
»
Contact
© 2009-2024 Black Manticore – all rights reserved
code by
lunarg
, design by
SuriAmanah
, hosted at Cats&Dogs