Results 1 to 7 of 7

Thread: batch file to run "iisreset"

  1. #1
    John Grandy Guest

    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.



  2. #2
    Torgeir Bakken \(MVP\) Guest

    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

  3. #3
    John Grandy Guest

    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




  4. #4
    Michael Harris \(MVP\) Guest

    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.




  5. #5
    John Grandy Guest

    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.
    >
    >
    >




  6. #6
    Michael Harris \(MVP\) Guest

    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.




  7. #7
    Join Date
    Apr 2010
    Posts
    1

    Re: batch file to run "iisreset"

    This was a big help thanks

Similar Threads

  1. Replies: 4
    Last Post: 12-02-2011, 07:10 AM
  2. need help in "iisreset"
    By neetha in forum Technology & Internet
    Replies: 2
    Last Post: 05-10-2009, 04:20 PM
  3. "unable to create the file" "the system cannot find the file specified"
    By Leo Wandersleb in forum Windows Server Help
    Replies: 3
    Last Post: 20-03-2008, 09:23 PM
  4. Replies: 1
    Last Post: 06-11-2007, 10:19 PM
  5. Replies: 1
    Last Post: 06-11-2007, 02:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,020,778.14402 seconds with 16 queries