Removing spaces from the left in output

Dear guys,

I hope you are all well and can assist.

I have the following query that works but which am having issues with spaces in the output.

dsquery * "OU=Domain Controllers,DC=test,DC=company,DC=net" -attr name description -filter (objectClass=Computer) -limit 1000 | sort

  serverA   UAE
  server B
  server03    Salzburg, Austria

Notice in the above there are spaces to the left, as if it is indented a couple of spaces.

Is there any way to remove these spaces from the left?

Any help greatly appreciated.
Who is Participating?
Nagendra Pratap SinghConnect With a Mentor Commented:
Redirect this to a text file, you can use word/excel/notepad to replace double space with single or pretty much do anything with text.
Simon336697Author Commented:
Hi there.
Thanks, but i really want to be able to code this, not post execution cleanup.
Simon336697Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.