tony
tony

Reputation: 2392

Windows scripting, setting the advanced properties of network connections

Has anyone got a powershell script or similiar for setting the "dns suffix for this connection" part in the advanced properties of a particular network connection?

thanks

Upvotes: 0

Views: 1801

Answers (1)

Shay Levy
Shay Levy

Reputation: 126902

Try this (run PowerShell as admin):

    Get-WmiObject Win32_NetworkAdapterConfiguration -Filter "Description='interface description'" | 
Invoke-WmiMethod -Name SetDNSDomain -ArgumentList @('contoso.com')

Upvotes: 1

Related Questions