Automating the world one-liner at a time…
Attached is a zip file which contains the PowerPoint slides and demo scripts for my SW09 Extending PowerShell/Mananaging a Production WebSite using PowerShell talk that I'm about to give at MMS2007.
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
Thanks for the material, for those of us that couldn't make it to MMS this year it's very appreciated!!
Hey Jeffrey, thanks for recognizing PSCX in your presentation!
Here’s the slidedecks from the Windows PowerShell sessions at MMS 2007… MMS2007: Managing
Apologies in advance if I need to send this to another place/forum, but I stumbled on your code while looking for a solution for this problem:
I have an ICustomTypeProvider to wrap data rows in tables in a "MetaDatabase". I want PowerShell to be able to access and modify the data in the database. I create a PSObject for a row of data in a table and want to add the columns as PSProperties (read/writable).
I found a nice artice (http://www.iis.net/1211/SinglePageArticle.ashx) that shows how to use PSCodeProperty. But I am stuck with the fact that the PSCodeProperty constructor expects a getter/setter method. I don't have a single getter/setter for the different columns of my row.
I think I need an additional parameter in the PSCodeProperty constructor that allows me to specify on which object (which PropertyDescriptor in my ICustomTypeProvider) the setter/getter should be called.
Am I just overlooking something or is wrapping an ICustomTypeProvider in a PSObject just not currently possible?
driverwriter at mac dot com
Correction for the I think I need... part:
I think I need an additional PSProperty constructor that takes a System.ComponentModel.PropertyDescriptor argument.
And I see no way to work around that other than using PSNoteProperty and giving up on the binding or actually JIT creating an assembly to get real classes wih real properties for the current types in my MetaDatabase :(