Я написал собственный модуль PowerShell. Мой пользовательский модуль использует SharePoint CMD позволяет. Итак, в моем файле psd1 у меня есть свойство вложенного модуля, например:
NestedModules = @( 'Microsoft.SharePoint.PowerShell',
'.\Modules\MyModule.psd1')
Я получил это от: Модули PowerShell и оснастки
Когда я импортирую этот модуль, я получаю (небольшая часть числа ошибок):
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