Skip to main content

Test-NetworkConnection

SYNOPSIS

Tests for an active local network connection, excluding wireless and virtual network adapters.

SYNTAX

Test-NetworkConnection [<CommonParameters>]

DESCRIPTION

Tests for an active local network connection, excluding wireless and virtual network adapters, by querying the Win32_NetworkAdapter WMI class.

EXAMPLES

EXAMPLE 1

Test-NetworkConnection

PARAMETERS

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

You cannot pipe objects to this function.

OUTPUTS

System.Boolean

Returns $true if a wired network connection is detected, otherwise returns $false.

NOTES

https://psappdeploytoolkit.com