1
を実行中のPowerShell ISEにメッセージを見たいと思って私は「&」演算子を使用していたときに、それはいくつかのウィンドウの.exeツールを実行しますが、上でこのPowerShellスクリプトが.exeの
Write-output `n "\\Latest Modified Mobile file is"
$dir = "\\[email protected]\sites\peca\PTA Data Sandbox\Shared Documents\Under_review\Regina\Estimates"
$filter="*EstimateImport_Mobile_*.xlsx"
$latest = Get-ChildItem -Path $dir -Filter $filter | Sort-Object LastAccessTime -Descending | Select-Object -First 1
$latest.Name
if($?)
{
"command succeeded"
}
else
{
"command failed"
}
& "C:\PECA Data Estimates Importer\PECA Estimates Importer.exe" import -i $latest.FullName
if($?)
{
"command succeeded"
}
else
{
"command failed"
}
Start-Sleep -s 5
exit
を実行しようとしていますscreen私はメッセージが表示されないので、PowerShell ISEで "Running tool"のようなメッセージを見て、スクリプトがまだ動作していることをユーザに知らせたい。
オリジナルの質問に個人的にコードブロックを編集した後でも、質問者がWrite-Outputを利用していたのを忘れてしまった – gravity
ありがとうございました。 – achillies1987