Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

out-file question

$
0
0

I have this code which works.

Get-ADGroup -Filter {name -like "mg.g_drive*"} | Select-Object name | out-file c:\temp\GDrive.txt

Invoke-Item -Path 'c:\temp\GDrive.txt' 

what I'd like to know is why does Out-File create white spaces after each line it writes and how do you prevent that from happening?

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles