Tuesday, August 20, 2019

PowershellTip: Show Installed Windows Roles and Features

List all installed Features and Roles

Example 1:
 
Get-WindowsFeature | Where-Object {$_. installstate -eq "installed"}
 

Example 2:
 
Get-WindowsFeature | where-object {$_.Installed -eq $True} | Format-List DisplayName
 
 
 
Example 3:
 
Get-WindowsFeature | Where-Object {$_. installstate -eq "installed"} | Format-List Name, Installstate
 
 

List all roles and Features on a Remote Host

Get-WindowsFeature -ComputerName <ComputerName> | Where-Object {$_. installstate -eq "Installed"}
 
 
 
 

Friday, August 16, 2019

PowerShellTip: Move AD Group to another OU

 
Import-module ActiveDirectory
Get-ADGroup MyGroup | Move-ADObject -identity {$_.objectguid} -TargetPath 'ou=GroupsToDelete,dc=MyCompany,dc=com'