7

Given:

PS C:\work> cat .\aclfile
e 7 2 2 d 2 7 6 5 c c c 6 9 3 0 8 5 8 e 5 e 8 7 1 c 1 2 d 7 3 c _ 1 1 4 e 5 6 e b - b 5 1 8 - 4 6 1 2 - 9 d b a - 7 c 6 6 2 5 f 6 c 5 3 1

 D : A I ( A ; ; F A ; ; ; S Y ) ( A ; ; F A ; ; ; B A ) ( A ; ; F R ; ; ; S - 1 - 5 - 5 - 0 - 9 7 3 4 9 ) ( A ; ; F R ; ; ; S - 1 - 5 - 2 1 - 2 0 2 0 4 5 9 8 2 - 2 2 3 5 5 2 7 6 6 3 - 5 2 2 7 6 5 8 3 8 - 1 0 0 0 )

Wanted:

PS C:\work> something .\aclfile
e722d2765ccc6930858e5e871c12d73c_114e56eb-b518-4612-9dba-7c6625f6c531

D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;FR;;;S-1-5-5-0-97349)(A;;FR;;;S-1-5-21-202045982-2235527663-522765838-1000)

How can I do it?

Thanks.

mark
  • 59,016
  • 79
  • 296
  • 580

1 Answers1

7

try:

PS C:\work> cat .\aclfile -encoding UTF8 # or String, Unicode, Byte,
 BigEndianUnicode,  UTF7, Ascii
Jon Schneider
  • 25,758
  • 23
  • 142
  • 170
CB.
  • 58,865
  • 9
  • 159
  • 159
  • 4
    If it's UTF16 (LE) use `-Encoding Unicode`. If it's UTF16 (BE) use `-Encoding BigEndianUnicode`. If there is a BOM, you can use this little function to detect which: http://stackoverflow.com/questions/9121579/powershell-out-file-prevent-encoding-changes – Andy Arismendi Mar 28 '12 at 21:23
  • 2
    Just wanted to point out that the `-Encoding` parameter for `cat` (aka `Get-Content`) is missing from the [official documentation page](http://technet.microsoft.com/en-us/library/dd347719.aspx) for PowerShell 2.0. It was added as community content back in 2009 (look near the bottom of the page). – Michael Sorens Mar 29 '12 at 16:37