Set-XmlNode
PackageDeployment Module Help |
Package Deployment Module (DSM eScript Commands) |
Set-XmlNode Cmdlet |
Version 1.0.0.3 |
Set-XmlNode
Synopsis
Modify XML file
Syntax
Set-XmlNode [-NodeType] <String> [-Action] <String> [-Path] <String> [-ContinueOnError] [-Wow64] [[-XPathQuery] <String>] [[-Index] <Int32>] [[-Attribute] <String>] [[-HintPath] <String>] [[-Content] <String[]>] [[-Context] <String>] [<CommonParameters>]
Description
Use this command to add new entries to an XML file or to change or delete existing entries. The changed file is only stored if the XML file is well-formed, the schema is not validated, however.
Parameters
-Action <String> |
||||||
The following actions are available: Add, Change, Delete. |
||||||
|
-Attribute <String> |
||||||
This entry provides the name of the queried attribute if you select Entry type = Attribute. You are allowed to use the * wild card. |
||||||
|
-Content <String[]> |
||||||
Specifies the XML contents (for the actions Add and Change) that will be replaced and/or added to the XML file. Click ... to open an editor where you can enter complex or multiple lined contents. You can use variables. |
||||||
|
-Context <String> |
||||||
User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
Continues script execution in spite of errors in the respective command |
||||||
|
-HintPath <String> |
||||||
#TODO# |
||||||
|
-Index <Int32> |
||||||
The index determines which element is to be edited if the query finds several matches in the XML file. The following options are available: All (default), First match, Last match, Specific index. Specify the location of the specific element on the match list, for example 3 for the third incidence in the XML file. If necessary, use the Read-XmlNode command to define the respective index value. |
||||||
|
-NodeType <String> |
||||||
Select the type of the part of the XML file you want to edit: |
||||||
|
-Path <String> |
||||||
Path and name of the XML file you want to edit. If not specified, the extension .XML is used automatically. |
||||||
|
-Wow64 <SwitchParameter> |
||||||
For reasons of compatibilty, Ivanti DSM maps file and registry access to the default storage location for 32 bit applications (provided that the storage location differs from that of 64-bit applications). File access: whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64. Registry commands: when accessing HKEY_LOCAL_MACHINE\SOFTWARE the calls are redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. The x64-switch stops this redirection of file and registry accesses when running the script command on a x64 computer; the eScript command runs on the specified path. CallScript command: the script runs in a 64-bit process. |
||||||
|
-XPathQuery <String> |
||||||
Used to identify the editable part of the XML file with the help of the XPath syntax. |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |