欢迎光临
我们一直在努力

Hyper V server 2012 r2 常用的powershell命令

Hyper V server 2012 r2 常用的powershell命令

• 获取网卡信息
Get-netadapter
Get-netipinterface


• 设置DNS地址
Set-DnsClientServerAddress -InterfaceAlias NIC NAME -ServerAddresses "1.1.1.1","2.2.2.2"
注释:NIC Name: 网卡名称, 1.1.1.1,2.2.2.2


• 网卡聚合NIC Teaming:
New-NetLbfoTeam –name AdminTeam –TeamMembers VM1,VM2,VM3 –TeamingMode SwitchIndependent –LoadBalancingAlgorithm HyperVPort
注释:AdminTeam: 给聚合的网卡取名, VM1/2/3:被聚合的网卡名称


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


• 关闭防火墙
netsh advfirewall set allprofiles state off


• 重命名网卡
Rename-NetAdapter –name “old name” –NewName “”new_name“”


• 获取相关IP命令
Get-command –module nettcpip


• 查看/安装角色和特性
Get-windowsfeature
Install-windowsfeature


• 查看磁盘信息
Get-disk


• 查看服务
Get-service


• 查看系统信息
Systeminfo
Msinfo32


• 添加SNMP组件
Add SNMP - "Add-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -IncludeManagementTools"


• 查看补丁
Get-hotfix

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。