Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
The code have an error, it say $myvariable.networkprofile when it should say $allvms.networkprofile.
In any case, the code is basically the same I'm using just with a try and catch, so the result is exactly the same.
Don't take me wrong, I appreciate your answers and your time.
But the code you posted the only thing that does different is running the command inside a try/catch structure, so I know that will not change the result. For sure is a better way to code, but is not what I'm looking for right now.
This topic is 5 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.