Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI Performance Counters » Powershell

Zone - WMI sample in Powershell

The foundations for Manageability in Windows 2019/2012/2008/ and Windows 10/8/7/Vista/XP are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The Zone WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Zone

Example(s)

$strComputer = "."

$objWMi = get-wmiobject -namespace root\MicrosoftDNS -computername localhost -Query "Select * from MicrosoftDNS_Zone"

foreach ($obj in $objWmi)
{
	write-host "Aging:" $obj.Aging
	write-host "AllowUpdate:" $obj.AllowUpdate
	write-host "AutoCreated:" $obj.AutoCreated
	write-host "AvailForScavengeTime:" $obj.AvailForScavengeTime
	write-host "Caption:" $obj.Caption
	write-host "ContainerName:" $obj.ContainerName
	write-host "DataFile:" $obj.DataFile
	write-host "Description:" $obj.Description
	write-host "DisableWINSRecordReplication:" $obj.DisableWINSRecordReplication
	write-host "DnsServerName:" $obj.DnsServerName
	write-host "DsIntegrated:" $obj.DsIntegrated
	write-host "ForwarderSlave:" $obj.ForwarderSlave
	write-host "ForwarderTimeout:" $obj.ForwarderTimeout
	write-host "InstallDate:" $obj.InstallDate
	write-host "LastSuccessfulSoaCheck:" $obj.LastSuccessfulSoaCheck
	write-host "LastSuccessfulXfr:" $obj.LastSuccessfulXfr
	write-host "LocalMasterServers:" $obj.LocalMasterServers
	write-host "MasterServers:" $obj.MasterServers
	write-host "Name:" $obj.Name
	write-host "NoRefreshInterval:" $obj.NoRefreshInterval
	write-host "Notify:" $obj.Notify
	write-host "NotifyServers:" $obj.NotifyServers
	write-host "Paused:" $obj.Paused
	write-host "RefreshInterval:" $obj.RefreshInterval
	write-host "Reverse:" $obj.Reverse
	write-host "ScavengeServers:" $obj.ScavengeServers
	write-host "SecondaryServers:" $obj.SecondaryServers
	write-host "SecureSecondaries:" $obj.SecureSecondaries
	write-host "Shutdown:" $obj.Shutdown
	write-host "Status:" $obj.Status
	write-host "UseNBStat:" $obj.UseNBStat
	write-host "UseWins:" $obj.UseWins
	write-host "ZoneType:" $obj.ZoneType
	write-host
	write-host "########"
	write-host
}