List_GPMC_Information.hta (In the book)

Jan
25
2013

 

<HTML>
<HEAD>
<!--
Script : List_GPMC_Information.wsf
From the book "Group Policy" by Jeremy Moskowitz

The contents of this script are provided "as is".  
No warranty of any kind, either express or implied, is made in relation 
to the availability, accuracy, reliability or content of this script.
ALWAYS test scripts before using in your production network!
-->
<TITLE>List GPMC Information</TITLE>
  <HTA:APPLICATION ID="List_GPMC_Information" 
    APPLICATIONNAME="List_GPMC_Information" 
    BORDER="dialog"
    CAPTION="yes"
    CONTEXTMENU="yes"
    ICON="graphics/title.ico"
    INNERBORDER="yes"
    MINIMIZEBUTTON="yes"
    MAXIMIZEBUTTON="yes"
    SHOWINTASKBAR="yes"
    SCROLLABLE="yes"
    SINGLEINSTANCE="yes"
    SYSMENU="yes"
    WINDOWSTATE="maximize">
  <LINK href='GroupPolicy.css' rel="stylesheet" type="text/css">
  <SCRIPT src='GPMgmt.vbs' language="VBScript"></SCRIPT>
  <SCRIPT src='HTA_Help.vbs' language="VBScript"></SCRIPT>
</HEAD>
<BODY>
<SCRIPT language="VBScript">
Sub Window_OnLoad
self.resizeTo 500,400
Dim gpmSitesContainer
CreateGPMObjects
Set gpmSitesContainer = gpm.GetSitesContainer(dnsForestRoot,"","",0)

' Assign text values
gpmDomain_Domain_Span.innerHTML = gpmDomain.Domain
gpmDomain_DC_Span.innerHTML = gpmDomain.DomainController
gpmSC_Forest_Span.innerHTML = gpmSitesContainer.Forest
gpmSC_DC_Span.innerHTML = gpmSitesContainer.DomainController
gpmSC_Domain_Span.innerHTML = gpmSitesContainer.Domain
End Sub
</SCRIPT>
<div>List GPMC Information</div>
<button onclick="window.print()">Print</button>
<p>
<div>Here is a litte information from the GPMDomain object:</div>
Domain Controller: <span id="gpmDomain_DC_Span"></span><br>
Domain:<span id="gpmDomain_Domain_Span"></span>
</p>
<p>
<div>Here is a little information from the GPMSitesContainer object</div>
Forest: <span id="gpmSC_Forest_Span"></span><br>
Domain Controller:<span id="gpmSC_DC_Span"></span><br>
Domain: <span id="gpmSC_Domain_Span"></span>
</p>
</BODY>
</HTML>
Copyright © GPanswers.com. All rights reserved. GPanswers.com is a service of PolicyPak Software