• Thanks Michael, great scripts. After checking if the Server needs a reboot or if there any pending reboots, If I need to just restart services on a server and not do a complete restart of the server, can I just use the cmdlet

    Restart-Service <service-name> -PassThru

    Please let me know ?

     

     

    Thanks again

  • Thank you all for the useful suggestions, I am new to Powershell.

    Tried running code suggested by David but I am getting errors for the Regex as shown below, any suggestions

     

    parsing “[ >](?w+)s+(?w+)s+(?d+)s+?(?w+)” – Unrecognized grouping construct.
    At line:4 char:9
    + $_ -match ‘[ >](?w+)s+(?w+)s+(?d+)s+?(?w+)’
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (:) [], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException

    qprocess : Invalid parameter(s)
    At line:10 char:20
    + … ocessList = qprocess /id:$ResultHash[‘SessionID’] /server:$Computer | …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (Invalid parameter(s):String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

  • Hello,

    I am looking for a PowerShell script to restart a service on an application server.  Currently I am having a Windows  batch file which stops the service but does not restart it. I have searched for a sample script on the internet but could not find any script which restarts a service on an application server. I would appreciate if someone could provide me a sample script which I could use to tweak.

    Thanks,
    Faiz

  • Hello experts ,

    I am looking for a PowerShell script which lets me get user information from all connected servers across the network. Please let me know if there is any such script which I can use or may be tweak a little bit.

    We need a simple report that contains information like this:

    User ID, Session_ID , Local Client_Host_ID, Remote Server_ID_Connected to, brief_descp_Activity performed

    Regards,
    Faiz

     

  • Faiz Qureshi posted an update in the group Group logo of PowerShellPowerShell 6 months ago

    Hello Experts ,
    I am looking for help with a Powershell script which lets me see all the users connected across the Network of servers. Please let me know if there is any such script which I can use or may be tweak a little bit.

    We need a simple report like

    User ID, Session_ID , Local Client_Host_ID, Remote Server_ID_Connected to, brief_descp_Activity performed

    avatar
  • Faiz Qureshi became a registered member 6 months ago

    avatar
© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account