troubleshooting Question

Redact powershell output

Avatar of Rich Rumble
Rich RumbleFlag for United States of America asked on
10 Comments1 Solution186 ViewsLast Modified:
I'd like to change every 3-4, 7-8, 11-12, 15-16... character in a line of output into two X's.
abcdefghijklmnopqrstuvwxyz  -->abXXefXXijXXmnXXqrXXuvXXyz
Get-CimInstance Win32_OperatingSystem |FL
SystemDirectory : C:\windows\system32
Organization    :
BuildNumber     : 7601
RegisteredUser  : Example User
SerialNumber    : 00392-918-5000002-888888
Version         : 6.1.7601

Get-CimInstance Win32_OperatingSystem |FL

SystemDirectory : C:XXinXXwsXXysXXm3X
Organization    : ExXXplXXcoXX
BuildNumber     : 76XX
RegisteredUser  : ExXXplXXUsXX
SerialNumber    : 00XX2-XX8-XX00XX2-XX88XX
Version         : 6.XX76XX
It seems simple, but the solution is eluding me.
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros