I am trying to get the host names of all computers in a specific OU to a text file. My initial thought was:
ds query computer OU=computers.... | dsget computer -samid | find "$" > file.txt
I am doing the find "$" to remove the first and last line in the text file. My problem is there is always a $ at the end of the names and I can't figure out how to remove it before or after the redirect.
I am sure I am going about this all wrong or just can't figure out the simple command that will exclude the $ from the redirect
Microsoft server 2K8 environment