Automating the world one-liner at a time…
I showed my Start-Demo script to my wife and she wasn't impressed J. She gave me some good ideas about how to make it better so I've updated the script and attached it to this entry. The changes are:
Jeffrey Snover [MSFT]Windows PowerShell/MMC ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
so.... when's your wife going to start writing some of these blogs :P
During my webcast on 5/3/2007 I used jeffrey's start-demo script to run my powershell demos. Lot of folks
PS C:\temp>.\start-demo.ps1 .\someotherdemo.txt
Get-Content : Cannot find path 'C:\temp\demo.txt' because it does not exist.
At C:\temp\start-demo.ps1:6 char:24
+ $_lines = Get-Content <<<< $file
<Demo [.\demo.txt] Started>
<Demo Complete 0 Minutes and 0 Seconds>
03.06.2007 14:47:00
Apparently it does not accept the command line parameter to take another file as input. Did I miss something important?
Thanks Jeffrey!
(Feedback: the old Start-Demo.ps1 did not call Start-Demo at the end of the script hence did not work as expected for those who like to call it on the fly instead of loading from profile)
I most be doing something wrong or don't understand how to run the cmdlet. First, I have to set the function (can't run it from the ps> as an *.ps1) then I can do anything else except executing the cmdlet. What are the requierement to run the cmdlet?
A while ago I wrote a script START-DEMO which I use to give demos (You can get the latest/greatest copy
Does each command in the demo file have to be on a separate line? I tried with the following in demo.txt, but it leads to errors:
"starting"
1, 2, 3 | foreach {
$_
}
"done"
Welcome to CTP3! There are just an amazing amount of really important features in V2 but the one I want