are those things set in registry keys? that would make the check easier.
otherwise create an nsh script like:
basically make a nsh wrapper that copies over the vbs script and runs it, then removes it.
I tried to hard code one server into this:
sh-3.00$ more rdp_encryption.nsh
cp //gdcsrvnwh062/home/jmikula/rdp_encryption_levels.vbs //gdcsdnwh010/Support
nexec gdcsdnwh010 cmd /c "cscript /nologo c:\Support\rdp_encryption_levels.vbs"
rm -f //gdcsdnwh010/Support/rdp_encryption_levels.vbs
If never finishes, it just hangs. I see both scripts running on the application server and we see the file for the vbs script created on the remote server.
hmm... if you run the nexec command from the commandline (nsh) manually what happens?
if that hangs can you do:
cmd /c "cscript"
We were able to get this to work. This is what we did.
We added this vbs script to the /usr/nsh/share/sensors directory:
strComputer = "."
Set StdOut = WScript.StdOut
Set objWMIService = GetObject("winmgmts:
" & strComputer & "\root\cimv2")
set colItems = objWMIService.ExecQuery("Select MinEncryptionLevel from Win32_TSGeneralSetting", , 48)
For Each objItems in colItems
Select Case objItems.MinEncryptionLevel
strTSNo = "1"
strTSEncrypt = "Low level of encryption"
strTSNo = "2"
strTSEncrypt = "Client compatible level of encryption"
strTSNo = "3"
strTSEncrypt = "High level of encryption"
strTSNo = "4"
strTSEncrypt = "FIPS compliant encryption"
Wscript.StdOut.WriteLine strTSEncrypt & "," & strTSNo
We then created this nsh script and placed it in the /usr/nsh/share/sensors directory.
cp //gdcsrvnwh062/usr/nsh/share/sensors/rdp_encryption_levels.vbs //$HOST/Support
nexec $HOST cmd /c "cscript /nologo c:\Support\rdp_encryption_levels.vbs"
rm -f //$HOST/Support/rdp_encryption_levels.vbs
The extended object that we created for this was:
Operating System: Windows
nsh -c "/usr/nsh/share/sensors/rdp_encryption.nsh" ??TARGET.HOST??
execution type: Central execution
Grammer file: csv.gm
cool! if i could give you a gold star, i would. if windows would only keep it's settings in a consistent place...