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.
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.
@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.