Windows | Windows Server | Active directory | Exchange | SharePoint | SCCM | SCOM | Hyper-V | App-V
ACCUEIL Facebook Twitter Linked In Viadeo Flux RSS
Astuces suivantes

Astuces précédentes
Comment protéger par mot de passe un fichier Excel ?
Renommer une série de fichiers à la volée - Windows 8.1
Astuce pour travailler plus rapidement sur Windows
Mise à jour des produits Microsoft (Février 2015)
Internet: retrouver un onglet fermé par erreur


Publié le : 06/11/2008 23:40:02
Mise à jour le : 06/11/2008 23:39:53
Catégories :


Version imprimable

Auteur(s)

Loïc THOBOIS (Membre depuis le 04/09/2007 17:50:01)
Société : AVAEDOS
Fonction : Consultant / Formateur
Contactez cet auteur - Affichez les ressources de cet auteur

Administrer Hyper-V à l'aide de PowerShell


Si vous désirez administrer facilement le rôle Hyper-V à l'aide de PowerShell en utilisant une série de CmdLets dédiée, il vous suffit pour cela de télécharger le package suivant:

http://www.codeplex.com/pshyperv

Pour installer les nouvelles CmdLets, tapez ou inscrivez dans votre profil la commande suivante :

. C:\hyperv\hyperv.ps1 (attention, le point devant est important)

Description détaillée:

Finding a VM
Get-VM, Choose-VM , Get-VMHost

Connecting to a VM
New-VMConnectSession

Discovering and manipulating Machine states
Get-VMState , Set-VMState , Convert-VmState,
Ping-VM , Shutdown-VM , Start-VM, Stop-VM, Suspend-VM
Get-VMKVP, Get-VMJPEG

Backing up, exporting and snapshotting VMs
Export-VM , Get-VMSnapshot, Choose-VMSnapshot , Apply-VMSnapshot , New-VMSnapshot ,Remove-VMSnapshot, Get-VMSnapshotTree, Get-VmBackupScript

Adding and removing VMs, configuring motherboard settings.
New-VM , Remove-VM , Set-VM , Get-VMCPUCount, Set-VMCPUCount, Get-VMMemory, Set-VMMemory

Manipulating Disk controllers, drives and disk images
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

Manipluating Network Interface Cards
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

Working with VHD files
Get-VHDDefaultPath, Get-VHDInfo, New-VHD, Compact-VHD, Test-VHD,Convert-VHD,Merge-VHD,Mount-VHD, Unmount-VHD