2
私はpowershellを初めて使用しています。私はそれを試しています。powershellに2行追加する
PS C:\PowerShell> New-Item C:\PowerShell\test.ps1 -type file -force -value "Ping jay"
は、私はそれがgoogle.com
私はpowershellを初めて使用しています。私はそれを試しています。powershellに2行追加する
PS C:\PowerShell> New-Item C:\PowerShell\test.ps1 -type file -force -value "Ping jay"
は、私はそれがgoogle.com
"ping google.com" | add-content C:\PowerShell\test.ps1
セミコロンは、PowerShellのラインセパレーターです:
New-Item C:\PowerShell\test.ps1 -type file -force -value "Ping jay ; Ping google.com"
はそれを手に入れました。新しいアイテムC:\ PowerShell \ test.ps1タイプファイル-force -value "ping google.com" – user770022
追加コンテンツC:\ PowerShell \ test.ps1 "nPing jay" – user770022