PowerShell Windows Server 2012
PowerShell
#Excecutar como Administrador
Start-Process powershell -Verb runAs
Placa de Rede
#Lista Adaptadores de Rede
Get-NetAdapter
Verifique o IfIdex
#Fixar IP
New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.0.2 -DefaultGateway 192.168.0.1 -AddressFamily IPv4 -PrefixLength 24
#Fixa DNS
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.168.0.1
#Desabilitar IPv6
Get-NetAdapterBinding -InterfaceAlias Ethernet | Select-Object Name,DisplayName,ComponentID
Disable-NetAdapterBinding -InterfaceAlias Ethernet -ComponentID ms_tcpip6
Hyper-V
#Listar VMs
Get-VM
#Iniciar, pausar, salvar, desligar VM
Start-VM nomeDaVM
Suspend-VM nomeDaVM
Save-VM nomeDaVM
Stop-VM nomeDaVM
#Guia de referencia para comandos PowerShell Hyper-V
http://technet.microsoft.com/en-us/library/hh848559.aspx
Active Directory
#Instalar Função Active Directory Domain Services e incluir ferramentas de gerenciamento
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
#Adicionar um novo domínio em uma nova floresta
Install-AddsForest
#Adicionar um domain controller Adicional
Install-AddsDomainController
#Adicionar um novo domíno em uma floresta já existente
Install-AddsDomain
#Excecutar como Administrador
Start-Process powershell -Verb runAs
Placa de Rede
#Lista Adaptadores de Rede
Get-NetAdapter
Verifique o IfIdex
#Fixar IP
New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.0.2 -DefaultGateway 192.168.0.1 -AddressFamily IPv4 -PrefixLength 24
#Fixa DNS
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.168.0.1
#Desabilitar IPv6
Get-NetAdapterBinding -InterfaceAlias Ethernet | Select-Object Name,DisplayName,ComponentID
Disable-NetAdapterBinding -InterfaceAlias Ethernet -ComponentID ms_tcpip6
Hyper-V
#Listar VMs
Get-VM
#Iniciar, pausar, salvar, desligar VM
Start-VM nomeDaVM
Suspend-VM nomeDaVM
Save-VM nomeDaVM
Stop-VM nomeDaVM
#Guia de referencia para comandos PowerShell Hyper-V
http://technet.microsoft.com/en-us/library/hh848559.aspx
Active Directory
#Instalar Função Active Directory Domain Services e incluir ferramentas de gerenciamento
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
#Adicionar um novo domínio em uma nova floresta
Install-AddsForest
#Adicionar um domain controller Adicional
Install-AddsDomainController
#Adicionar um novo domíno em uma floresta já existente
Install-AddsDomain
Comentários
Postar um comentário