Created
May 22, 2025 20:55
-
-
Save SweetAsNZ/687f1207bf8b5bdd15393a1947404e7f to your computer and use it in GitHub Desktop.
Get Windows Computer VLAN with PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-VLAN { | |
Write-Host -f Green "For a Physcial Box:" | |
Get-NetAdapter | Select-Object Name,VlanID | |
Write-Host -f Green "For a VMware VM:" | |
Get-VM -Name $ENV:COMPUTERNAME | Get-VirtualPortGroup #| Select Name, VLanId | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment