脚本内容
$fileName = "test.txt"
$fileObj = [System.io.File]::Open($fileName,'Open','Read','None')
Write-Host "Press any key to contunue ..."
$null = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
$fileObj .Close()
$fileName = "test.txt"
$fileObj = [System.io.File]::Open($fileName,'Open','Read','None')
Write-Host "Press any key to contunue ..."
$null = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
$fileObj .Close()
本文来自博客园,作者:atq,转载请注明原文链接:https://www.cnblogs.com/atq999/p/14972930.html