hi
got a wee powershell script that enable IP to DHCP and its working when i copy the script to powershell with adminsitrator
i would like to make a script instead but it wouldnt let me run it.
$networkConfig = Get-WmiObject Win32_NetworkAdapterConfiguration -filter "ipenabled = 'true'"
$networkConfig.EnableDHCP()
$networkConfig.SetDNSServerSearchOrder()
ipconfig /registerdns
"*****************************************" | Out-File C:\Windows\COMPANY-staticIP.txt -Append
get-date | Out-File C:\Windows\COMPANY-staticIP.txt -Append
ipconfig /all | Out-File C:\Windows\COMPANY-staticIP.txt -Append
how to run the .ps1 with administrator? there is no option to right click -select run as adminstrator
thanks
got a wee powershell script that enable IP to DHCP and its working when i copy the script to powershell with adminsitrator
i would like to make a script instead but it wouldnt let me run it.
$networkConfig = Get-WmiObject Win32_NetworkAdapterConfiguration -filter "ipenabled = 'true'"
$networkConfig.EnableDHCP()
$networkConfig.SetDNSServerSearchOrder()
ipconfig /registerdns
"*****************************************" | Out-File C:\Windows\COMPANY-staticIP.txt -Append
get-date | Out-File C:\Windows\COMPANY-staticIP.txt -Append
ipconfig /all | Out-File C:\Windows\COMPANY-staticIP.txt -Append
how to run the .ps1 with administrator? there is no option to right click -select run as adminstrator
thanks