PowerShell Flashcards
What is the command to change computer name?
Rename-Computer
What is the command to restart the computer?
Restart-Computer
What is the command to get a list of windows features?
Get-WindowsFeature
What is the command to install and uninstall windows feature?
Install-WindowsFeature
Uninstall-WindowsFeature
What is the command to remove a feature and its payload path?
Uninstall-WindowsFeature -Remove
What is the command to remove all features and payloads not installed?
Get-WindowsFeature | Where-Object {$._Installed -eq $false} | Uninstall-WindowsFeature -Remove
What is the command to configure IP address?
New-NetIPAddress -InterfaceIndex/Alias (-AddressFamily) -IPAddress -DefaultGateway -PrefixLength
What is the command to configure DNS?
Set-DNSClientServerAddress -InterfaceIndex/Alias -ServerAddresses
What is the command to get a list on IP interfaces?
Get-NetIPInterface
What is the command to add a computer to a domain?
Add-Computer -DomainName
What is the command to get a list of computers connected to a domain?
Get-ADComputer -Filter *
What is the command to disable the firewall completely?
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
What is the command to create a firewall rule?
New-NetFirewallRule -Name -Direction Inbound/Outbound -Action Block/Allow -Protocol
What is the command to add the GUI interface?
Install-WindowsFeature -Server-Gui-Mgmt-Infra, Server-Gui-Shell -Source:wim:D:\sources\install.wim:1/2/3/4
What is the command to see cmdlets within load balancing fail-over?
Get-Command -Module Netlbfo