PShyperv-R2.pdf
(
1334 KB
)
Pobierz
701169006 UNPDF
A PowerShell
Module for Hyper-V
uthor:JamesO’Neill
(
http://www.blogs.technet.com/jamesone
)
This Document, the PowerShell scripts with which it is supplied, and updates to them
can be obtained from
http://www.codeplex.com/psHyperV
Copyright Microsoft Corporation 2010
Distributed under the Microsoft Public license MS-PL found at
http://www.codeplex.com/PsHyperV/License
In particular, your attention is drawn to condition 3 E,
The software is licensed
"as-is." You bear the risk of using it.
The contributors give no express warranties, guarantees or conditions.
Getting Started ............................................................................................................................................................... 6
PowerShell Verbs and nouns .......................................................................................................................................... 7
Standard PowerShell verbs used ................................................................................................................................ 7
Non Standard PowerShell Verbs from version 1 of the library ................................................................................... 8
PowerShell Parameters .................................................................................................................................................. 8
Summary of functions provided ..................................................................................................................................... 9
Commands in the library, grouped by function ............................................................................................................ 10
Virtual Machine Operations...................................................................................................................................... 10
VM Memory.............................................................................................................................................................. 10
VM Processors .......................................................................................................................................................... 10
VM Serial Ports ......................................................................................................................................................... 10
VM Floppy disk, Hard disk and DVD drives and controllers ...................................................................................... 11
Virtual Hard Disk and Floppy disk images ................................................................................................................. 11
VM to Host integration ............................................................................................................................................. 11
VM Ethernet Cards ................................................................................................................................................... 12
Virtual Network Switches ......................................................................................................................................... 12
Hyper-V Servers. ....................................................................................................................................................... 12
Snapshots ................................................................................................................................................................. 12
Cluster Operations .................................................................................................................................................... 12
User Interface ........................................................................................................................................................... 13
Miscellaneous Admin functions ................................................................................................................................ 13
Detailed Explanation of the functions .......................................................................................................................... 14
Start-VM ................................................................................................................................................................... 14
Stop-VM.................................................................................................................................................................... 14
Save-VM.................................................................................................................................................................... 15
Set-VMState.............................................................................................................................................................. 15
Invoke-VMShutdown ................................................................................................................................................ 16
Ping-VM .................................................................................................................................................................... 16
Test-VmHeartbeat .................................................................................................................................................... 17
Get-Vm ..................................................................................................................................................................... 17
Select-VM ................................................................................................................................................................. 18
Get-VMSummary ...................................................................................................................................................... 18
Get-VMThumbnail .................................................................................................................................................... 19
Get-VMBuildScript .................................................................................................................................................... 19
New-VM.................................................................................................................................................................... 19
Remove-VM .............................................................................................................................................................. 20
Get-VMSettingData................................................................................................................................................... 20
Set-VM ...................................................................................................................................................................... 21
Set-VMRASD ............................................................................................................................................................. 21
New-VMRASD ........................................................................................................................................................... 22
Add-VMRASD ............................................................................................................................................................ 22
Remove-VMRASD ..................................................................................................................................................... 22
Import-VM ................................................................................................................................................................ 23
Export-Vm................................................................................................................................................................. 23
New-VmConnectSession........................................................................................................................................... 24
Get-VMMemory........................................................................................................................................................ 24
Set-VMMemory ........................................................................................................................................................ 25
Get-VMCPUCount ..................................................................................................................................................... 25
Set-VMCPUCount...................................................................................................................................................... 25
Get-VMProcessor...................................................................................................................................................... 26
Get-VMSerialPort...................................................................................................................................................... 26
Set-VMSerialPort ...................................................................................................................................................... 27
Get-VMFloppyDisk .................................................................................................................................................... 27
Add-VMFloppyDisk ................................................................................................................................................... 28
Remove-VMFloppyDisk............................................................................................................................................. 28
Add-VMSCSIController.............................................................................................................................................. 28
Remove-VMSCSIcontroller........................................................................................................................................ 29
Get-VMDiskController .............................................................................................................................................. 29
Get-VMDriveByController......................................................................................................................................... 30
Add-VMDrive ............................................................................................................................................................ 30
Remove-VMdrive ...................................................................................................................................................... 31
Get-VMDiskByDrive .................................................................................................................................................. 31
Add-VMDisk .............................................................................................................................................................. 31
Get-VMDisk............................................................................................................................................................... 31
Set-VMDisk ............................................................................................................................................................... 32
Select-VMPhysicalDisk .............................................................................................................................................. 32
Add-VMPassThrough ................................................................................................................................................ 33
Add-VMNewHardDisk............................................................................................................................................... 33
New-Vfd.................................................................................................................................................................... 33
New-VHD .................................................................................................................................................................. 34
Get-VHDDefaultPath................................................................................................................................................. 34
Get-VHD.................................................................................................................................................................... 35
Get-VHDInfo ............................................................................................................................................................. 35
Test-VHD................................................................................................................................................................... 35
Compress-VHD.......................................................................................................................................................... 36
Connect-VHDParent.................................................................................................................................................. 36
Convert-VHD............................................................................................................................................................. 37
Merge-VHD ............................................................................................................................................................... 38
Expand-VHD.............................................................................................................................................................. 38
Mount-VHD............................................................................................................................................................... 39
Dismount-VHD .......................................................................................................................................................... 40
Get-VHDMountPoint ................................................................................................................................................ 40
Get-VMIntegrationComponent................................................................................................................................. 40
Set-VMIntegrationComponent ................................................................................................................................. 41
Get-VMKVP ............................................................................................................................................................... 41
Add-VMKVP .............................................................................................................................................................. 42
Remove-VMKVP........................................................................................................................................................ 42
Get-VmNic ................................................................................................................................................................ 43
Get-VMNicPort ......................................................................................................................................................... 43
Get-VMNicSwitch...................................................................................................................................................... 43
Get-VMNicVLAN ....................................................................................................................................................... 44
Select-VmNic ............................................................................................................................................................ 44
Add-VmNic................................................................................................................................................................ 44
Set-VMNICSwitch...................................................................................................................................................... 45
Set-VMNICAddress ................................................................................................................................................... 46
Set-VMNicVLAN ........................................................................................................................................................ 46
Remove-VMNic ......................................................................................................................................................... 47
Get-VMByMACaddress ............................................................................................................................................. 47
Get-VMSwitch........................................................................................................................................................... 47
Select-VMSwitch....................................................................................................................................................... 48
New-VMSwitchPort .................................................................................................................................................. 48
Select-VMExternalEthernet ...................................................................................................................................... 48
New-VMPrivateSwitch .............................................................................................................................................. 49
New-VMInternalSwitch............................................................................................................................................. 49
New-VMExternalSwitch ............................................................................................................................................ 49
Remove-VMSwitchNIC.............................................................................................................................................. 50
Remove-VMSwitch ................................................................................................................................................... 50
Get-VMHost.............................................................................................................................................................. 51
Set-VMHost............................................................................................................................................................... 51
Get-VMSnapshot ...................................................................................................................................................... 52
Get-VMSnapshotTree ............................................................................................................................................... 52
Select-VMSnapshot................................................................................................................................................... 52
New-VMSnapshot ..................................................................................................................................................... 53
Rename-VMsnapshot ............................................................................................................................................... 53
Update-VMSnapshot ................................................................................................................................................ 54
Restore-VMSnapshot................................................................................................................................................ 54
Remove-VMSnapshot ............................................................................................................................................... 55
Move-VM.................................................................................................................................................................. 55
Select-ClusterSharedVolume .................................................................................................................................... 56
Sync-VMClusterConfig .............................................................................................................................................. 56
Get-VMLiveMigrationNetwork ................................................................................................................................. 56
Select-VMLiveMigrationNetwork.............................................................................................................................. 57
Get-VMClusterGroup ................................................................................................................................................ 57
Select-Enumtype....................................................................................................................................................... 57
Select-List.................................................................................................................................................................. 58
Select-Item................................................................................................................................................................ 58
Select-Tree................................................................................................................................................................ 58
Out-Tree ................................................................................................................................................................... 59
Test-Admin ............................................................................................................................................................... 59
Test-WMIJob............................................................................................................................................................. 59
Test-WMIResult ........................................................................................................................................................ 60
Convert-DiskIDtoDrive .............................................................................................................................................. 60
Get-FirstAvailableDriveLetter ................................................................................................................................... 60
Wait-ForDisk ............................................................................................................................................................. 60
WMI Objects used by the functions.............................................................................................................................. 62
Plik z chomika:
ovelclocker
Inne pliki z tego folderu:
Erskine, Samuel et al - Microsoft System Center 2012 Service Manager Cookbook.pdf
(13164 KB)
MS Client Virtualization Strategy.pdf
(1741 KB)
Mcts - Windows Server Virtualization Configuration Study Guide (Exam 70-652).pdf
(11610 KB)
Mastering Microsoft Virtualization.pdf
(13855 KB)
Cwiczenia z Windows Server 2008_wirtualizacja warstwy prezentacji.pdf
(573 KB)
Inne foldery tego chomika:
● Książki informatyczne
500 prac - pedagogika, psychologia, socjologia, filozofia
bbbbb
Duchowość, psychologia
e-book
Zgłoś jeśli
naruszono regulamin