Undefined object type ServerRSS

5 replies

Last post May 17, 2019 07:10 AM by Jalpa Panchal

  • Undefined object type Server

    May 14, 2019 10:06 PM|jvinicius|LINK

    Hi, folks.

    I'm trying to run some PowerShell scripts, like Start-WebAppPool, for a specific server and I got the following error:

    PS C:\Users\xyz> Start-WebAppPool -Name 'abc'
    Start-WebAppPool : Undefined object type Server.
    Parameter name: nodeName
    At line:1 char:1
    + Start-WebAppPool -Name 'abc'
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Start-WebAppPool], ArgumentException
        + FullyQualifiedErrorId : invalidArgument,Microsoft.IIs.PowerShell.Provider.StartAppPoolCommand

    I have 10 servers and I'm able to run the same command this command in 9 of then. Even when tried to Import-Module WebAdministration it doesn't work.

    Any idea of what's going on?

    Thanks!

  • Re: Undefined object type Server

    May 15, 2019 05:34 AM|Jalpa Panchal|LINK

    Hi,

    Does this user have administrator right? or this user has access to remote iis?

    Regards,

    Jalpa

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: Undefined object type Server

    May 15, 2019 09:28 PM|jvinicius|LINK

    Hi, Jalpa.

    Yes, I have admin rights and remote access to to IIS.

    Thanks,

  • Re: Undefined object type Server

    May 16, 2019 06:43 AM|Jalpa Panchal|LINK

    Hi,

    Try to use the below steps to start and stop the application pool on the remote server:

    1. Run PowerShell as administrator.
    2. Run command:  Import-Module WebAdministration
    3. Run command: Invoke-Command -ComputerName "REMOTE_SERVER" -ScriptBlock { Start-WebAppPool -Name "apppool name" }

     

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: Undefined object type Server

    May 16, 2019 01:10 PM|jvinicius|LINK

    Hi, Jalpa.

    I ran the command from other server and I got the same error.

    Thanks,

  • Re: Undefined object type Server

    May 17, 2019 07:10 AM|Jalpa Panchal|LINK

    Hi,

    Does your all server in the same network? also, check that you enable remote management service in IIS.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.