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.