« Previous Next »

Thread: remote administration of IIS7

Last post 07-31-2009 1:36 PM by JeongHwan. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 07-30-2009, 7:08 PM

    remote administration of IIS7

    How do I execute the IIS7 cmdlets against remote machines? What do I put in for the PSPath property?

    Set-WebConfiguration -filter '/system.applicationHost/log/centralBinaryLogFile' -name "directory" -PSPath \\myserver -value "d:\inetpub\logs\logfiles"

  • 07-31-2009, 1:36 PM In reply to

    • JeongHwan
    • Top 150 Contributor
    • Joined on 12-14-2004, 4:43 PM
    • Redmond, WA
    • Posts 33

    Re: remote administration of IIS7

    IIS7 cmdlets do not have the parameters for remote machine connection. You should use Powershell remoting.

    Here is the example of using the latest Powershell version's remoting, remote machine name is jhkim-vm2k8-x86 in this example and both local and remote machine should have IIS powershell provider and the latest powershell version:

    PS IIS:\> enter-pssession jhkim-vm2k8-x86
    [jhkim-vm2k8-x86]: PS IIS:\> dir Name
    ----
    Sites
    AppPools
    SslBindings  
    [jhkim-vm2k8-x86]: PS IIS:\> cd sites
    [jhkim-vm2k8-x86]: PS IIS:\Sites> dir 
    Name             ID   State      Physical Path                  Bindings
    ----             --   -----      -------------                  --------
    Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot  http *:80:  
    [jhkim-vm2k8-x86]: PS IIS:\Sites> Stop-WebItem '.\Default Web Site'
    [jhkim-vm2k8-x86]: PS IIS:\Sites> dir 
    Name             ID   State      Physical Path                  Bindings
    ----             --   -----      -------------                  --------
    Default Web Site 1    Stopped    %SystemDrive%\inetpub\wwwroot  http *:80:  
    [jhkim-vm2k8-x86]: PS IIS:\Sites> Start-WebItem '.\Default Web Site'
    [jhkim-vm2k8-x86]: PS IIS:\Sites> dir 
    Name             ID   State      Physical Path                  Bindings
    ----             --   -----      -------------                  --------
    Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot  http *:80: 
    Jeong Hwan Kim
Page 1 of 1 (2 items)
Microsoft Communities