ping www.baidu.com >C:/log.txt
$Path = "$env:C:\Users\Administrator\Desktop\test4.txt"
notepad $path
必须有输出到文件的数据
notepad文件才会创建出来
outfile
write-output "hello" | out-file -filepath c:\users\administrator\desktop\test1.txt
write-output
$Path = "C:\Users\Administrator\Desktop\test1.txt"
write-output "hello world" >> $Path
notepad $Path
$Secret = Hello hello world World!
$Secret | Out-File -FilePath $Path
write-output "hello again" >> $Path