PowerShell Lab Complete!

You've mastered essential Windows Server PowerShell administration commands!

Take the Quiz → Try GUI Lab

WSA M01: Server Admin PowerShell Lab

0 / 4 Labs Complete ← Back
Lab 1: System Info
ComputerInfo, hostname, PS version
0 / 3
Lab 2: Roles
WindowsFeature, Install roles
0 / 3
Lab 3: Network
IPConfig, NetAdapter, static IP
0 / 3
Lab 4: Services
Get-Service, Restart, Rename
0 / 3

Lab 1: System Information

Learn to retrieve server information using PowerShell. These commands are essential for documentation and troubleshooting.

1 Get computer information
Retrieve detailed system information about this server.
Get-ComputerInfo
2 Check the hostname
Display the current computer name of this server.
hostname
3 Check PowerShell version
Verify which version of PowerShell is running on this server.
$PSVersionTable
Tip: PowerShell 5.1 is built into Windows Server 2022. PowerShell 7+ can be installed alongside it.

Lab 2: Roles & Features

Use PowerShell to view and install server roles and features - the command-line equivalent of the Server Manager wizard.

1 List all Windows features
View all available roles and features and their install status.
Get-WindowsFeature
2 Filter installed features
Show only the features that are currently installed on this server.
Get-WindowsFeature | Where-Object {$_.Installed -eq $true}
Tip: Where-Object filters pipeline output. The $_ variable represents the current object.
3 Install a feature
Install the DHCP Server role using PowerShell.
Install-WindowsFeature -Name DHCP -IncludeManagementTools

Lab 3: Network Configuration

Configure network settings from the command line. Servers typically need static IP addresses for reliable connectivity.

1 View IP configuration
Display the current network adapter configuration.
Get-NetIPConfiguration
2 View network adapters
List all network adapters and their connection status.
Get-NetAdapter
3 Set a static IP address
Assign a static IP address to the Ethernet adapter.
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.1.10 -PrefixLength 24 -DefaultGateway 192.168.1.1
Tip: Servers should always use static IPs so other machines can reliably connect to their services.

Lab 4: Services & Server Config

Manage Windows services and perform essential server configuration tasks through PowerShell.

1 List running services
View all services that are currently running on this server.
Get-Service | Where-Object {$_.Status -eq 'Running'}
2 Restart a service
Restart the Windows Time service (W32Time) to force a time sync.
Restart-Service -Name W32Time
3 Rename the computer
Rename this server from its default name to something meaningful.
Rename-Computer -NewName "SVR01"
Tip: In production, add -Restart to reboot immediately, or -Force to skip the confirmation prompt.
← Review Presentation GUI Lab → Take Quiz → Course Overview