Forum Discussion
Keith732
Feb 15, 2019Copper Contributor
Script to create a text file
All, I am looking to run the below one liner and have it create a txt file on the currently logged in user's desktop. When it runs an error is returned. Any suggestions on how to resolve the error w...
- Feb 17, 2019
Try using some bracketing:
get-netipaddress | format-table > $($env:userprofile + '\Desktop\info.txt')
You should also avoid using Format-Table when writing/exporting to a file.
VasilMichev
Feb 17, 2019MVP
Try using some bracketing:
get-netipaddress | format-table > $($env:userprofile + '\Desktop\info.txt')
You should also avoid using Format-Table when writing/exporting to a file.