Skip to content

Instantly share code, notes, and snippets.

@belotn
Created October 18, 2013 09:18
Show Gist options
  • Save belotn/7038878 to your computer and use it in GitHub Desktop.
Save belotn/7038878 to your computer and use it in GitHub Desktop.
Get TSE Serevr Mapping Configuration
$TSEKey="SYSTEM\ControlSet001\Control\Terminal Server\WinStations\RDP-Tcp"
get-XAserver | %{
$reg=[microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$_.ServerName)
$copy = $_
$reg.OpenSubKey($TSEKey).getValueNames() |? { $_ -like 'fDisable*'} |% {
$copy | Add-member -Type NoteProperty -Name $_ -Value $reg.OpenSubKey($TSEKey).getValue($_)
}
$copy
} | select ServerName, fDisable*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment