troubleshooting Question

Duplicate set of characters and add to end of same line using PowerShell

Avatar of Chris Johnsen
Chris Johnsen asked on
1 Comment1 Solution8 ViewsLast Modified:

Using PowerShell need to copy a single line and then paste it self over again right behind it.

Example is that it is a set of keywords that are being dynamically driven and then number is always going to change.  Due to this I need to make an update to one of the script but need to duplicate the number that it is spitting out.






as my example

What I wasn’t is

0000 0000

0001 0001

0002 0002

0003 0003

I tried using

| for each { $_ + “ some value”}| could not get the “some value“ to be correct.

Any help would be great I am sure this is easy and just overlooking something simple.

thank you 

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
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 1 Comment.
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