|
Size: 1434
Comment:
|
Size: 1984
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| <<TableOfContents()>> | |
| Line 31: | Line 32: |
| === Deploy VMs from template PowerCLI Script === * https://communities.vmware.com/thread/582052 {{{ Name IP SUBNET GATEWAY DNS1 DNS2 vmhost template cluster csm datastore testVM1 192.168.1.2 255.255.240.0 192.168.1.1 192.168.1.7 192.168.1.8 testVMHost.domain.local testVMTemplate test VM Cluster testCustomizationSpec test Datastore testVM2 192.168.1.3 255.255.240.0 192.169.1.1 192.168.1.7 192.168.1.8 testVMHost.domain.local testVMTemplate }}} |
|
| Line 33: | Line 42: |
| http://vknowledge.net/2014/04/17/how-to-fake-a-vms-guest-os-cpuid/ |
Contents
Install
Windows 2008R2
NetFramework4.5.2 or later
- Windows Management Framework 5.1
Install-Module VMware.PowerCLI -Scope CurrentUser
Configration
Set-ExecutionPolicy RemoteSigned Set-PowerCLIConfiguration -ProxyPolicy NoProxy Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
Use
Connect-VIServer -server 192.168.25.60 -Protocol https -Username 'administrator@vsphere.local'
Script to list VM Network Adapter Type, exporting issue
Get-VM | Get-NetworkAdapter |
Where-object {$_.Type -ne "Vmxnet3"} |
Select @{N="VM";E={$_.Parent.Name}},Name,Type |
export-Csv c:\Network_Interface.csv -NoTypeInformation
Deploy VMs from template PowerCLI Script
Name IP SUBNET GATEWAY DNS1 DNS2 vmhost template cluster csm datastore testVM1 192.168.1.2 255.255.240.0 192.168.1.1 192.168.1.7 192.168.1.8 testVMHost.domain.local testVMTemplate test VM Cluster testCustomizationSpec test Datastore testVM2 192.168.1.3 255.255.240.0 192.169.1.1 192.168.1.7 192.168.1.8 testVMHost.domain.local testVMTemplate
Get/Change CPUID
Winodws script
http://vknowledge.net/2014/04/17/how-to-fake-a-vms-guest-os-cpuid/
- Enable excution
PS C:\Users\Administrator> Get-ExecutionPolicy Restricted PS C:\Users\Administrator> set-executionpolicy remotesigned 执行策略更改 执行策略可以防止您执行不信任的脚本。更改执行策略可能会使您面临 about_Execution_Policies 帮助主题中所述的安全风险。是否要更改执行策略? [Y] 是(Y) [N] 否(N) [S] 挂起(S) [?] 帮助 (默认值为“Y”):
- Get cpuid
PS C:\Users\Administrator> Get-WmiObject Win32_Processor | select ProcessorId ProcessorId ----------- 0FABFBFF000106A5 0FABFBFF000006A5
- convert HEX to ascii
