Instead of testing each Computername it tests only the first listed computer
In the book it says it should test each computer name. If i change the first computer name it only scans the first and works but never goes to the next ones
Please do not post pictures of code or error messages or console output or sample data. Instead you should post the text and format it as code with the code posting icon </>. Thanks in advance.
Do you have computers in your network with the names âWin8â, âwin10â and " * " ?? When you carefully read the error message what you should do always you will notice that it says it couldnât connect to the remote computer. So it tries to check but because there are no computers with these names it throws an error.
It only provides this error and still doesnât check any other iterations
Olaf, Thank you for your patience, Some of these machines do not exist, but the book iâm reading seems to make it seem like it should check each machine name in the list whether or not a error is thrown
Heres a raw quote
Because the Hostname property contains text strings, -ExpandProperty is able to expand those values into plain String objects, which is what -ComputerName wants. This means the following works:
You may try it again as they usually work just as expected. You can even go back and edit your existing posts and correct them.
For your local computer you can omit the parameter -ComputerName and just run the cmdlet as it is without any parameter: (If you want to post code click on the </> icon first and then post your code)