MDT 2010 - Setting the Computer Description in AD without a webservice
2010-10-29 16:08
721 查看
Posted by: johan
7/21/2010
Quite a few people have asked my how to retrieve the computer description value from the MDT database or the deployment wizard, and then store it in Active Directory as well as on the local machine, system properties. So I decided it was time for a new posting...
This sample does not require a webservice, however, if you don't mind using a webservice, you can always use Maik Kosters execellent guide:
Setting the Computer Description in Active Directory during MDT Deployments
http://myitforum.com/cs2/blogs/maikkoster/archive/2009/12/14/setting-the-computer-description-in-active-directory-during-mdt-deployments.aspx
This article describes the following processes
1. Get the Computer Description value.
2. Store the Description value on the computer object in Active Directory
3. Store the Description value on the system properties of the local computer
Download the sample scripts
Step 1 - Get the Computer Description value.
Built-in to MDT you have two options for this, either by enabling the description feature in the deployment wizard or by storing the value in the MDT database
Option 1 - Enabling the computer description feature in the deployment wizard
Open DeployWiz_Definition_ENU.xml in your favorite editor, search for "Computer Description Format"
Remove the comments () around the paragraph starting with
You can also give your computer a friendly description... see this image
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/20/681277cd377708ac734fc91bd15d3df4.png)
Configure your customsettings.ini with the following (the Description field is on the same pane as Configure the computer name).
[Settings]
Priority=Default
[Default]
OSInstall=Y
SkipComputerName=NO
When you start the deployment wizard the configure computer name screen will look like this:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/20/c8db122bc071713969452dfc064521ba.png)
Option 2 - Setting the value in the MDT database
If you have set the value in the MDT database, you need to either query the ComputerIdentity table (because the built-in view doesnt list the description value), or update the view. In this example I query the ComputerIdentity table directly.
You need to add a custom property into customsettings.ini for the description property, and I selected to also set the ComputerDescription value so that we are consistent with using the wizard which sets that value. Another option is to take care of that in the scripts, checking for either Description or ComputerDescription values, but it's a bit easier simply to setComputerDescription to be the Description value that we get from the database.Configure your customsettings.ini with the following:
[Settings]
Priority=CIdentity, Default
Properties=Description, ComputerDescription
[Default]
OSInstall=Y
ComputerDescription=%Description%
[CIdentity]
SQLServer=MDT01
Instance=SQLEXPRESS
Database=MDT
Netlib=DBNMPNTW
SQLShare=Logs$
Table=ComputerIdentity
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
Step 2 - Store the Description value on the computer object in Active Directory
Download the sample scripts.
Copy ZTISetComputerDescriptionInAD.wsf to the scripts folder in your deployment share.
Create a custom action in the State Restore phase, any place will do, I added the action to the Custom Tasks group. Use the following settings
Type: Run Command Line
Name: Set Computer Description in Active Directory
Command: cscript.exe "%SCRIPTROOT%\ZTISetComputerDescriptionInAD.wsf"
Runas:
Load the user's profile: Selected
Note: The account that you use must have permissions in Active Directory to modify computer object attributes.
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/20/068aeb802176263c8326c7cb82bef751.png)
Step 3 - Store the Description value on the system properties of the local computer
Download the sample scripts.
Copy ZTISetComputerDescriptionLocally.wsf to the scripts folder in your deployment share.
Create a custom action in the State Restore phase, any place will do, I added the action to the Custom Tasks group. Use the following settings
Type: Run Command Line
Name: Set Computer Description Locally
Command: cscript.exe "%SCRIPTROOT%\ZTISetComputerDescriptionLocally.wsf"
/ Johan
7/21/2010
Quite a few people have asked my how to retrieve the computer description value from the MDT database or the deployment wizard, and then store it in Active Directory as well as on the local machine, system properties. So I decided it was time for a new posting...
This sample does not require a webservice, however, if you don't mind using a webservice, you can always use Maik Kosters execellent guide:
Setting the Computer Description in Active Directory during MDT Deployments
http://myitforum.com/cs2/blogs/maikkoster/archive/2009/12/14/setting-the-computer-description-in-active-directory-during-mdt-deployments.aspx
This article describes the following processes
1. Get the Computer Description value.
2. Store the Description value on the computer object in Active Directory
3. Store the Description value on the system properties of the local computer
Download the sample scripts
Step 1 - Get the Computer Description value.
Built-in to MDT you have two options for this, either by enabling the description feature in the deployment wizard or by storing the value in the MDT database
Option 1 - Enabling the computer description feature in the deployment wizard
Open DeployWiz_Definition_ENU.xml in your favorite editor, search for "Computer Description Format"
Remove the comments () around the paragraph starting with
You can also give your computer a friendly description... see this image
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/20/681277cd377708ac734fc91bd15d3df4.png)
Configure your customsettings.ini with the following (the Description field is on the same pane as Configure the computer name).
[Settings]
Priority=Default
[Default]
OSInstall=Y
SkipComputerName=NO
When you start the deployment wizard the configure computer name screen will look like this:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/20/c8db122bc071713969452dfc064521ba.png)
Option 2 - Setting the value in the MDT database
If you have set the value in the MDT database, you need to either query the ComputerIdentity table (because the built-in view doesnt list the description value), or update the view. In this example I query the ComputerIdentity table directly.
You need to add a custom property into customsettings.ini for the description property, and I selected to also set the ComputerDescription value so that we are consistent with using the wizard which sets that value. Another option is to take care of that in the scripts, checking for either Description or ComputerDescription values, but it's a bit easier simply to setComputerDescription to be the Description value that we get from the database.Configure your customsettings.ini with the following:
[Settings]
Priority=CIdentity, Default
Properties=Description, ComputerDescription
[Default]
OSInstall=Y
ComputerDescription=%Description%
[CIdentity]
SQLServer=MDT01
Instance=SQLEXPRESS
Database=MDT
Netlib=DBNMPNTW
SQLShare=Logs$
Table=ComputerIdentity
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR
Step 2 - Store the Description value on the computer object in Active Directory
Download the sample scripts.
Copy ZTISetComputerDescriptionInAD.wsf to the scripts folder in your deployment share.
Create a custom action in the State Restore phase, any place will do, I added the action to the Custom Tasks group. Use the following settings
Type: Run Command Line
Name: Set Computer Description in Active Directory
Command: cscript.exe "%SCRIPTROOT%\ZTISetComputerDescriptionInAD.wsf"
Runas:
Load the user's profile: Selected
Note: The account that you use must have permissions in Active Directory to modify computer object attributes.
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/20/068aeb802176263c8326c7cb82bef751.png)
Step 3 - Store the Description value on the system properties of the local computer
Download the sample scripts.
Copy ZTISetComputerDescriptionLocally.wsf to the scripts folder in your deployment share.
Create a custom action in the State Restore phase, any place will do, I added the action to the Custom Tasks group. Use the following settings
Type: Run Command Line
Name: Set Computer Description Locally
Command: cscript.exe "%SCRIPTROOT%\ZTISetComputerDescriptionLocally.wsf"
/ Johan
相关文章推荐
- Writing and Hosting a Web Service in the SharePoint 2010 Demo Virtual Machine
- The Apache Axis2 Web service runtime in Tomcat v6.0 Server does not support the service project
- Setting up the Web Admin Tool in LDAP 6.x to communicate via SSL
- 【转载】Using the Web Service Callbacks in the .NET Application
- 'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'
- Get the SharePoint groups in Infopath 2010 and SharePoint 2010 by current user without any code
- Use the Picture Library Slideshow Web Part in the SharePoint 2010
- WebService no service was ont fund in the WSDL
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- Using the Web Service Callbacks in the .NET Application
- How to create simple web service in VS2010, NOT WCF service
- javax.xml.ws.WebServiceException: WSDL Metadata not available to create the proxy, either Service in
- Configuring the User Profile Service in SharePoint 2010
- Error: The Report Server Web Service is unable to access secure information in the report server.
- Setting Web Service and JCA Adapter Endpoints Dynamically in Oracle SOA Suite
- Uncovering the new RPC Client Access Service in Exchange 2010 (Part 3)
- Configuring the Change Password Feature in Outlook Web App Exchange 2010
- The Service-Oriented Media Enterprise: SOA, BPM, and Web Services in Professional Media Systems
- Visual Studio 2010 发布Web项目提示The target "PipelinePreDeployCopyAllFilesToOneFolder" does not exist in the project.解决方法
- javax.xml.ws.WebServiceException: No Content-type in the header!