![]() This prevents Word from loading any templates. When run programmatically, Word does not have a user profile loaded. Format:įor example, if you specify the following "FullName" = " %fullname%", the script will find text FullName in the template and replace it with the full name of the user on which it is executed. $propertyMap - Specifies a map of text placeholders and the corresponding value references for the properties to substitute placeholders with. For example, if you specify C:\reports\ %fullname%.docx, and the script is executed on user John Doe, the path will be C:\reports\ John Doe.docx. When the script will be executed, the value references will be replaced with property values of the user on which it is executed. You can use value references in both the template and the document paths. $filePath - Specifies a path to a document that will be created by the script.$templatePath - Specifies a path to the template that will be used for creating documents.In the template, add placeholders (portions of texts) that will be replaced with the actual values of user properties. To be able to create a document containing user data, first, you need to create a Microsoft Word Template (DOTX) that will be used for creating the documents. ![]() ![]() For more details, see Run PowerShell Script after Creating a User. For this purpose, you need to create a business rule that will run the script after creating a new user. For example, the script can be used to automatically create documents with information on new users once they are created in AD. The script can be used in business rules, custom commands and scheduled tasks to save property values of a user account to a Microsoft Word document. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |