09 | Script and manifest modules Jeffrey Snover | Distinguished Engineer & Lead Architect Jason Helmick | Senior Technologist, Concentrated Technology
Module Overview Putting your tools in one place Creating a module manifest Why custom views? Creating and loading a view
Putting your tools in one place Modules – names should consist of letters, number, and underscores – Microsoft modules tend to be only letters. Don’t use spaces in the name. Do not put your modules where Microsoft does, put yours in your PSModulePath. Save as a .PSM1 See demonstration!
Creating a Module Manifest When our module is imported, PowerShell looks for: A module manifest – such as MyTools.psd1 – Note that file name matches the module folder name. A binary module – such as MyTools.Dll A script module – such as MyTools.psm1 New-ModuleManifest See demonstration!
Why Custom Views You can create your own custom views Add your own type name to an object Create an XML view Use the Manifest –FormatsToProcess to attach the view See the Demonstration!
Questions or comments?