Created
October 18, 2013 09:18
-
-
Save belotn/7038878 to your computer and use it in GitHub Desktop.
Get TSE Serevr Mapping Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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