-
Notifications
You must be signed in to change notification settings - Fork 0
Health Check
Role-specific health checks (AD DC, ADFS, CA, Cluster, DFS, DHCP, DNS, Exchange, File Server, Hyper-V, IIS, Print Server, RDS, generic services, WSUS) returning a consistent pass/fail shaped summary.
16 function(s) in Public/healthcheck/.
-
Get-ADFSHealth— Retrieves AD FS health status from one or more Windows servers -
Get-AdDomainControllerHealth— Checks Active Directory Domain Services health on a Domain Controller -
Get-CertificateAuthorityHealth— Checks Active Directory Certificate Services health on CA servers -
Get-ClusterHealth— Retrieves failover cluster health status from local or remote machines -
Get-DfsNamespaceHealth— Retrieves DFS Namespace health status from local or remote computers -
Get-DfsReplicationHealth— Retrieves DFS Replication health status from local or remote computers -
Get-DhcpServerHealth— Checks DHCP Server role health on Windows servers -
Get-DnsServerHealth— Checks DNS Server role health on Windows servers -
Get-ExchangeServerHealth— Checks Exchange Server health on Windows servers -
Get-FileServerHealth— Retrieves file server health metrics from local or remote servers -
Get-HyperVHostHealth— Checks Hyper-V host health on Windows servers -
Get-IISHealth— Retrieves IIS Web Server health status for one or more computers -
Get-PrintServerHealth— Retrieves print server health information from local or remote computers -
Get-RDSHealth— Retrieves Remote Desktop Services health status from one or more servers -
Get-ServiceHealth— Retrieves service health status from local or remote computers -
Get-WSUSHealth— Retrieves WSUS server health and status information
Retrieves AD FS health status from one or more Windows servers.
Collects comprehensive AD FS health information including service status, SSL certificate expiry, relying party trusts, enabled endpoints, and server health test results. Returns a single typed object per server with an overall health assessment.
Syntax
Get-ADFSHealth [-ComputerName <string[]>]Examples
Get-ADFSHealthQueries the local server for AD FS health information.
Get-ADFSHealth -ComputerName 'ADFS01'Queries a single remote AD FS server by name.
'ADFS01', 'ADFS02' | Get-ADFSHealth -Credential (Get-Credential)Queries multiple remote AD FS servers via the pipeline with alternate credentials.
Output: PSWinOps.ADFSHealth
Returns one object per server with service status, SSL certificate details, relying party counts, endpoint counts, health test results, and overall health.
Checks Active Directory Domain Services health on a Domain Controller.
Performs comprehensive AD DS health diagnostics on one or more Domain Controllers. Verifies the executing account has sufficient privileges (local Administrator plus Domain Admins or Enterprise Admins membership) before running diagnostics. Checks NTDS service status, replication health via repadmin, dcdiag test results, SYSVOL and NETLOGON share accessibility, and returns a typed health object per DC. If privileges are insufficient, OverallHealth is set to 'InsufficientPrivilege' and partial results are still returned where possible.
Syntax
Get-AdDomainControllerHealth [-ComputerName <string[]>]Examples
Get-AdDomainControllerHealthChecks AD DS health on the local Domain Controller.
Get-AdDomainControllerHealth -ComputerName 'DC01' -Credential (Get-Credential)Checks AD DS health on a remote Domain Controller using explicit credentials.
'DC01', 'DC02' | Get-AdDomainControllerHealthChecks AD DS health on multiple Domain Controllers via pipeline input.
Output: PSWinOps.AdDomainControllerHealth
Returns one object per queried Domain Controller with service status, privilege validation, replication counters, dcdiag results, share accessibility, and overall health.
Checks Active Directory Certificate Services health on CA servers.
Performs comprehensive health checks on AD CS Certificate Authority servers. Validates CertSvc service status, CA certificate expiration, CRL publication, and CA responsiveness via certutil diagnostics. Returns one typed object per server suitable for List view display.
Syntax
Get-CertificateAuthorityHealth [-ComputerName <string[]>]Examples
Get-CertificateAuthorityHealthChecks AD CS health on the local computer.
Get-CertificateAuthorityHealth -ComputerName 'CA01'Checks AD CS health on a single remote CA server.
'CA01', 'CA02' | Get-CertificateAuthorityHealth -Credential (Get-Credential)Checks AD CS health on multiple remote CA servers via pipeline.
Output: PSWinOps.CertificateAuthorityHealth
Returns one object per server with service status, CA name, CA type, certificate expiry, CRL publish status, ping status, and overall health.
Retrieves failover cluster health status from local or remote machines.
Queries the Failover Clustering service and cluster components to assess overall cluster health. Checks ClusSvc service status, node states, resource states, group states, quorum configuration, and witness resource state on one or more machines. Uses Get-ClusterQuorum to retrieve quorum type and witness identity, then Get-ClusterResource to verify the witness resource state. Returns a typed PSWinOps.ClusterHealth object per machine with an OverallHealth assessment of Healthy, Degraded, Critical, or RoleUnavailable.
Syntax
Get-ClusterHealth [-ComputerName <string[]>]Examples
Get-ClusterHealthQueries cluster health on the local machine.
Get-ClusterHealth -ComputerName 'YOURCLUSTER01'Queries cluster health on a single remote machine using current credentials.
'YOURCLUSTER01', 'YOURCLUSTER02' | Get-ClusterHealthQueries cluster health on multiple machines via pipeline input.
Output: PSWinOps.ClusterHealth
Returns one object per queried machine with cluster health properties including ServiceStatus, NodeState, QuorumState, WitnessType, WitnessName, WitnessState, and OverallHealth.
Retrieves DFS Namespace health status from local or remote computers.
Checks the DFS service state and enumerates all DFS namespace roots on the target computer. For each root, it queries root targets to determine how many are online versus offline, then computes an overall health status. Uses Invoke-Command for remote execution because the DFSN cmdlets only work locally on the DFS server.
Syntax
Get-DfsNamespaceHealth [-ComputerName <string[]>]Examples
Get-DfsNamespaceHealthReturns DFS namespace health for all roots on the local computer.
Get-DfsNamespaceHealth -ComputerName 'SRV01'Returns DFS namespace health from a single remote DFS server.
'SRV01', 'SRV02' | Get-DfsNamespaceHealthChecks DFS namespace health on multiple servers via pipeline.
Output: PSWinOps.DfsNamespaceHealth
Returns objects with computer name, DFS service status, root path, root type, state, target counts, and an overall health indicator.
Retrieves DFS Replication health status from local or remote computers.
Queries the DFSR service status and CIM namespace root/microsoftdfs to collect replication state for each replicated folder. Returns one object per replicated folder with service status, replication state, conflict size, and overall health. Supports remote execution via Invoke-Command with optional credentials.
Syntax
Get-DfsReplicationHealth [-ComputerName <string[]>]Examples
Get-DfsReplicationHealthRetrieves DFS Replication health for the local computer.
Get-DfsReplicationHealth -ComputerName 'DFS01'Retrieves DFS Replication health from a single remote server.
'DFS01', 'DFS02' | Get-DfsReplicationHealth -Credential (Get-Credential)Retrieves DFS Replication health from multiple servers via pipeline.
Output: PSWinOps.DfsReplicationHealth
Returns one object per replicated folder with ComputerName, ServiceName, ServiceStatus, ReplicationGroupName, ReplicatedFolderName, State, CurrentConflictSize, OverallHealth, and Timestamp properties.
Checks DHCP Server role health on Windows servers.
Performs a comprehensive health check of the DHCP Server role on one or more Windows servers. Evaluates service status, scope statistics, address utilization, and failover relationships to produce a per-scope health assessment with an overall health rating.
Syntax
Get-DhcpServerHealth [-ComputerName <string[]>]Examples
Get-DhcpServerHealthChecks DHCP Server health on the local machine.
Get-DhcpServerHealth -ComputerName 'DHCP01'Checks DHCP Server health on the remote server DHCP01.
'DHCP01', 'DHCP02' | Get-DhcpServerHealth -Credential (Get-Credential)Checks DHCP Server health on multiple servers using explicit credentials via pipeline.
Output: PSWinOps.DhcpServerHealth
Returns one object per DHCP scope found, or one summary object if no scopes exist or the role is unavailable. Each object includes service status, scope details, address utilization, failover state, and an overall health rating.
Checks DNS Server role health on Windows servers.
Retrieves comprehensive DNS Server health information including service status, zone inventory, forwarder configuration, root hints, and self-resolution capability. Returns a single typed object per server with an overall health assessment.
Syntax
Get-DnsServerHealth [-ComputerName <string[]>]Examples
Get-DnsServerHealthChecks DNS Server health on the local machine.
Get-DnsServerHealth -ComputerName 'DNS01'Checks DNS Server health on a single remote server.
'DNS01', 'DNS02' | Get-DnsServerHealth -Credential (Get-Credential)Checks DNS Server health on multiple remote servers via pipeline.
Output: PSWinOps.DnsServerHealth
Returns one object per server with DNS service status, zone counts, forwarder and root hints counts, self-resolution result, and overall health.
Checks Exchange Server health on Windows servers.
Retrieves comprehensive Exchange Server health information including service status, mailbox database mount status, mail queue lengths, DAG database copy health, and certificate expiry. Returns a single typed object per server with an overall health assessment suitable for dashboards and alerting pipelines.
Syntax
Get-ExchangeServerHealth [-ComputerName <string[]>] [-QueueWarningThreshold <int>] [-QueueCriticalThreshold <int>] [-CertificateWarningDays <int>]Examples
Get-ExchangeServerHealthChecks Exchange Server health on the local machine using default thresholds.
Get-ExchangeServerHealth -ComputerName 'EX01' -QueueWarningThreshold 50Checks Exchange Server health on a single remote server with a custom queue warning threshold.
'EX01', 'EX02' | Get-ExchangeServerHealth -Credential (Get-Credential)Checks Exchange Server health on multiple remote servers via pipeline with alternate credentials.
Output: PSWinOps.ExchangeServerHealth
Returns one object per server with Exchange service statuses, database counts, queue metrics, DAG copy health, certificate expiry counts, and overall health.
Retrieves file server health metrics from local or remote servers.
Collects comprehensive file server health data including the LanmanServer service status, non-administrative share count, open SMB sessions and files, FSRM quota statistics, and minimum free disk space across shared drives. Returns a single typed object per server with an overall health assessment.
Syntax
Get-FileServerHealth [-ComputerName <string[]>]Examples
Get-FileServerHealthQueries the local file server and returns health metrics.
Get-FileServerHealth -ComputerName 'FS01'Queries the remote file server FS01 and returns its health metrics.
'FS01', 'FS02' | Get-FileServerHealth -Credential (Get-Credential)Queries multiple remote file servers via pipeline with explicit credentials.
Output: PSWinOps.FileServerHealth
Returns one object per server containing service status, share counts, SMB sessions, FSRM quotas, disk space, and overall health assessment.
Checks Hyper-V host health on Windows servers.
Queries the Hyper-V Virtual Machine Management service and enumerates virtual machines to assess host resource utilization and VM health. Returns a typed health object per host with VM counts by state, memory utilization, and an overall health assessment.
Syntax
Get-HyperVHostHealth [-ComputerName <string[]>]Examples
Get-HyperVHostHealthChecks Hyper-V health on the local host.
Get-HyperVHostHealth -ComputerName 'HV01'Checks Hyper-V health on a remote Hyper-V host.
'HV01', 'HV02' | Get-HyperVHostHealthChecks Hyper-V health on multiple hosts via pipeline.
Output: PSWinOps.HyperVHostHealth
Returns one object per target host containing service status, VM counts by state, memory utilization metrics, and an overall health assessment string.
Retrieves IIS Web Server health status for one or more computers.
Checks the health of IIS Web Server components including the W3SVC service, individual site states, application pool states, and binding configurations. Returns one object per IIS site with an overall health assessment. Supports local and remote execution via WinRM with graceful fallback to CIM when IIS PowerShell modules are unavailable.
Syntax
Get-IISHealth [-ComputerName <string[]>]Examples
Get-IISHealthChecks IIS health on the local computer and returns one object per site.
Get-IISHealth -ComputerName 'WEB01'Checks IIS health on a single remote server.
'WEB01', 'WEB02' | Get-IISHealth -Credential (Get-Credential)Checks IIS health on multiple remote servers via pipeline with alternate credentials.
Output: PSWinOps.IISHealth
Returns one object per IIS site with service status, site state, app pool state, bindings, physical path, and overall health assessment.
Retrieves print server health information from local or remote computers.
Collects Spooler service status, printer counts by state, pending and errored print jobs, and port counts from one or more print servers. Each server produces a single typed object with an OverallHealth summary computed from the collected metrics.
Syntax
Get-PrintServerHealth [-ComputerName <string[]>]Examples
Get-PrintServerHealthRetrieves print server health for the local computer.
Get-PrintServerHealth -ComputerName 'PRINT01'Retrieves print server health from a single remote server.
'PRINT01', 'PRINT02' | Get-PrintServerHealth -Credential (Get-Credential)Retrieves print server health from multiple remote servers via pipeline.
Output: PSWinOps.PrintServerHealth
Returns one object per server with service status, printer counts, job counts, port count, and an OverallHealth assessment.
Retrieves Remote Desktop Services health status from one or more servers.
Checks the health of Remote Desktop Services on target computers by inspecting TermService and SessionEnv services, RDS module availability, installed RD roles, active and disconnected sessions, and licensing configuration. Returns a single typed object per server with an overall health assessment.
Syntax
Get-RDSHealth [-ComputerName <string[]>]Examples
Get-RDSHealthChecks RDS health on the local computer.
Get-RDSHealth -ComputerName 'RDS01'Checks RDS health on a single remote server.
'RDS01', 'RDS02' | Get-RDSHealth -Credential (Get-Credential)Checks RDS health on multiple servers via pipeline with alternate credentials.
Output: PSWinOps.RDSHealth
Returns one object per server with service status, session counts, installed roles, licensing mode, and overall health assessment.
Retrieves service health status from local or remote computers.
Queries Win32_Service via CIM to report on Windows services state and health. By default returns only auto-start services that are not running (degraded), making it ideal for monitoring. Use -IncludeAll to see every service. Use -Name to filter by service name with wildcard support.
Syntax
Get-ServiceHealth [-ComputerName <string[]>] [-ServiceName <string>] [-IncludeAll]Examples
Get-ServiceHealthReturns auto-start services that are not running on the local computer.
Get-ServiceHealth -ComputerName 'SRV01' -ServiceName 'sql*' -IncludeAllReturns all SQL-related services from SRV01 regardless of state.
'SRV01', 'SRV02' | Get-ServiceHealthChecks service health on multiple servers via pipeline.
Output: PSWinOps.ServiceHealth
Returns objects with service name, display name, state, start mode, account, process ID, and a health status indicator.
Retrieves WSUS server health and status information.
Collects comprehensive health data from Windows Server Update Services (WSUS) servers. Checks service status, client statistics, database configuration, and content directory disk space to produce an overall health assessment per target machine.
Syntax
Get-WSUSHealth [-ComputerName <string[]>]Examples
Get-WSUSHealthChecks WSUS health on the local computer.
Get-WSUSHealth -ComputerName 'WSUS01'Checks WSUS health on a single remote server.
'WSUS01', 'WSUS02' | Get-WSUSHealth -Credential (Get-Credential)Checks WSUS health on multiple remote servers via pipeline with alternate credentials.
Output: PSWinOps.WSUSHealth
Returns an object per target with service status, client statistics, database configuration, content directory space, and overall health.
Domains
- Active Directory (22)
- Certificate (1)
- Event Log (9)
- Health Check (16)
- IIS (9)
- Network (26)
- NTP (5)
- Proxy (4)
- RDP (6)
- Security (1)
- System (20)
- Utils (4)
- VSS (Shadow Copy) (6)
- Windows Update (10)