scanstate.exe yy是什么么

XP升级到7,以照传统的方法,需要我们的IT管理人员拿着光盘到那里进行自定义安装,或者是用Ghost镜像进行安装,不管用哪种方法,在安装Win7之前,都需要先将C盘中的一些重要的Word文档、文档等等进行备份,而且这些文档往往是分散在C盘下面很多不同的之中,另外还有诸如IE收藏夹、Outlook邮件数据等等,仅仅是一两台还好,如果公司有50台甚至上百台XP需要升级,那么对于我们的IT管理人员来说这个工作量也就太大了,但是这么繁琐的事情,对于MDT2012来说,只需要简单的点几下鼠标就即可以轻松的搞定。MDT2012通过调用USMT5(用户状态迁移工具)中的Scanstate扫描并读取客户端上的用户状态(用户状态包含了文档、应用、收藏夹数据、Outlook数据等等),并将其备份,待Win7成功部署至客户端后,再将这些用户状态还原到客户端上,整个过程都是自动进行,大大减轻了IT管理人员的工作量,下面我们就一起来体验这个升级过程&以下是一台已经加入到域中的XP客户端,为了验证升级结果,在升级前,我以rb用户登录系统,首先在C盘各个地方放置一些文档,下图是我在上放置的两个Word文档,01和02&然后在我的文档文件夹中放置了两个Excel文档,03和04&接下来是做一些个性化设置,这里我将IE首页设置为&在IE收藏夹中添加两个网址,分别是网易和51CTO&配置好Outlook 2003的电子邮箱账户&向这个邮箱发送两封测试用的邮件&好了,我们最后来验证系统升级后,以上的文档和个性化设置会不会被成功迁移。在升级前还要对MDT稍做设置&一、创建存放用户状态的共享文件夹在服务器cqdep的D盘上新建一个文件夹UserData,并将它共享,共享后的访问路径是\\cqdep\\UserData,USMT从客户端捕获到的用户状态,就会通过网络到此文件夹中&赋予Everyone组完全控制权限&二、修改部署参数打开【MDT Deployment Share】节点的属性&切换到【Rules】选项卡,升级部署需要对一些参数进行修改将 DeploymentType=NewComputer 修改为 DeploymentType=Refresh ,这表示此次部署类型为更新,这里简单的说一下为什么是Refresh而不是Upgrade,因为XP不能直接升级到Win7,只有Vista才可以,在XP上插入Win7光盘后只能选择自定义安装,这种方式其实就相当于重新安装,本次升级过程是按【备份用户状态-重新安装Win7-还原用户状态】,所以这里是用Refresh&将 UserDataLocation=NONE 修改为 UserDataLocation= ,表示用户状态数据将保存到一个网络位置然后将以下内容附加到最后 ;用户状态迁移 SkipComputerBackup=YES&&&&&&&&&&&&&&& //跳过用户状态备份向导页 ScanStateArgs=/v:5 /o /c&&&&&&&&&&&&&&&&&& //读取用户状态 LoadStateArgs=/v:5 /c /lac /lae&&&&&&& //恢复用户状态 UDShare=\\cqdep\UserData&&&&&&&&&&&& //用户状态保存路径 UDDir=%OSDComputerName%&&&&&& //用户状态保存目录,这个目录以当前计算机的名称命名&参数解释
指定日志的详细程度,值可以是0-15
覆盖任何现有数据
遇到错误也继续运行
迁移的目标客户机上没有源客户机上的用户时,它会自动在目标客户机上创建用户,但这个用户是禁用的
启用已使用 /lac 创建的帐户
&&&&&&&更新部署参数&三、客户端执行升级安装从rb这台XP客户端上访问\\cqdep\d$\DeploymentShare\Scripts,执行LiteTouch.vbs&在弹出的向导中选择第三项,重新安装Windows 7&这里我保持原有的计算机名称(可以在Rules中将SkipComputerName=NO修改为SkipComputerName=YES,跳过这个步骤)&选择,就是我们的激活程序&单击Next后,就可以看到脚本会去执行捕获用户状态、应用PE等操作&来到服务器cqdep上,发现用户状态已经被捕获到UserData目录中了&重启之后会自动加载PE安装Windows 7(升级安装不用重启后人工按F12加载WDS启动镜像)&第一次进入系统时会自动恢复用户状态,恢复后根据我们在Rules中设置的规则,会进行重启&四、验证升级后的用户状态通过用户rb登录,首先验证桌面&验证我的文档文件夹&验证IE主页和收藏夹&验证Outlook配置参数,当前的Outlook版本为2010&验证Outlook中的邮件&可以看到升级到Windows 7后,所有的文档、个性化设置、应用程序设置等都成功的进行了迁移,非常强大&五、排除部分用户状态迁移现再可能有会说,你这样升级后是将所有的数据都迁移了,可是我并不想迁移桌面上的文档和Outlook数据,能做到吗?这个当然可以,通过USMT中的Scanstate工具生成Config.xml文件,不需要迁移的文档或者应用程序设置都可以在Config.xml文件中进行排除将cqdep上的用户状态迁移工具(USMT5)复制到一台XP客户端上,USMT5分为x86和x64两个平台,XP通常为32位的,那么这里就复制x86\USMT5到XP客户端上的D盘&从命令行切换到D:\USMT5,执行下面的命令生成Config.xmlScanstate.exe /i:migapp.xml /i:miguser.xml /genconfig:config.xml /v:13&将生成的Config.xml复制到服务器cqdep上的USMT5目录中,注意这次是x64\USMT5&编辑Config.xml文件,可以看到每一个组件后面都跟有migrate=yes,将它改为migrate=no,即表示不迁移这个组件,从下图中大家能看出我排除的是哪两个组件吧&在Rules设置中,将用户状态迁移下面的内容修改为如下内容;用户状态迁移 SkipComputerBackup=YES LoadStateArgs=/v:5 /c /lac /lae UDShare=\\cqdep\UserData UDDir=%OSDComputerName% USMTMigFiles1=Migapp.xml USMTMigFiles2=Miguser.xml USMTConfigFile=Config.xml与之前不同的是去掉了ScanStateArgs=/v:5 /o /c,取而代之的是通过USMT中的两个规则模板Miguser.xml与Migapp.xml,来决定迁移哪些文档和应用程序设置,而Config.xml则指定要从迁移中排除的文档或应用程序设置&修改后确定,然后更新部署共享参数,按照前面的升级方法,从XP上运行LiteTouch.vbs,升级成功后再进行验证,你会发现此次升级后,桌面上的两个Word文档01和02将不会出现,还有Outlook也会是未设置状态What is the ContentLibraryCleanup tool and how can I use it ?
Introduction
Microsoft have released a new version of the ContentLibraryCleanup tool for System Center Configuration Manager in the latest . By upgrading your Technical Preview release to version 1701 you can start testing the new features of the tool today.
Some of these new features were
requested on ,
a forum where people can ask for changes to Configuration Manager (and other products), and then get others to vote their idea up, and if enough interest is seen, Microsoft Product Group take note and hopefully implement the idea. If you haven’t started using UserVoice yet, I highly recommend it, it’s the best way to give feedback about changes you’d like to see in a product.
About the tool
This tool first surfaced in . It’s designed to find content that is broken in one form or another on your distribution points (for whatever reason) and to alert you, or to free up space by deleting that broken content. It was designed to be cautious, if it doesn’t know exactly what is going on it will quit rather than accidentally delete files.
Note: The tool is currently in Technical Preview so avoid running it in a Production environment.
You can run the tool from the Primary site, or if speed is important, run it from the distribution point you are targeting. In fact, you can run the tool from anywhere that can do remote WMI calls to the provider/Distribution Point and SMB calls to the Distribution Point.
It can be found in the following location (after you’ve installed the latest Technical Preview release), where &driveletter& is the drive letter that you installed ConfigMgr on,
&driveletter&\Program Files\Microsoft Configuration Manager\cd.latest\SMSSETUP\TOOLS\ContentLibraryCleanup
Note that you’ll need appropriate access to the cd.latest folder, so press Continue in the UAC prompt.
What switches does it use ?
By opening that location with a command prompt and typing the following command:
ContentLibraryCleanup.exe /?
you can see the following output:
Usage: ContentLibraryCleanup.exe [/delete] [/q] /dp &Distribution Point FQDN& [/
ps &Primary Site FQDN& /sc &Primary Site Code&] [/log &log file directory&]
/delete (optional) — delete the content, do not print what would be deleted.
/q (optional) — run in quiet mode. Suppress all prompts (assuming delete mode) and do not open log file automatically.
/dp &Distribution Point FQDN& (required) — the FQDN of the target distribution point.
/ps &Primary Site FQDN& (optional*) — the FQDN of the primary site. *Required if the distribution point is on a secondary site.
/sc &Primary Site Code& (optional*) — the site code of the primary site. *Required if the distribution point is on a secondary site.
/log &log file directory& (optional) — the directory to place log files in.
Can be a network share. If not specified, the temp folder is used.
Note: By using the /q switch, this also assumes you
answer ‘a’ to deleting all found orphaned content in conjunction with /delete.
Testing the tool
So let’s test it.
Note: Make sure to login as a user with Full Administrative access to the distribution point and with the Full Administrator RBAC role (this version of the tool doesn’t check if you are in an ADSG, so make sure you are explicitly a Full Administrator).
Enter the following command (replace the FQDN in bold with your dp FQDN and replace the log folder location with your chosen location), this command will run the tool in What-If mode which doesn’t actually delete anything:
ContentLibraryCleanup.exe /dp cm02.windowsnoob.lab.local /log d:\ContentLibraryCleanupLogs
when prompted about what-if, answer y for yes.
Notice that it tells you how much space it would have saved it you had run it in delete mode. Running the tool also automatically opens the logfile in CMTrace
and that log file will give you details about the following
Orphaned packages
Packages with invalid contents
Orphaned files
Bytes freed if the tool is run in delete mode
Using the /delete switch
Now that you are familiar with the tool it’s time to use it for what it was designed for, so we’ll add the /delete switch.
Note: In the example below, there is NO problem on the distribution point, so no space is available to be freed up.
Enter the following command, notice the /delete switch. Please replace the FQDN in bold with your distribution point FQDN and replace the log folder location with your chosen location:
ContentLibraryCleanup.exe /delete /dp cm02.windowsnoob.lab.local /log d:\ContentLibraryCleanupLogs
answer yes to see the results
and you’ll get a dated log file with the details of what was freed on the dp in question
As there was no problem on this dp, no space was freed.
Deleting Orphaned content
So the above shows what happens when there’s no problem on the dp, but what if there was one or more orphaned files or packages ?
Note: In the example below, there is a problem on the distribution point, so we can free up space.
Let’s see the results of that….in the first check we omit the /delete switch, to see that it correctly identifies the problem, and it does!
next, it opens the log file (which auto-opens)
Next, run the command again but this time add the /delete switch, the red downward pointing arrow points to the orphaned content and prompts you what to do with it…
answering yes to the prompt will delete the orphaned content (or answer a to delete all),
and, now you can see a difference in the log file too…
More info &
Hopefully this new improved tool will help you clean up any unwanted content on your distribution points, and it’s a great improvement and proves that UserVoice works !
thanks to Brandon @ Microsoft for answering my questions !
This entry was posted in , , . Bookmark the .
Recent Posts
Categories& 什么叫强势整理
12345678910
12345678910
瞄股网™-专注于股票行业的门户网站_股票黑马推荐专家
Copyright & 2006 -
客服电话:010-
特此声明:广告商的言论与行为与瞄股网无关!股市有风险,投资需谨慎。

我要回帖

 

随机推荐