首页 > 系统相关 >WDS+MDT网络启动自动部署windows(十八)MDT 移动OU组织单位

WDS+MDT网络启动自动部署windows(十八)MDT 移动OU组织单位

时间:2024-05-13 18:52:55浏览次数:18  
标签:10 计算机 windows Windows WDS OU MDT 客户端

简介

加入域时,如果计算机已存在,且OU设置不一致,可能会导致计算机孤立。

使用 Windows 10 (Windows 10) 刷新 Windows 7 计算机 - Windows 10 |Microsoft学习

在刷新过程中,部署共享规则中指定的域加入详细信息将用于将计算机重新加入域。如果 Windows 7 客户端在与 MachineObjectOU 指定的 OU 不同的 OU 中进行域 jonied,则域加入过程最初将失败,然后在不指定 OU 的情况下重试。如果指定的域帐户(例如:MDT_JD)具有限制为特定 OU 的权限,则域加入最终将失败,刷新过程将继续进行,并且客户端计算机对象将在 Active Directory 中孤立。在当前指南中,计算机对象应位于 Contoso > Computers > Workstations 中。 使用 Active Directory 用户和计算机控制台查看计算机对象的位置,并在需要时移动它们。若要诊断 MDT 域加入错误,请参阅客户端计算机上 C:\Windows\Temp\DeploymentLogs 目录中的ZTIDomainJoin.log。

即使我们全新安装,也会有这样的问题。

解决方案

型号有个大佬给出了一个补丁。

MDT 2013: Moving Computers Into Correct OU on AD Join – the STONYWALL blog

代码

将计算机移入正确的OU

# Script to move the computer object in AD to the OU supplied as a variable.
# Place powershell script in %ScriptRoot% (DeploymentShare\Scripts\) folder.
# Example Command line: Powershell.exe -NoProfile -ExecutionPolicy bypass -file MoveToOU.ps1 "%MachineObjectOU%"

$OU = $args[0]

try {
    $CompDN = ([ADSISEARCHER]"sAMAccountName=$($env:COMPUTERNAME)$").FindOne().Path
    $CompObj = [ADSI]"$CompDN"
    $CompObj.psbase.MoveTo([ADSI]”LDAP://$($OU)”)
}
catch {
    $_.Exception.Message ; Exit 1
}

实验记录

测试换组织单位的安装结果。

该计算机目前在技术部,数据库我改成了技术组,重装一下看看,自动进入哪个组织单位OU

 

 

标签:10,计算机,windows,Windows,WDS,OU,MDT,客户端
From: https://www.cnblogs.com/jackadam/p/18189782

相关文章

  • Windows Basics - Finding Files on Your Computer Back to Tutorial
     everything 推荐用这个工具搜索文件 FindingfilesonyourcomputerInthepreviouslesson,wetalkedabouthowfolderscanhelptokeepyourfilesorganized.However,theremaybetimeswhenyouhavetroublefindingacertainfile.Ifthishappenstoyou......
  • Windows Basics - Common Computer Tasks
    CommoncomputertasksLearninghowtouseacomputercanfeeloverwhelmingattimes.Fortunately,therearesomecommoncomputerskillsthatwillworkthesamewayinalmostanysituation.Onceyoulearnhowtousetheseskills,you'llbeabletouse......
  • Windows Basics - Adjusting Your Settings
     AdjustingyoursettingsAtsomepoint,youmaywanttoadjustyourcomputer'ssettings.Forexample,youmightwanttochangeyourdesktopbackgroundormodifyyourInternetsettings.YoucanchangethesesettingsandmorefromtheControlPanel控制......
  • Windows Basics - Working with Files
     WorkingwithfilesUnderstandinghowtoworkwithfilesandfoldersisanimportantpartofusingyourcomputer.Onceyouunderstandhowfilesandfolderwork,you'llusethemallthetime.Inthislesson,we'llshowyoutheabsolutebasicsof......
  • Using Windows
    UsingWindows2NavigatingWindowsLearnhowtonavigateWindows.3WorkingwithFilesLearnhowtousetheWindowsfilesystemtoworkwithfilesmoreeasily.4FindingFilesonYourComputerUsethesetipstofindfilesonyourcomp......
  • Windows Basics - Navigating Windows
     NavigatingWindowsWhetheryou'renewtocomputersorjustWindows,it'simportanttolearnthebasicsofusingyourcomputer.Ifitallseemsalittleoverwhelmingrightnow,don'tworry!We'lltakeyouthroughitstepbystepands......
  • Windows编程系列:PE文件结构
    最近在参考OpenShell为任务栏设置图片背景时,发现里面使用了IATHook,这一块没有接触过,去查资料的时候发现IATHook需要对PE文件结构有一定的了解,索性将PE文件结构的资料找出来,系统学习一下。 PE文件结构PortableExecutable(PE),可移植的可执行文件。在Windows平台下,所有的可执......
  • 使用python在windows系统操作快捷方式
    其实问题是由上一篇文章(https://www.cnblogs.com/anpengapple/p/18179353)的结尾引出来的。不需要了解背景的话,我现在需要做的是,右键打开桌面上的chrome快捷方式的属性,在目标的后面增加一个参数。我不想傻傻地手动添加,想交给程序来处理。 首先需要简单来说一下,windows的快捷方式......
  • 【Python】模拟windows文件名排序(自动处理文件名中有数字类型排序)
    实现了一种模拟windows排序的python方法,其排序规则为:不处理浮点数特殊字符(如:&、$、#等)排在数字和字母之前;数字优先于字母排序;数字是连着的整数,应该按照整数进行排序;小写字母排在大写字母前面;英文字符按字母表顺序排序; defcustom_sort_key(str_value):digita......
  • Windows中常用的硬盘检测工具包括:
    Windows中常用的硬盘检测工具包括:Windows自带工具:磁盘检查工具(Chkdsk):可用于检查和修复文件系统错误和硬盘坏道。磁盘碎片整理器(DefragmentandOptimizeDrives):可用于优化磁盘性能,整理碎片文件。第三方工具:CrystalDiskInfo:提供硬盘的健康状态和性能信息,包括温度......