Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

help with out-file

$
0
0

hi guys,

need some help with out-file.

im wrting a long script and want a log file 

part of the script:

Text
get-date | Out-file $desktopdir\logs.txt -append
Write-Output "Adding New DNS name:" $Action1.name "With The IP:" $Action1.ip "To The Zone:" $action1.zone_name | out-file $desktopdir\logs.txt -append
the output im getting in the log.txt is:
Text
Adding New DNS name:
saar
With The IP:
1.1.1.1
To The Zone:
lol.com

tried almost everything in order to make it the same line such as : 

Adding new dns name:saar with the ip: 1.1.1.1 to the zone lol.com

need your guys help, im sure its simple but still didnt mange to do that

thx in advance


Viewing all articles
Browse latest Browse all 15370

Trending Articles