A quick little script that I threw together to help out someone who needs to change all the community strings in their environment.
Inspired by: Mass Update Community String - Feature Requests - The Orion Platform - THWACK (solarwinds.com)
The queries above ($SwqlRoQuery
and $SwqlRwQuery)
can be tuned specifically to your needs in your environment. The important thing to know is that any node that's returned from $SwqlRoQuery
will be updated with $NewRoCommunity
and the same applies for the results of $SwqlRwQuery.
Currently the "action" in this script is commented out, so it's in a pseudo-reporting mode. If you'd like to make the changes permanent, uncomment the Set-SwisObject
lines.
Important Limitations
Currently, this does NOT update the Connection profiles used by Network Configuration Manager (NCM). If that's also necessary, let me know in the comments and I'll amend this script with the necessary updates.