Cmdlets de Powershell para o Hyper-V

Boa Tarde Pessoal.

 

Esses dias precisei fazer algumas automatizações no Hyper-V usando scripts e achei no site http://www.codeplex.com/PSHyperv vários cmdlets com manual e tudo. É só instalar!

Veja alguns exemplos retirados do próprio site:

 

Procurando uma VM
Get-VM, Choose-VM , Get-VMHost

Conectando a uma VM
New-VMConnectSession

Descobrindo e procurando o estado de uma VM
Get-VMState , Set-VMState , Convert-VmState,
Ping-VM , Test-VMHeartBeat, Shutdown-VM , Start-VM, Stop-VM, Suspend-VM
Get-VMKVP, Add-KVP, Remove-KVP, Get-VMJPEG

Backup, export e snapshot de VMs
Export-VM , Import-VM, Get-VMSnapshot, Choose-VMSnapshot , Apply-VMSnapshot , New-VMSnapshot ,Remove-VMSnapshot, Rename-VMSnapShot, Update-VMSnapshot, Get-VMSnapshotTree, Get-VmBackupScript

Adicionando e removendo VMs e configurando placa mãe
New-VM , Remove-VM , Set-VM , Get-VMCPUCount, Set-VMCPUCount, Get-VMMemory, Set-VMMemory, Set-VMSerialPort

Manipulando controladoras, drives e imagens de drivers
Get-VMDiskController
Add-VMSCSIController , Remove-VMSCSIcontroller
Get-VMDriveByController , Add-VMDRIVE , Remove-VMdrive
Get-VMDiskByDrive, Add-VMDISK , Set-VMDisk, Get-VMDisk
Get-VMFloppyDisk , Add-VMFloppyDisk
Add-VMNewHardDisk

Manipulando placa de redes
Get-VMNic , List-VMNic , Choose-VMNIC, Add-VMNIC, Remove-VMNIC , Set-VMNICAddress , Set-VMNICConnection , Get-VMNicport ,
Get-VMnicSwitch, Choose-VMSwitch, New-VMSwitchPort, Get-VMByMACaddress, Choose-VMExternalEthernet,
New-VMExternalSwitch, New-VMInternalSwitch,New-VmPrivateSwitch

Trabalhando com arquivos VHDs
Get-VHDDefaultPath, Get-VHDInfo, New-VHD, Compact-VHD, Test-VHD,Convert-VHD,Merge-VHD,Mount-VHD, Unmount-VHD

 

Agora é só utilizá-los para automatizar e facilitar seu gerenciamento das VMs.

 

Até mais!

About leandroesc
Leandro Carvalho works as product specialist with Microsoft solutions such as Windows Server, Hyper-V, App-V, VDI, Security, System Center, Exchange, Lync Server, Sharepoint, Project Server and client systems, in addition to helping the community constantly with articles, forums, videos and lectures about his passion: Microsoft Virtualization. He obtained the certifications Certified Ethical Hacker/MCP/MCSA+M+S/MCSE+S/MCTS/MCITP/MCT and MVP. In 2009 he won the MCT Awards Latin America Trainer of the year and since 2009 the Microsoft MVP as a Virtualization Specialist.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: