Automating the world one-liner at a time…
Attached is a new and improved Start-Demo script. Here is a brief list of the differences:
Enjoy!
Jeffrey Snover [MSFT]Windows Management Partner 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
Would you like to comment the following line:
Invoke-Expression $(".{" + $_lines[$_i] + "}| out-host")
Why not just writing:
Invoke-Expression $_lines[$_i]
It guess it has something to do with output formatting so you 'split' the output of each command by wrapping it in a separate scope so it gets its own formatting applied. But I'm not entirely sure what's going on here, especially the surrounding $() confuses me.
Oh, nice script by the way! ;-)
tia
PingBack from http://www.leedesmond.com/weblog/?p=116
I've used the older versions in a number of demos and they've been really useful. I like the idea of being able to preview the commands - very useful. Thanks
For Maximilian Hanel - Check this post http://blogs.msdn.com/powershell/archive/2007/03/07/invoke-expression.aspx for an explanation of that line of code. You're correct in that it's related to the variable scope.
Thank you to those of you who attended the Powershell session at the December 2007 Premier Briefing event
Hi, thanks for superb script. I am using it a lot and it's my favourite one :)
I only changed one small thing. Because it leaves title unchanged after the end of presentation (with time and command) I added few lines of code to the begin ($originalWinTitle = $Host.UI.RawUI.WindowTitle) and the end/q ($Host.UI.RawUI.WindowTitle = $originalWinTitle)
I have isntalled powershell on 3.0 on WSS 3.0, but I cannot use any WSS 3.0 that is availble with stsadm. Do I need to do something more after PowerShell 2.0 installation?
This demo script is great, thanks
Please browse for sharepoint 2010 features:
www.sqlservermanagementstudio.net/.../sharepoint-2010-features.html