I have written a custom PowerShell module. My custom module uses SharePoint CMD lets. So in my psd1 file I have a nested module property like:
NestedModules = @( 'Microsoft.SharePoint.PowerShell',
'.\Modules\MyModule.psd1')
I got this from: PowerShell Modules and SnapIns
When I import this module I get (small section of the number of errors):
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData
"Microsoft.Office.Server.Search.Administration.SearchServiceApplication": The member ServiceName is already present.
At line:1 char:1
+ Import-Module Test
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : Module_ImportModuleError,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData
"Microsoft.Office.Server.Search.Administration.SearchService": The member ProcessIdentity is already present.
At line:1 char:1
+ Import-Module Test
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : Module_ImportModuleError,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData
"Microsoft.Office.Server.Search.Administration.SearchService": The member ServiceName is already present.
At line:1 char:1
+ Import-Module Test
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : Module_ImportModuleError,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData
"Microsoft.Office.Server.Search.Administration.Keyword": The member ExpiryDate is already present.
At line:1 char:1
+ Import-Module Test
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : Module_ImportModuleError,Microsoft.PowerShell.Commands.ImportModuleCommand
Import-Module : The following error occurred while loading the extended type data file: Error in TypeData