14 min read
How to Use Winget and PowerShell for Efficient App Deployment
Boost IT efficiency with Winget and PowerShell! Learn how to automate app installations, updates, and management...
ScriptRunner Blog
The virtualization technology Microsoft Hyper-V can be managed with different tools. Microsoft itself offers numerous options for performing all relevant tasks for managing Hyper-V and controlling VMs.
Managing Hyper-V does not always require complex tools such as System Center Virtual Machine Manager, PowerShell offers numerous possibilities without the need for additional tools.
Of course, the Hyper-V Manager is available as a standard tool, and the new Windows Admin Center also offers numerous functions. In the following, we show 12 interesting tips for controlling Hyper-V with the focus on PowerShell.
These include the PowerShell module and Hyper-V Manager. If the server is to restart automatically, the parameter -restart is added.
Enter-PSSession -VMName
Invoke-Command -VMName -ScriptBlock { Commands }
$PSSession = New-PSSession -VMName -Credential (Get-Credential)
Copy-Item -ToSession $PSSession -Path C:\data.bar -Destination C:\
This allows you to manage the VMs and virtual switches on Hyper-V hosts through your web browser. You can additonaly create and edit virtual servers. You can also control VMs in this way, as well as view the console from your web browser.
New-VMSwitch -name SETswitch -Netadaptername „team1“, „team2“, „team3“ -AllowManagementOS $True -EnableEmbeddedTeaming $true
Get-NetAdapter [[-Name] <string[]>] [-IncludeHidden] [-Physical] [-CimSession <cimsession[]>] [-ThrottleLimit ] [-AsJob] []</cimsession[]></string[]>
Get-VMSwitch [[-Name] ] [[-ResourcePoolName] <string[]>] [-SwitchType <vmswitchtype[]>] [-CimSession <cimsession[]>] [-ComputerName <string[]>] [-Credential <pscredential[]>] []</pscredential[]></string[]></cimsession[]></vmswitchtype[]></string[]>
For more detailed information about the team, use the Get-VMSwitchTeam cmdlet.
To delete such switches, use the Remove-VMSwitch cmdlet.
Dec 19, 2024 by Jeffery Hicks
Boost IT efficiency with Winget and PowerShell! Learn how to automate app installations, updates, and management...
Dec 17, 2024 by Sonny Jamwal
Extend PowerShell with .NET for powerful event automation. Learn how to monitor and handle system events like a pro!...
Dec 17, 2024 by Sonny Jamwal
Optimize event monitoring with PowerShell WMI! Learn how to automate system tasks and streamline event management...
Thomas Joos is a freelance IT consultant and has been working in IT since 1992. He has published more than 90 practical reference books and writes for numerous IT publications such as c’t, PC Magazin, PC Welt, IT Administrator, Computerwoche and Heise Security.