none
PowerShell and Service Dependencies

    Dotaz

  • Hi,

    I was experimenting with listing service dependencies using something like this:

    (get-item SQLSERVER:\SQL\servername).ManagedComputer.Services['MSSQL$instancename'].Dependencies

    The result is always "System.String[]".  I've tried other services (e.g., agent) with the same result.  It seems to provide the type rather than the data. 

    What I would like to actually find is the list of services that depend upon a service.  Should I want to restart a service, I would like to have a script stop and start dependent services if required.  Any advice? 

    Thanks,
    Randy


    Randy in Marin

    15. března 2012 20:03

Odpovědi