如何导出和导入AD用户、组和组成员资格?

发布于 2024-09-18 12:14:13 字数 427 浏览 8 评论 0原文

你好, 我想使用 csvde 将我的 Active Directory 用户、组和组成员身份从一个 DC 复制到另一个 DC,其中除了域和计算机的名称外,这些计算机是相同的。 请注意,每个服务器都是一个 DC,并且它本身是域的唯一成员。 我用于导出的命令是:

csvde -f C:\exportAD.csv -m -n -o "primaryGroupID,lockoutTime" -j C:\Logs\

然后编辑 csv 文件,删除几行不会导入的行,并更改域和计算机名称,然后使用以下命令将其导入到第二台计算机上:

csvde -i -f C:\exportAD.csv -k -j C:\Logs\

但是,这不是组成员身份存在于原著中。

有什么想法吗?

-弗林克

Hallo,
I want to copy my Active Directory Users, Groups and Group Memberships from one DC to another using csvde, where the machines are identical except for the only the name of the Domain and Machine.
Note that each server is a DC and itself is the only member of the domain.
The command I am using for export is:

csvde -f C:\exportAD.csv -m -n -o "primaryGroupID,lockoutTime" -j C:\Logs\

I then edit the csv file, deleting a few lines which will not import, and changing the Domain and Machine name, then import it on the second machine using:

csvde -i -f C:\exportAD.csv -k -j C:\Logs\

However, this does not the group memberships present in the original.

Any ideas?

-Frink

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冰火雁神 2024-09-25 12:14:13
$Groups = Get-ADGroup -Filter * -SearchBase "DC=<DC Path>"
$Results = foreach( $Group in $Groups ){    
    Get-ADGroupMember -Identity $Group | foreach {    
        [pscustomobject]@{    
            GroupName = $Group.Name    
            Name = $_.Name    
            }    
        }    
    }    
$Results
$Groups = Get-ADGroup -Filter * -SearchBase "DC=<DC Path>"
$Results = foreach( $Group in $Groups ){    
    Get-ADGroupMember -Identity $Group | foreach {    
        [pscustomobject]@{    
            GroupName = $Group.Name    
            Name = $_.Name    
            }    
        }    
    }    
$Results
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文