Reputation: 2959
I am new to powershell and I am playing around with it.
PS C:\PowerShell> New-Item C:\PowerShell\test.ps1 -type file -force -value "Ping jay"
I want to add Ping google.com below ping jay When I run the script it pings jay which is a pc here then after it completes I want it to ping google.com
Upvotes: 2
Views: 315
Reputation: 5560
the Semicolon is the line seperator in powershell:
New-Item C:\PowerShell\test.ps1 -type file -force -value "Ping jay ; Ping google.com"
Upvotes: 0