Skip to main content

All Questions

Tagged with
4 votes
4 answers
1k views

How to convert XML into a PsCustomObject to allow final export as JSON?

I am looking for a Powershell function to convert XML into a PsCustomObject which can finally exported as JSON. For this I created this small XML Test object: [xml]$Xml = @" <Action name="...
Carsten's user avatar
  • 2,125
1 vote
1 answer
138 views

GetElements from a URL with powershell

I am trying to get all links for each object, in order to make a log of which items are new and which are old I dont understand how to grab links from a shopping website... Tis is the code that works. ...
EVO's user avatar
  • 11
0 votes
2 answers
286 views

Get XML or JSON path to a value with PowerShell

I'd like to find all the nodes/paths to a specific value, where the input is either XML or JSON. Specifically, I'm using Get-ProcessMitigation -RegistryConfigFilePath ExploitProtection.xml to write a ...
paal527569's user avatar
0 votes
2 answers
2k views

Powershell Invoke-RestMethod convert XML response to JSON text

I am trying to use the Invoke-RestMethod command to grab the XML response from a SOAP endpoint and convert it to JSON text. From what I have read, the Invoke-RestMethod should be converting the ...
Tommy Sharp's user avatar
0 votes
2 answers
576 views

Get values from Json and update in XML file using powrshell?

I want to get values from json file and then store it to the child element in XML file by using powerShell. [ { "Modules/ScriptRunnerClassic/Default.aspx": "steve,spenczy", ...
Andrew's user avatar
  • 144
1 vote
1 answer
2k views

Converting XML to JSON with Powershell

I am trying to convert an xml file to json for further processing. This is actually first time I use powershell so I need some help. I get an xml file with this structure: <?xml version="1.0&...
Alvsky's user avatar
  • 13
0 votes
1 answer
57 views

Edit Json using powershell

I have a complex configuration file that i want to update using Powershell. is there any helpful way i could achieve that. I want to update SelectedCodes only. the file: <?xml version="1.0&...
Saad Aldulaijan's user avatar
0 votes
2 answers
224 views

How to add additional elements in an existing json file

This is what I am doing: $appParametersXml = [Xml] (Get-Content "$appParameterFilePath\$appParameterFile") $parameterJsonFile = "$appParameterFilePath\$applicationName"+ "...
Amy's user avatar
  • 333
1 vote
1 answer
994 views

How to convert integer xml value to JSON without quotes

So, I have my xml like shown below with Parameter 4 being an integer and the rest being string parameters. The problem is that XML doesn't allow me to put the integer value without quotes (it doesn't ...
Amy's user avatar
  • 333
1 vote
1 answer
473 views

Converting XML file into a specific JSON format

I have an XML file that looks like this <?xml version="1.0" encoding="utf-8"?> <Application xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://...
Amy's user avatar
  • 333
0 votes
2 answers
1k views

Powershell convert json string to xml string always produces System.String

I searched a lot and tried a lot but I didnt get the point. my json string{"transactionId":411648956,"status":1123} always converts to <?xml version="1.0" encoding=&...
user3711142's user avatar
1 vote
2 answers
9k views

Convert JSON FILE to XML FILE using POWERSHELL

I need to convert Json file from web to xml file and i need very simple way... There are several data I need from Json response... There are a lot of around but they are not very clear. I found some ...
MBMSOFT's user avatar
  • 49
0 votes
1 answer
105 views

powershell for parsing json and merging it into an xml file

In powershell 5.0, how to extract the "result" array of a dynamic JsonToExtract.json and uniquely-append the extracted values to be <members> beneath <name>TargetName</name&...
Peter Noges's user avatar
0 votes
2 answers
53 views

Reading an XML File using an XML object results in missing entries

I’ve been given XML files to update, but when reading in the file using an XML object, multiple entries go missing. The XML File (note two sectionGroup’s) <configuration> <configSections&...
Kent Thayer's user avatar
0 votes
1 answer
157 views

Problem with parsing the response in powershell

I am hitting a web method in powershell and returns with an XML response. I am unable to parse this response object to extract the token. $response = Invoke-RestMethod 'https://sso-test.company.com/...
Anirudh Gupta's user avatar

15 30 50 per page