Differences between revisions 4 and 5
Revision 4 as of 2019-05-29 02:48:28
Size: 1434
Editor: localhost
Comment:
Revision 5 as of 2019-05-29 04:06:03
Size: 1504
Editor: localhost
Comment:
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
http://vknowledge.net/2014/04/17/how-to-fake-a-vms-guest-os-cpuid/

Install

Windows 2008R2

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

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

désert/VMware/PowerCLI (last edited 2020-07-24 15:03:34 by localhost)