yakiimonster
7/27/2018 - 3:10 AM

初期スニペット

# スクリプト自身のパスを取得
$psPath = (Split-Path $MyInvocation.MyCommand.Path -Parent)

# ログファイルのパス
$logPath = "$psPath\$($(Get-Item $MyInvocation.MyCommand.Path).BaseName).log"

# ログファイルへの書き込み
##Set-Content  -Path $logPath -Value ""


# 新しいPSバージョンの場合は下記でOK

$PSScriptRoot