Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将C#对象返回到PowerShell_C#_Windows_Powershell_Active Directory - Fatal编程技术网

将C#对象返回到PowerShell

将C#对象返回到PowerShell,c#,windows,powershell,active-directory,C#,Windows,Powershell,Active Directory,我需要脚本一个PowerShell脚本,它正在清理一些广告组。据我所知,可以将C#代码实现到PowerShell脚本中,也可以在C#代码中使用PowerShell对象,但方式不同 我想用C#编写一个小脚本,用于检索组的“真实”用户对象,因为某些迁移过程中存在一些重复,我需要检测“真实”用户对象 那么,有可能在PowerShell中检索C#对象并使用它吗?我只能以不同的方式找到解决方案 致以最诚挚的问候您如何尝试检测“真实”物体?PowerShell功能非常强大(因此得名),我发现我几乎不需要使用

我需要脚本一个PowerShell脚本,它正在清理一些广告组。据我所知,可以将C#代码实现到PowerShell脚本中,也可以在C#代码中使用PowerShell对象,但方式不同

我想用C#编写一个小脚本,用于检索组的“真实”用户对象,因为某些迁移过程中存在一些重复,我需要检测“真实”用户对象

那么,有可能在PowerShell中检索C#对象并使用它吗?我只能以不同的方式找到解决方案


致以最诚挚的问候

您如何尝试检测“真实”物体?PowerShell功能非常强大(因此得名),我发现我几乎不需要使用需要使用C#、VBScript或其他非PowerShell工具的AD。我不明白你的问题:我在PowerShell中得到的大多数项要么是PSOBJECT要么是.Net对象(PSOBJECT当然也是.Net对象).C#中的对象和PowerShell中的对象没有区别。C#和PowerShell都使用.NET对象,对象可以在两个系统之间自由传递。