Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



batch file to run "iisreset"

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 24-05-2005
John Grandy
 
Posts: n/a
batch file to run "iisreset"

Hi. I would like to create a batch file that runs "iisreset" on a large
number of web-servers (all boxes are Windows 2003 Server).

I have created a domain account that is member of the local Administrators
group of each of these boxes.



Reply With Quote
  #2  
Old 24-05-2005
Torgeir Bakken \(MVP\)
 
Posts: n/a
Re: batch file to run "iisreset"

John Grandy wrote:

> Hi. I would like to create a batch file that runs "iisreset" on
> a large number of web-servers (all boxes are Windows 2003 Server).
>
> I have created a domain account that is member of the local
> Administrators group of each of these boxes.

Hi,

iisreset.exe can take a remote computer name on the command line,
so from an computer that have IIS installed, you could try this in
a command prompt:

iisreset.exe webserver01 /STATUS

where webserver01 is the name of the remote computer.

If that works for you, you can in e.g a batch file or VBScript file
feed the iisreset.exe command with computer names from e.g. a text
file.



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
Reply With Quote
  #3  
Old 24-05-2005
John Grandy
 
Posts: n/a
Re: batch file to run "iisreset"

Hi Torgeir, and thanks for the response.

That method generally works.

However, for one of the servers whose IIS are being restarted in batch file:

iisreset {webservername} /restart

I receive the message

"The RPC server is unavailable"

I do not receive the messages:
Attempting stop....
Internet services successfully stopped
Attemping start...
Internet serivices successfully restarted

Looking at the Services applet on the machine I am running the batch file
from, I see that the RPC service is started.

Also, going to {webservername} and running "iisreset" directly succeeds.


"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:uqFvCeGYFHA.712@TK2MSFTNGP14.phx.gbl...
> John Grandy wrote:
>
>> Hi. I would like to create a batch file that runs "iisreset" on
>> a large number of web-servers (all boxes are Windows 2003 Server).
>>
>> I have created a domain account that is member of the local
>> Administrators group of each of these boxes.

> Hi,
>
> iisreset.exe can take a remote computer name on the command line,
> so from an computer that have IIS installed, you could try this in
> a command prompt:
>
> iisreset.exe webserver01 /STATUS
>
> where webserver01 is the name of the remote computer.
>
> If that works for you, you can in e.g a batch file or VBScript file
> feed the iisreset.exe command with computer names from e.g. a text
> file.
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scr...r/default.mspx



Reply With Quote
  #4  
Old 25-05-2005
Michael Harris \(MVP\)
 
Posts: n/a
Re: batch file to run "iisreset"

John Grandy wrote:
> Hi Torgeir, and thanks for the response.
>
> That method generally works.
>
> However, for one of the servers whose IIS are being restarted in
> batch file:
> iisreset {webservername} /restart
>
> I receive the message
>
> "The RPC server is unavailable"
>
> I do not receive the messages:
> Attempting stop....
> Internet services successfully stopped
> Attemping start...
> Internet serivices successfully restarted
>
> Looking at the Services applet on the machine I am running the batch
> file from, I see that the RPC service is started.
>
> Also, going to {webservername} and running "iisreset" directly
> succeeds.



Make sure that DCOM access has not been disabled on the server...

(MMC) Component Services -> Computers -> My Computer (if run on the server)

R-click -> Properties -> Default Prioperties tab

'Enable Distributed COM on this computer' should be checked.


>
>
> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in
> message news:uqFvCeGYFHA.712@TK2MSFTNGP14.phx.gbl...
>> John Grandy wrote:
>>
>>> Hi. I would like to create a batch file that runs "iisreset" on
>>> a large number of web-servers (all boxes are Windows 2003 Server).
>>>
>>> I have created a domain account that is member of the local
>>> Administrators group of each of these boxes.

>> Hi,
>>
>> iisreset.exe can take a remote computer name on the command line,
>> so from an computer that have IIS installed, you could try this in
>> a command prompt:
>>
>> iisreset.exe webserver01 /STATUS
>>
>> where webserver01 is the name of the remote computer.
>>
>> If that works for you, you can in e.g a batch file or VBScript file
>> feed the iisreset.exe command with computer names from e.g. a text
>> file.
>>
>>
>>
>> --
>> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
>> Administration scripting examples and an ONLINE version of
>> the 1328 page Scripting Guide:
>> http://www.microsoft.com/technet/scr...r/default.mspx


--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.



Reply With Quote
  #5  
Old 25-05-2005
John Grandy
 
Posts: n/a
Re: batch file to run "iisreset"

Hi Michael, and thanks for the response.

I followed your instructions and "Enable Distributed COM on this computer"
is checked on the machine having the iisreset problems.

I also followed the same instructions for the machine I am running the batch
file from, "Enable Distributed COM on this computer" is checked there as
well.

What else could be going on ?


"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:eyoLqvLYFHA.712@TK2MSFTNGP14.phx.gbl...
> John Grandy wrote:
>> Hi Torgeir, and thanks for the response.
>>
>> That method generally works.
>>
>> However, for one of the servers whose IIS are being restarted in
>> batch file:
>> iisreset {webservername} /restart
>>
>> I receive the message
>>
>> "The RPC server is unavailable"
>>
>> I do not receive the messages:
>> Attempting stop....
>> Internet services successfully stopped
>> Attemping start...
>> Internet serivices successfully restarted
>>
>> Looking at the Services applet on the machine I am running the batch
>> file from, I see that the RPC service is started.
>>
>> Also, going to {webservername} and running "iisreset" directly
>> succeeds.

>
>
> Make sure that DCOM access has not been disabled on the server...
>
> (MMC) Component Services -> Computers -> My Computer (if run on the
> server)
>
> R-click -> Properties -> Default Prioperties tab
>
> 'Enable Distributed COM on this computer' should be checked.
>
>
>>
>>
>> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in
>> message news:uqFvCeGYFHA.712@TK2MSFTNGP14.phx.gbl...
>>> John Grandy wrote:
>>>
>>>> Hi. I would like to create a batch file that runs "iisreset" on
>>>> a large number of web-servers (all boxes are Windows 2003 Server).
>>>>
>>>> I have created a domain account that is member of the local
>>>> Administrators group of each of these boxes.
>>> Hi,
>>>
>>> iisreset.exe can take a remote computer name on the command line,
>>> so from an computer that have IIS installed, you could try this in
>>> a command prompt:
>>>
>>> iisreset.exe webserver01 /STATUS
>>>
>>> where webserver01 is the name of the remote computer.
>>>
>>> If that works for you, you can in e.g a batch file or VBScript file
>>> feed the iisreset.exe command with computer names from e.g. a text
>>> file.
>>>
>>>
>>>
>>> --
>>> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
>>> Administration scripting examples and an ONLINE version of
>>> the 1328 page Scripting Guide:
>>> http://www.microsoft.com/technet/scr...r/default.mspx

>
> --
> Michael Harris
> Microsoft MVP Scripting
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Please ask follow-up questions via the original newsgroup thread.
>
>
>



Reply With Quote
  #6  
Old 26-05-2005
Michael Harris \(MVP\)
 
Posts: n/a
Re: batch file to run "iisreset"

> What else could be going on ?

Time to go googlin' (similar to searchin' for a needle in a haystack)...

Google Search: "The RPC server is unavailable" site:support.microsoft.com
http://www.google.com/search?q="The%20RPC%20server%20is%20unavailable"%20site:support.microsoft.com&num=100&scoring=d

Google Search
http://groups-beta.google.com/groups...up:microsoft.*

--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.



Reply With Quote
  #7  
Old 13-04-2010
Member
 
Join Date: Apr 2010
Posts: 1
Re: batch file to run "iisreset"

This was a big help thanks
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "batch file to run "iisreset""
Thread Thread Starter Forum Replies Last Post
Card reader error "Device can?t start code 10" "WPD file system volume driver" in windows 7 Musharat Operating Systems 4 12-02-2011 07:10 AM
need help in "iisreset" neetha Technology & Internet 2 05-10-2009 04:20 PM
"unable to create the file" "the system cannot find the file specified" Leo Wandersleb Windows Server Help 3 20-03-2008 09:23 PM
Convert HD file system from "RAW" to "NTFS" on slave drive? (Win X Pax Thien Windows XP Support 1 06-11-2007 10:19 PM
Adding commands to "Folder Options/Edit File Type/Actions" grayed-out "Edit" & "Remove" Green_XP Windows XP Support 1 06-11-2007 02:18 PM


All times are GMT +5.5. The time now is 11:07 AM.