Get the App
SLTechnology News&Howtos  ›  Servers  › 

Hyper V server 2012 R2 commonly used powershell commands

Shulou Source: shulou.com Published: 2022-06-02 17:20:10 09月22日 Update

Hyper V server 2012 r2 common powershell commands

·Get network card information

Get-netadapter

Get-netipinterface

·Set DNS address

Set-DnsClientServerAddress -InterfaceAlias NIC NAME -ServerAddresses "1.1.1.1","2.2.2.2"

Note: NIC Name: NIC Name, 1.1.1.1, 2.2.2.2

·NIC aggregation NIC Teaming:

New-NetLbfoTeam -name AdminTeam -TeamMembers VM1,VM2,VM3 -TeamingMode SwitchIndependent -LoadBalancingAlgorithm HyperVPort

Comment: AdminTeam: Name the aggregated NIC, VM1/2/3: Name the aggregated NIC

·Disable IPv6

New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value 0xffffffff

·Turn off the firewall

netsh advfirewall set allprofiles state off

·Renaming network cards

Rename-NetAdapter -name "old name" -NewName ""new_name""

·Obtain relevant IP commands

Get-command -module nettcpip

·View/install characters and features

Get-windowsfeature

Install-windowsfeature

·View disk information

Get-disk

·View Services

Get-service

·View system information

Systeminfo

Msinfo32

·Add SNMP components

Add SNMP - "Add-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -IncludeManagementTools"

·View patches

Get-hotfix

Tags: Network cards information commands names comments frequently used addresses features disks systems components patches roles firewalls services fire prevention Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL OPPO Reno Huawei NVidia macOS