Tuesday, October 28, 2014

VB Script to Obtain Group Policies Applied To a Computer Remotley

Set GPM = CreateObject("GPMgmt.GPM")
Set Constants = GPM.GetConstants()
Set gpmRSOP = GPM.GetRSOP(Constants.RSOPModeLogging,"",0)
gpmRSOP.LoggingComputer = "Computername"
outputPath = "Filename.htm"
gpmRSOP.LoggingFlags = Constants.RsopLoggingNoUser
gpmRSOP.CreateQueryResults
gpmRSOP.GenerateReportToFile Constants.ReportHTML,outputPath

No comments:

Post a Comment