You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the module has already been loaded and is then loaded again - for instance, by a script that has the import-module command embedded in it - then the errors shown below are produced.
Update-FormatData : There were errors in loading the format data file:
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSjob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
Microsoft.PowerShell, C:\Users\greenwt\Documents\WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml : File skipped because it was already present from "Microsoft.PowerShell".
The errors are produced by the two commands shown below in PoshRSJob.psm1:
#region Format and Type Data
Update-FormatData "$ScriptPath\TypeData\PoshRSJob.Format.ps1xml"
Update-TypeData "$ScriptPath\TypeData\PoshRSJob.Types.ps1xml"
#endregion Format and Type Data
The text was updated successfully, but these errors were encountered:
For reasons I don't understand, try/catch hasn't worked here. Really no idea why. I did find using -erroraction SilentlyContinue works, but that's not ideal either.
I don't really know of a good way to get around this in V2. I suppose -ErrorAction SilentlyContinue might have to be the answer. I need to look at this in DotPeek and see how it works in V3.
Another way to do this is to define a variable after the Update commands and only do the update if the variable isn't defined. Doesn't give you a means to -Force an update of the type files, but then again since I don't think there's a command for uninstalling the type files, I think a PowerShell restart is necessary anyway in that case.
If the module has already been loaded and is then loaded again - for instance, by a script that has the import-module command embedded in it - then the errors shown below are produced.
Another quick way to reproduce it:
The errors are produced by the two commands shown below in PoshRSJob.psm1:
The text was updated successfully, but these errors were encountered: