Block network printers on Terminal Server
running windows 2008r2 terminal server. domain users have logon script maps printers. how can block these network printers being installed on terminal server?
thanks sjmp
hi sjmp,
i use the @producttype variable kixtart , works great. vbs script may here and modify use like.
----------------------------------------------------------
option explicit
dim strcomputer, objwmiservice, colclass, objclass, strmode
strcomputer = "."
set objwmiservice = getobject("winmgmts:\\" & strcomputer & "\root\cimv2")
set colclass = objwmiservice.execquery("select * win32_terminalservicesetting")
each objclass in colclass
strmode = objclass.terminalservermode
if strmode = 1 then
'bypass printers installation
else
'continue installation of printers
end if
next
set objwmiservice = nothing
set colclass = nothing
set objclass = nothing
------------------------------------------------------------
and yes, script part of ad user profile.
using empty file should option too, though. use gpp , create new file on ts servers @ location of desire , using vbs use "if exist file ... goto end else execute subroutine install printers"
" never panic before reboot ! "
Windows Server > Group Policy
Comments
Post a Comment