Re: netsh problem
- From: "Janani V" <jananiv@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 12:09:57 +0530
Hi,
First get connected to the remote machine using the following command:
netsh -r <remote_machine_name/IP> -u <Administrator_on_remote_machine> -p
<passwd_of _remote_admin>
This will get you to the netsh context on the remote server. After this
execute the command you want
If you want to do it within your automation and execute it on the remote
machine at one shot make the following script(say netsh_dns.txt)
push interface ip
set dns "Local Area Connection" static 10.0.0.1 primary
popd
and execute the following command
netsh -r <remote_machine_name/IP> -u <Administrator_on_remote_machine> -p
<passwd_of _remote_admin> -f netsh_dns.txt
Let me know if you have any more doubts.
--
Thanks,
Janani.
--
"This posting is provided "AS IS" with no warranties, and confers no
rights."
"Morten" <morten_skovgaard@xxxxxxxxxxx> wrote in message
news:e0fqZyWSFHA.3076@xxxxxxxxxxxxxxxxxxxxxxx
>I was hoping to be able to rely on standard MS tools...
>
> Best regards
>
> Morten
>
> "Arek Iskra [MVP]" <NoSpam_arek@xxxxxxxxxxxxx> wrote in message
> news:OmMZ3kzRFHA.1476@xxxxxxxxxxxxxxxxxxxxxxx
>> "Morten" <morten_skovgaard@xxxxxxxxxxx> wrote in message
>> news:u0U8nFyRFHA.3988@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi!
>>>
>>> I'm trying to change the primary DNS server on some of our servers
>>> remotely using netsh.
>>>
>>> I'm able to change the address just fine on a local server if I use:
>>>
>>> netsh interface ip set dns "Local Area Connection" static 10.0.0.1
>>> primary
>>>
>>> However if I try:
>>>
>>> netsh
>>> set machine remoteserver
>>> interface ip set dns "Local Area Connection" static 10.0.0.1 primary
>>>
>>> it tells me that the command is not available. If I try:
>>>
>>> netsh
>>> set machine remoteserver
>>> interface ip
>>>
>>> and type "set"
>>>
>>> it gives me these choices:
>>>
>>> set file - Copy the console output to a file.
>>> set machine - Sets the current machine on which to operate.
>>> set mode - Sets the current mode to online or offline.
>>>
>>> These however are apparently not available:
>>>
>>> set address - Sets the IP address or default gateway to the specified
>>> interface.
>>> set dns - Sets DNS server mode and addresses.
>>> set wins - Sets WINS server mode and addresses.
>>>
>>> (But they are available when I use them directly on the remote server
>>> via RDP).
>>>
>>> I've opened the command prompt on the server that I'm executing the
>>> commands from as a user who's a member of the administrator group on
>>> both the local and the remote server. I assume that that gives me
>>> sufficient permissions - or? The servers are NOT part of a domain and
>>> they're both Windows Server 2003 Standard Edition.
>>>
>>> Thanks in advance for your help.
>>>
>>> Morten
>>>
>>>
>>
>> Try executing it with psexec from Sysinternals and see how it goes.
>>
>> --
>> Arek Iskra
>> MVP for Windows Server - Software Distribution
>>
>>
>
>
.
- References:
- netsh problem
- From: Morten
- Re: netsh problem
- From: Arek Iskra [MVP]
- Re: netsh problem
- From: Morten
- netsh problem
- Prev by Date: Clients on subnet cannot ping each other
- Next by Date: Re: Clients on subnet cannot ping each other
- Previous by thread: Re: netsh problem
- Next by thread: Re: transfer DHCP from 2003 to 2000
- Index(es):
Relevant Pages
|
|