Private/Helper/Test-IsDomainConnected.ps1
<#
Copyright © 2024 Integris. For internal company use only. All rights reserved. #> FUNCTION Test-IsDomainConnected { <# .SYNOPSIS Determines if the system is actively connected to a domain. .DESCRIPTION This function checks the active domain connection status and returns true if the system is connected to a domain. .PARAMETER None .EXAMPLE Test-IsDomainConnected .NOTES The function uses the Get-DomainInfo cmdlet to check the active domain connection status. #> IF ((Get-DomainInfo).ActiveDomainConnection) { RETURN $True } RETURN $False } |