Skip to content

Instantly share code, notes, and snippets.

@vireulgr
vireulgr / Microsoft.PowerShell_profile.ps1
Created December 28, 2018 09:29
My Powershell profile
# my powershell profile
# This profile requres PowerCLI module to be installed
# vmrun -T ws -gu ssadm -gp P@ssw0rd runScriptInGuest $vmss "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "C:\Users\ssadm\Desktop\scripts\updCommon.ps1"
# host time setup
function SetupHostTime {
param( [string]$hostName, [string]$hostDomain, [string]$username, [string]$userpwd )
Connect-ViServer "$hostName.$hostDomain" -User $username -Password $userpwd
$esxcli = Get-EsxCli