Safe use of Update-FormatData?
- by Steve B
In a custom PowerShell module, I have at the top of my module definition this code:
Update-FormatData -AppendPath (Join-Path $psscriptroot "*.ps1xml")
This is working fine as all .ps1xml files are loaded.
However, the module is sometimes loaded using Import-Module MyModule -Force (actually, this is in the install script of the module).
In this…