Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Last active November 29, 2019 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/100fb0b59dfd1fea11737379f35edead to your computer and use it in GitHub Desktop.
Save guitarrapc/100fb0b59dfd1fea11737379f35edead to your computer and use it in GitHub Desktop.
In case your DockerNAT Network adaptor always reset network profile to public.
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop update
scoop install sudo
New-Item $profile
code $profile
$connectionProfiles = Get-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)"
if ($connectionProfiles.NetworkCategory -eq "Public") {
Write-Host "# PLEASE RUN FOLLOWINGS TO ENABLE DOCKER DRIVE SHARE." -ForeGroundColor Yellow
Write-Host "Get-NetConnectionProfile -interfacealias "vEthernet (DockerNAT) | sudo Set-NetConnectionProfile -NetworkCategory Private" -ForeGroundColor Cyan
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment