mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-03-03 22:01:05 -05:00
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
9 lines
387 B
PowerShell
9 lines
387 B
PowerShell
# Copyright IBM Corp. 2010, 2025
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
# Get network connections
|
|
$networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
|
|
$connections = $networkListManager.GetNetworkConnections()
|
|
|
|
# Set network location to Private for all networks
|
|
$connections | % {$_.GetNetwork().SetCategory(1)}
|