This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$guestOpsMgr = (Get-View $global:DefaultVIServer.ExtensionData.Content.guestOperationsManager) | |
$authMgr = (Get-View $guestOpsMgr.AuthManager) | |
$vm = (Get-VM -Name MacOSX-10.11).ExtensionData.MoRef | |
$credential = New-Object VMware.Vim.NamePasswordAuthentication | |
$credential.InteractiveSession = $false | |
$credential.Username = "lamw" | |
$credential.Password = "vmware123" | |
$authMgr.ValidateCredentialsInGuest($vm,$credential) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$esxi_name = "192.168.30.10" | |
$portgroup_name = "vMotion" | |
$hostsystem = (Get-VMHost -Name $esxi_name).ExtensionData | |
$networkSystem = Get-View $hostsystem.ConfigManager.NetworkSystem | |
$nic = New-Object VMware.Vim.HostVirtualNicSpec | |
$ip = New-Object VMware.Vim.HostIpConfig | |
$ip.Dhcp = $false | |
$ip.IpAddress = "192.168.1.10" | |
$ip.SubnetMask = "255.255.255.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AppData\Roaming\Sublime Text 3\Packages\User\default_syntax.py | |
import sublime, sublime_plugin | |
class DefaultSyntaxCommand(sublime_plugin.EventListener): | |
def on_new(self, view): | |
# Replace <Language> with desired default language | |
# Check in AppData\Local\Sublime Text 3\Cache | |
view.set_syntax_file('Packages/<Language>/<Language>.tmLanguage') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Datastore -Name datastore1* | %{ $n = 'z-' + (Get-VMHost -Id $_.ExtensionData.Host[0].Key[0]).Name.Split('.')[0] + '_boot';Set-Datastore -Datastore $_ -Name $n } |