Returns information about the Terminal Service logon policies configured on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more information on downloading these items see the Windows PowerShell download page (right).
$strComputer = "." $colItems = get-wmiobject -class "Win32_TSLogonSetting" -namespace "root\CIMV2" ` -computername $strComputer foreach ($objItem in $colItems) { write-host "Caption: " $objItem.Caption write-host "Client Logon Information Policy: " $objItem.ClientLogonInfoPolicy write-host "Description: " $objItem.Description write-host "Domain: " $objItem.Domain write-host "Password: " $objItem.Password write-host "Prompt For Password: " $objItem.PromptForPassword write-host "Setting ID: " $objItem.SettingID write-host "Terminal Name: " $objItem.TerminalName write-host "User Name: " $objItem.UserName write-host }
$strComputer = "." $colItems = get-wmiobject -class "Win32_TSLogonSetting" -namespace "root\CIMV2" ` -computername $strComputer foreach ($objItem in $colItems) { write-host "Caption: " $objItem.Caption write-host "Client Logon Information Policy: " $objItem.ClientLogonInfoPolicy write-host "Description: " $objItem.Description write-host "Domain: " $objItem.Domain write-host "Password: " $objItem.Password write-host "Prompt For Password: " $objItem.PromptForPassword write-host "Setting ID: " $objItem.SettingID write-host "Terminal Name: " $objItem.TerminalName write-host "User Name: " $objItem.UserName write-host }