TODO: Add description (here and on github)
Start from root project directory and use this command:
Import-Module '.\modules\Gucu112.Powershell.Utility\Gucu112.Powershell.Utility.psd1'
You can also load single function:
Import-Module '.\modules\Gucu112.Powershell.PackageManagement\src\New-ModuleScaffold.psm1'
Remember to remove module if you want to reload it:
Remove-Module 'Gucu112.Powershell.Utility' # module name (psd1)
Remove-Module 'New-ModuleScaffold' # function name (psm1)
Run following command from root project directory:
New-ModuleScaffold -Path '.\modules\Gucu112.Powershell.Test'
Run following command from root project directory:
New-ModuleFunction -Name @('New-Thing', 'Get-Thing') -Path '.\modules\Gucu112.Powershell.Test'
Implementation
- Functions
- Package Management
- New-ScriptFileInfo
- Install-Script
- Utility
- Get-Path -Absolute
- ConvertFrom-SecureStringUsingBSTR
- Write-Message
- Get-WindowsIdentity -LoggedIn, -Anonymous
- Package Management
- Enhancements
- Replace
$_
with$PSItem
for better visibility - Change string to ErrorRecord for error collection list
- Try System.Collections.ArrayList as error collection list
- Replace
- Documentation & Unit Tests
- Get-WindowsIdentity
- Test-WindowsIdentity
- Check what will happen when we re-use function across module and import module with -Prefix parameter
- What else?