All Projects → jdhitsolutions → PSHyperV

jdhitsolutions / PSHyperV

Licence: MIT license
A set of PowerShell tools for working with Hyper-V from a Windows 10 desktop.

Programming Languages

powershell
5483 projects

Labels

Projects that are alternatives of or similar to PSHyperV

foreman hyperv
Microsoft Hyper-V compute resource for Foreman
Stars: ✭ 14 (-30%)
Mutual labels:  hyper-v
convey
Communication through a serial port or named pipe
Stars: ✭ 46 (+130%)
Mutual labels:  hyper-v
xHyper-V
This module contains DSC resources for deployment and configuration of Microsoft Hyper-V.
Stars: ✭ 105 (+425%)
Mutual labels:  hyper-v
Multipass
Multipass orchestrates virtual Ubuntu instances
Stars: ✭ 3,978 (+19790%)
Mutual labels:  hyper-v
packer-ubuntu-18.04
packer example - Ubuntu Server 18.04.5
Stars: ✭ 37 (+85%)
Mutual labels:  hyper-v
packer-post-processor-virtualbox-to-hyperv
Packer plugin to create Hyper-V vagrant boxes from VirtualBox artifacts
Stars: ✭ 18 (-10%)
Mutual labels:  hyper-v
Hyper-V
Install OS in a Virtual Machine using Hyper-V easily than ever
Stars: ✭ 28 (+40%)
Mutual labels:  hyper-v
yosild
Yosild is a single shell script that builds a full, minimal Linux distribution based on BusyBox.
Stars: ✭ 97 (+385%)
Mutual labels:  hyper-v
usbipd-win
Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.
Stars: ✭ 1,321 (+6505%)
Mutual labels:  hyper-v
Posher-V
PowerShell scripts for Hyper-V
Stars: ✭ 36 (+80%)
Mutual labels:  hyper-v
packer-windows
Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
Stars: ✭ 1,116 (+5480%)
Mutual labels:  hyper-v

PSHyperVTools

PSGallery Version PSGallery Downloads

A set of PowerShell tools for working with Hyper-V from a Windows 10 desktop. You must have the Hyper-V PowerShell module installed. This module is under active development

Installation

You can install the current release from the PowerShell Gallery:

Install-Module PSHyperVTools [-scope currentuser]

Please post any questions, problems, suggestions or comments in the Issues section of this repository.

Commands

Many of the commands in this module are "wrapper" or proxy variations of native Hyper-V cmdlets that are designed to be easier to use in an interactive PowerShell session.

Expand-VMGroup

When using VM groups, such as with Get-VMGroup, the resulting object displays nested VM or Management collections. But often, the whole point of a group is to make it easier to work with the collected virtual machines. This command will expand all virtual machines in a given group. You can also return a simple list of the virtual machine names.

Find-VMGroup

This command is very similar to Get-VMGroup and is not much more than a "wrapper" function for that command. The primary difference is that you can use this command to limit groups to a specific type. Although the default is to find all VM groups.

Get-VMIPAddress

This command is designed to get the IPv4 address for a given set of Hyper-V virtual machines. It assumes a single network adapter in each virtual machine with a single IPv4 address. The command has not been tested with other networking configurations such as NIC teaming.

Get-VMMemorySummary

This command gets memory settings for a given Hyper-V virtual machine.

Get-VMState

One of the drawbacks to the Get-VM command in the Hyper-V module is that it provides no filtering mechanism on the state, such as running. If you often find yourself running Get-VM and piping to Where-Object to only get running or stopped virtual machines, this command will simplify that process. The default behavior is to display all running virtual machines.

Open-VMConnect

This is a PowerShell command to make it easier to connect to a virtual machine console using the VMConnect.exe command line tool. You must run this under an account that has admin rights on the remote Hyper-V host.

Open-VMRemoteDesktop

Connect to a given virtual machine using a remote desktop connection. This assumes a Windows operating system on the virtual machine and it has been configured to allow remote desktop connections. The connection is made via the virtual machine's IP address. If connecting to a virtual machine on a remote computer it must have a publicly accessible IP address and interface.

Start-VMGroup

This command will expand virtual machine members of a VM group and start the virtual machine if it is not already running.

Stop-VMGroup

This command will expand virtual machine members of a VM group and stop the virtual machine if it running.

Set-VMNote

This command is an alternative to using Set-VM to modify the Notes setting of a virtual machine. This version allows you to append to an existing note or clear it.

Custom Type Extensions

When you import the module, it will also extend the type for a Hyper-V virtual machine and add these script properties. Some of these properties need values from the Hyper-V host. For better performance a PSSession to the Hyper-V host will be created and re-used. You might want to remove any PSSessions in your console before exiting PowerShell if you use this module.

  • ManagementGroups
  • Age
  • TestVHD
  • ConfigurationFile
  • DiskPath
  • Running
  • SizeGB
  • MemoryMB
  • MemoryDemandMB
  • HasSnapshot
  • IPAddress
  • Runtime
  • VMSwitch

Virtual Machine Type Extensions

Road Map

I have a few other commands I've built over the years that I would like to integrate into this module. Here's a taste of what I have in mind.

  • Get-VHDSummary
  • Get-VMLastUse
  • New-HyperVStatusReport
  • Show-VMMemoryPressure
  • Remove-VMEntry

Last updated 2019-06-26 15:13:22Z UTC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].