I built the code with a bit of a brute force design. The dir -recurse | remove command clears the local servers list completely, and I rebuild the list again.
I could have done it like that, but this code is part of the monitoring & registration toolkit my collegues and I have written. I found it more convenient to...