retrieving user status from a list of servers

Welcome Forums General PowerShell Q&A retrieving user status from a list of servers

This topic contains 2 replies, has 2 voices, and was last updated by

1 year, 7 months ago.

  • Author
  • #74335

    Points: 0
    Rank: Member

    Hi there,

    I am trying to automate the following: First get a server from a text document (query user /server: ....) with a list of servers.
    – If there is a user logged onto the server, skip the server and go to the next one on the list.

    If a user is logged off, push that user's server name and ID number onto a CSV doc and it keeps going throughout the rest of the list.

    I am not sure whether this has been done before or not. I couldn't find any MS docs regarding this if anyone can provide a sample function or suggestion, that would be helpful!

    Thank you very much and please don't hesitate to ask me any questions.

  • #74341

    Points: 741
    Helping Hand
    Rank: Major Contributor

    Russell, that's actually not a free script shop here. What do you have so far? If you have a particular question to a particular problem you have with a particular piece of code you wrote you should post this code snippet here and the error messages you've got.

  • #74390

    Points: 0
    Rank: Member

    @Olaf, my apologies. That question came out entirely wrong. I was actually planning on updating this question with a snippet of the script, however; I forgot. To a large extent, I've already solved this issue, and I am just having issues with foreach loop. I posted it here

    Again, I am really sorry about the lack of effort and clarity in the original question.

The topic ‘retrieving user status from a list of servers’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort