Skip to main content

All Questions

1 vote
1 answer
60 views

Edit xml file's DefaultValue using powershell script

I want to edit the DefaultValue for the Property name = "UseThis" using PowerShell script. Xml file : <?xml version="1.0"?> <ConfigFile xmlns:xsd="http://www.w3.org/...
Shivangi Rana's user avatar
0 votes
1 answer
64 views

Extract values from a string using powershell

I want to get values from the string using powershell. This is the sample string <Items> <query t="default"><value>morning</value><en>morning</en></...
Owais Ahmed's user avatar
  • 1,438
0 votes
0 answers
27 views

Create xml from various cmdlets

I am currently trying to make a script that will perform various extraction extract from DCs and export to one xml file. As someone completly new to the xml subject, I found this beautiful guide that ...
Nad's user avatar
  • 35
0 votes
0 answers
130 views

How to drill down to a node and replace a particular attribute in XML file

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE POWERMART SYSTEM "powrmart.dtd"> <POWERMART CREATION_DATE="07/23/2020 14:17:08" ...
ritwik sharma's user avatar
0 votes
1 answer
429 views

Replace content of an XML based on a lookup table in powershell

I have an XML file with some specific keywords I need to replace, here's an example: <?xml version="1.0" encoding="utf-8"?> <!--Exported at 23-09-2019 10:01:23--> <DEFTABLE xmlns:...
Yokiie's user avatar
  • 51
-5 votes
3 answers
3k views

To create XML output file from PowerShell script

To create below XML output from PowerShell script: <Trigger> <Value1>20181231</value1> <value2>20180531</> <value3>20180531</value3> <value4>...
MaheshMohan's user avatar
0 votes
1 answer
5k views

How to extract the value of xml node to a variable in powershell?

I am working to build a Power shell script that reads a XML file and extracts the values from the nodes to make further calculations. How could I extract the node values to variables? I have written ...
Black Pearl's user avatar
-1 votes
1 answer
526 views

Un-comment a tag in web.config

How can I remove the comments from this tag in my web.config? <assemblies> <!--<add assembly="Telerik.Reporting, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" /&...
Naeem's user avatar
  • 19
1 vote
2 answers
2k views

How to replace the content of file containg backslash ( \ ) in its string using PowerShell?

I have a config file which has multiple placeholders which i want to replace with some other values using PowerShell but the below code it not able to replace the %WebClientPath%\www with value ...
SRP's user avatar
  • 1,153
1 vote
2 answers
285 views

How to iterate through a System.Array type object that comes from an XML?

I am new to Powershell scripts that parses XML and I just ran into a situation where I needed to make sure a line of XML got executed strictly before another. To get there, I first searched on how I ...
stillnocake's user avatar
2 votes
1 answer
3k views

Removing Nodes matching a specific attribute value

I have XML data similar to: <objects> <object> <property name="a" /> <property name="b" /> <property name="hasErrors" /> <property name="data" /> ...
Alex's user avatar
  • 657
0 votes
2 answers
666 views

Replace placeholders in PowerShell dictionary using dynamic method

Referring to Replace placeholders with actual values in PowerShell dictionary Im trying to replace placeholders in PowerShell dictionary with actual element values dynamically. I have received an ...
mahesh's user avatar
  • 478
1 vote
1 answer
1k views

Replace placeholders with actual values in PowerShell dictionary

Following is the sample xml file: <configuration> <environment id="Development"> <type>Dev</type> <client>Arizona</client> <dataSource>Local&...
mahesh's user avatar
  • 478
1 vote
1 answer
345 views

How can I parse XML in PowerShell when each property has a unique name?

I have an xml file like so: <employees> <employee> <name>Johnny Rocket</name> <age>40</age> <somethingelse>Whatever</...
AlwaysQuestioning's user avatar
1 vote
1 answer
2k views

powershell create xml and parent and child elements if they do not exist

I wonder if anyone could help. PowerShell creation of XML from Exchange mailbox information I have been advised of a requirement where we need to audit the access of each mailbox within our Exchange ...
jasonrose's user avatar

15 30 50 per page
1
2 3 4 5