After you successfully deploy and verify your Microsoft
Provisioning System (MPS) configuration, you can immediately start
to perform provisioning actions in your MPS environment. To do
this, you can utilize the MPS sample XML request installed on the
Provisioning Engine on MPS01 or MPS02. The location of the sample
XML file is
system drive: \ProgramFiles\Microsoft
Hosting\Provisioning\Samples\WindowsBasedHosting
Successfully completing provisioning actions with the sample requests can verify that MPS is functioning properly. For example, to get started you might want to run one or more of the following sample XML provisioning requests that perform the indicated tasks:
- CreateGroup.xml - Create a group in Active
Directory.
- CreateUser.xml - Create a user account in Active
Directory.
- SetUserPassword.xml - Set the password for a user
account.
To verify MPS functionality, run provisioning actions with the sample XML request using any of the two following methods.
Submit an XML Request Using ProvTest.exe
You can use the ProvTest.exe application at a command prompt on the local computer to submit an XML request to the Provisioning Engine.
Procedure SPV.1: To submit an XML request using ProvTest.exe
-
In the XML CreateUser.xml file, fill in the appropriate data parameters for your system.
-
Copy the sample XML CreateUser.xml request to your C:\ directory.
-
Open a command shell (Cmd.exe) on the local computer.
-
Enter a command string similar to the following to create a group in Active Directory (the .xml request file is the target of the executable), specifying the directory path to ProvTest.exe:
Copy Code c:\>directorypath\provtest.exe <createuser.xml> /e /r3
Note: |
---|
To display command-line syntax for ProvTest.exe, use the /? Help switch. |
Submit an XML request from a custom application
You can use any application that is capable of calling the MPF COM Client to submit an XML request to the Provisioning Engine. To do this, you must call the SubmitRequest method and deliver the XML string, namespace, and procedure as arguments to the call, as shown in the following example:
Copy Code | |
---|---|
strXMLCreateUser = "<?xml version=""1.0"" encoding=""iso-8859-1"" ?>" & _ "<request><data><userPrincipalName/><policyName/><container/><displa yName/><givenName/><sn/><preferredDomainController/></data><procedur e><execute namespace=""Managed Active Directory"" procedure=""CreateUser""><before source=""data"" destination=""executeData"" mode=""merge""/><after source=""executeData"" sourcePath=""user"" destination=""data"" mode=""insert""/></execute></procedure></request>" Set objMPFClient = CreateObject("Provisioning.ProvEngineClient") strXMLResponse = objMPFClient.SubmitRequest(strXMLCreateUser, "Managed Active Directory","CreateUser") |
Note: |
---|
The strXMLCreateUser variable holds the XML string in this example of creating a new user in Active Directory. Note that the XML string is only a template and does not contain actual data values for user principal name, policy name, container, and so on. |
For an example of fully functional Microsoft Visual Basic script code that automates the processes of creating the XML string and submitting it to the MPF COM Client, right-click the Mpfcomcreateuser.vbs script located in \Samples\Provisioning\scripts on Microsoft Hosting Solutions for Service Providers. Then select Edit on the menu that appears. You can also use this script to submit an XML request to the Provisioning Engine to create a new user account in Active Directory.
You only need to provide command-line arguments that specify the various parameters required to provision the user account. For script functional details, copy the script to your C:\ directory and then display script Help by running the following command string:
Copy Code | |
---|---|
c:\>cscript.exe mpfcomcreateuser.vbs /? |
Other calling applications can include the use of Active Server Pages (ASP) code behind a Web console to invoke the MPF COM Client. In addition, if you want to utilize a custom .NET application, you must use the MPS .NET Client Wrapper to generate the XML request and deliver the request string to the Provisioning Engine.
For more information about how to use the wrapper, see Microsoft Provisioning System SDK.
Procedure SPV.2: To submit an XML request to the MPF COM Client using a custom application
-
In the XML CreateUser.xml file, fill in the appropriate data parameters for your system.
-
Adapt your application to use the code that calls the MPF COM Client, as specified in this section.
-
Launch the application using your normal method and submit the XML request.
-
If the SubmitRequest method is successful, it will return the response XML indicating the parameters configured by the request. Otherwise, it returns an XML response string with errors in it.