For my job, Lansweeper tells me what computers a given user has logged into. I need to find out which of these are currently showing the user logged in. We have a Qwinsta command to see what users are logged into a device. How can I tell PowerShell to run the Qwinsta command on every device showing in Lansweeper for the given user? Seems it should be simple, but I'm scratching my head over here. Any thoughts?
Asked
Active
Viewed 77 times
0
-
2It sounds like you want to write a PS script that 1) runs Lansweeper to generate a list of PCs, then 2) Call Qwinsta in a loop, for every PC in the list. Q: What am I missing? Q: What have you tried so far, and what's "not working"? – paulsm4 May 26 '22 at 21:57
-
That's exactly right. Lansweeper is full of information, so I'm unsure how to fetch each entry of computers logged into. – Jon Shepard May 26 '22 at 22:00
-
1May be an answer in this, read to the bottom: https://www.lansweeper.com/forum/yaf_postsm67670_Powershell-module-for-Lansweeper---Automation.aspx#post67670 – Darin May 26 '22 at 22:27
-
2Depending on how often you need to find out your query above, you could also setup a scheduled report that emails a csv file which is easier to work with than an SQL DB if you're new to scripting - https://www.lansweeper.com/knowledgebase/sending-email-alerts/ – Mike Anthony May 26 '22 at 22:36
-
1Here is an interesting answer where powershell is used to scrape a page from Lansweeper. https://stackoverflow.com/a/46951680/4190564 – Darin May 26 '22 at 22:41