Here are some really good and helpful PowerShell single line commands I have been using on my Windows Server 8 and Windows 8 machines.
Remove GUI from Windows Server 8
Remove-WindowsFeature -Name Server-Gui-Shell
Remove-WindowsFeature -Name Server-Gui-Mgmt-Infra
Add GUI to Windows Server 8
Install-WindowsFeature -Name Server-Gui-Shell
Get Volume details for a particular drive
Get-Volume -DriveLetter 'C'
Get all Volume details (including Free space)
Get-Volume
Optimize drive
Optimize-Volume -DriveLetter 'C'
Rename a Network Adapter
Rename-NetAdapter -Name 'External Interface' -NewName 'Internet Facing'
Disable IPv6
Set-NetAdapterBinding -Name "Internet Facing" -ComponentID ms_tcpip6 -Enabled $False
IPConfig equivalent
Get-NetIPConfiguration
IPConfig /all equivalent
Get-NetIPConfiguration -All
IPConfig /all equivalent and more..
Get-NetIPConfiguration -All -Detailed
Disable a Network Adapter
Disable-NetAdapter -Name "Internet Facing"
Configure a IPv4 IP Address
New-NetIPAddress -InterfaceIndex 21 -AddressFamily IPv4 -IPAddress 192.168.78.12
Add a computer to the domain (from client machine)
Add-Computer -Credential scrap\administrator -DomainName scrapping.local -ComputerName VIVEK-W8
Install Active Directory Domain Services and Active Directory Administrative Center
Install-WindowsFeature -Name AD-Domain-Services
Install-WindowsFeature -Name RSAT-AD-AdminCenter
I will keep updating the list as I come across the new ones..
Hope this helps,
Vivek Kumbhar
Quote of the day: There are people who think that everything one does with a serious face is sensible. - Georg Christoph Lichtenberg