by charles00d at 2013-03-05 18:43:38
hi everyone and mvp’sby mjolinor at 2013-03-05 18:51:13
i’ve just started using powershell and really dont know much. i have this code:
@echo off
Powershell -noexit "ipconfig /displaydns | select-string ‘Record Name’ | foreach-object { $.ToString().Split(’ ')[-1] } | Sort | Out-Gridview"
how do i save the output into a txt file format?
thanks
Just trade Out-Gridview for Set-Content or Out-File:by charles00d at 2013-03-05 19:02:58
Powershell -noexit "ipconfig /displaydns | select-string ‘Record Name’ | foreach-object { $.ToString().Split(’ ')[-1] } | Sort | Set-Content c:\somedir\file.txt"
thank you mjolinor you’re a savior wooooooooooooby mjolinor at 2013-03-05 19:23:35
Glad to help! Come back and see us again!