I’m really enjoying getting stuck into powershell at the moment, im creating a tool (little project) to show login info for a particular PC. It works when i get the user to input the PC’s Name, but what i ideally want, is all of the PC’s to list in a gridview, then they can filter themselves,
I have the code working, but my loop is giving me "one or more computer names are not valid. IF you are trying to pass a URI use the -ConnectionURI parameter…
Invoke-Command will take a list of computernames and iterate through them itself, so you do not need to use the foreach. Also, With the Select, you don’t get a clean list of computernames. Try
Thank you for looking at this, Aleksandras, what i ideally wanted, was all of the computers to be in one GridView, with the ability to filter / search etc, rather than have to put in the specific computer name into a variable before the search. I imagine i would need to almost insert them as rows into the existing gridview?