Posts

Showing posts from April, 2018

Running CLI Commands in ESXi using plink software

Image
Get-esxcli will help us to run the CLI commands over the host directly but to extend it we cannot run certain commands directly over the host, In such case, we can use the below script to run directly on the host and achieve our goals. One shot with the script to achieve multiple targets My target was given to check the status of smartd services in each host and disable it, So I have put the commands on the variable $cmd and $cmd2 and executing it in all the machines,  which has been feed in the variable $machines , command get executed in all the hosts fed in the variable $machines . Script :  $user = '' $pswd = '' $cmd = 'etc/init.d/smartd status' $cmd2 = 'chkconfig smartd off' $machines = Get-Content "" foreach ( $MACHINE in $machines ) { Get-VMHost -Name $MACHINE | % {     $ssh = Get-VMHostService -VMHost $_ | where { $_ . Key -eq 'TSM-SSH' }     if ( ! $ssh . Running)

How to reset the IE settings Through command Line (CMD)

Image
I was just wondering that how to reset the IE personal settings through command line as I am much more interested over the cli functions, just got this command to reset the settings of the IE to the default one. rundll32 inetcpl.cpl ResetIEtoDefaults Run the above code by pressing the (windows key + R), Just type the above command and you will get the below prompt. just select the checkbox and click reset button all is done.