Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Changing TCP to dynamic using PowerShell

$
0
0

Function Set-DHCP
{
$Adapt = Get-WMIObject Win32_NetworkAdapterConfiguration -filter "IPenabled = 'True'" ;
$Adapt.EnableDHCP();
$Adapt.SetDNSServerSearchOrder();
Write-Host "Rebooting Now in 10 Seconds"
Start-Sleep -s 10
Restart-Computer
}

Used that code and managed to make it work :)

Just one more thing.

how do I create a desktop shortcut to your script and place it in the c:\users\public\desktop folder, so that all logged in users can have access to it.


Viewing all articles
Browse latest Browse all 13067

Trending Articles