The ServerManager PowerShell module is specifically designed for Windows Server operating systems and isn't natively available on Windows 10 client machines. When you attempt to run:
Import-Module ServerManager
Get-WindowsFeature
You'll encounter the error because this functionality belongs to the Server Manager console, which isn't included in Windows 10 by default.
For Windows 10 users who need similar functionality, consider these alternatives:
# Option 1: Using DISM (Deployment Image Servicing and Management)
Get-WindowsOptionalFeature -Online | Where-Object {$_.State -ne "Disabled"}
# Option 2: Using WindowsCapability commands
Get-WindowsCapability -Online | Where-Object {$_.State -eq "Installed"}
On Windows Server systems, you'll typically find the ServerManager module in one of these paths:
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ServerManager
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\ServerManager
If you need to manage remote Windows Server features from a Windows 10 machine:
# Establish a remote PowerShell session
$session = New-PSSession -ComputerName Server01 -Credential (Get-Credential)
# Import the ServerManager module remotely
Invoke-Command -Session $session -ScriptBlock {
Import-Module ServerManager
Get-WindowsFeature
}
# Clean up
Remove-PSSession $session
For modern cross-platform PowerShell management:
# Works in PowerShell 7+ across platforms
Get-WindowsCapability -Online -LimitAccess | Where-Object {$_.Name -like "*IIS*"}
While not recommended for production, you can enable some server-like features:
# Install IIS components
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer -All
The ServerManager
module is a Windows Server component that doesn't ship with Windows 10 by design. When you attempt to run:
Import-Module ServerManager
Get-WindowsFeature
You'll encounter the error because Windows 10 lacks this server-specific functionality. This module was intentionally excluded from client Windows versions as it's designed for server administration.
For Windows 10 users needing similar functionality, consider these alternatives:
# Option 1: Use DISM (Deployment Image Servicing and Management)
Get-WindowsOptionalFeature -Online | Where-Object {$_.State -ne "Disabled"}
# Option 2: Access Server Manager remotely (requires WinRM configuration)
Enter-PSSession -ComputerName ServerName -Credential (Get-Credential)
Import-Module ServerManager
Get-WindowsFeature
For local Windows 10 feature management, use these PowerShell commands:
# List all available Windows features
Get-WindowsOptionalFeature -Online | Format-Table -Property FeatureName,State
# Enable a specific feature (example: Hyper-V)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
# Disable a feature
Disable-WindowsOptionalFeature -Online -FeatureName WindowsMediaPlayer
If you're developing cross-platform scripts and need ServerManager functionality:
- Consider using Windows Server for development/testing
- Create a wrapper function that detects the OS version:
function Get-SystemFeatures {
if ((Get-CimInstance Win32_OperatingSystem).ProductType -eq 3) {
Import-Module ServerManager -ErrorAction SilentlyContinue
if (Get-Command Get-WindowsFeature -ErrorAction SilentlyContinue) {
return Get-WindowsFeature
}
}
return Get-WindowsOptionalFeature -Online
}
Developers often encounter these specific issues:
- 32-bit vs 64-bit PowerShell: Windows 10 runs both versions. The 64-bit version is at
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
while 32-bit is atC:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
- Feature naming differences: Some features have different names between client and server Windows
- Remote management requirements: Proper WinRM configuration is needed for remote ServerManager access