无法删除 - 外部连接器.. [英] Unable to remove-foreignconnector..

查看:86
本文介绍了无法删除 - 外部连接器..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


您好,


我正在使用C#代码自动化PowerShell。


我无法impliment remove-foreignconnector命令。我正在使用以下代码


Pipeline CreationPipeLine = myRunSpace.CreatePipeline();


命令 myCreationCommand = new 命令 " Remove-ForeignConnector" );


CommandParameter verbParam = new CommandParameter " Identilty" " test" );


myCreationCommand.Parameters.Add (verbParam);



CreationPipeLine.Commands.Add(myCreationCommand);


集合 < PSObject > CreationcommandResults = CreationPipeLine.Invoke();


我是geeting error" 无法调用此函数,因为当前主机未实现它"。 我认为这是由于确认提示。


无论如何将确认提示传递给此命令?



请帮忙。



谢谢


Asawari

解决方案

我收到与Disable-DistributionGroup相同的错误消息,同时传递身份并怀疑确认。

 

Hello,

I am automating PowerShell from C# Code.

I am not able to impliment remove-foreignconnector command. I am using following code

Pipeline CreationPipeLine = myRunSpace.CreatePipeline();

Command myCreationCommand = new Command("Remove-ForeignConnector");

CommandParameter verbParam = new CommandParameter("Identilty", "test");

myCreationCommand.Parameters.Add(verbParam);

 

CreationPipeLine.Commands.Add(myCreationCommand);

Collection<PSObject> CreationcommandResults = CreationPipeLine.Invoke();

I am geeting error "Cannot invoke this function because the current host does not implement it". I think this is due to confirmation prompt. 

 Is there anyway to pass confirmation prompt to this command?

 

Please help.

 

Thanks

Asawari

解决方案

I am getting the same exact error message with Disable-DistributionGroup, also passing Identity and also suspect the confirm.


这篇关于无法删除 - 外部连接器..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆