Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Anyone knows PowerShell scripting?

views
     
TSaltec
post Nov 9 2022, 05:08 PM, updated 4y ago

New Member
*
Newbie
4 posts

Joined: Oct 2004
From: Kuala Lumpur


I am trying to write some code based on PowerShell (to be integrated to .bat) to manipulate some XML content. Anyone can help ar?
wufei
post Nov 9 2022, 05:19 PM

Look at all my stars!!
*******
Senior Member
3,039 posts

Joined: Jan 2003
From: Laputa


.bat , i smell danger
SUSifourtos
post Nov 9 2022, 05:21 PM

Look at all my stars!!
*******
Senior Member
2,256 posts

Joined: Feb 2012



manipulate the content within xml?

why must powershell....

simply write some simple javasript will do
TSaltec
post Nov 9 2022, 05:40 PM

New Member
*
Newbie
4 posts

Joined: Oct 2004
From: Kuala Lumpur


QUOTE(ifourtos @ Nov 9 2022, 06:21 PM)
manipulate the content within xml?

why must powershell....

simply write some simple javasript will do
*
because I don't know programming language doh.gif
I only know batch and learning powershell... biggrin.gif
SUSifourtos
post Nov 9 2022, 06:17 PM

Look at all my stars!!
*******
Senior Member
2,256 posts

Joined: Feb 2012



QUOTE(altec @ Nov 9 2022, 05:40 PM)
because I don't know programming language  doh.gif
I only know batch and learning powershell...  biggrin.gif
*
this is like

u know lego

want to use lego build a real house...

which is .....
very hard.
flashang
post Nov 9 2022, 11:40 PM

Casual
***
Junior Member
355 posts

Joined: Aug 2021


QUOTE(ifourtos @ Nov 9 2022, 06:17 PM)
this is like

u know lego

want to use lego build a real house...

which is .....
very hard.
*
using powershell is "easier" for administrator group of people to manage and "upgrade",
which most of them does not require know how to code javascript.

smile.gif


TSaltec
post Nov 10 2022, 03:45 PM

New Member
*
Newbie
4 posts

Joined: Oct 2004
From: Kuala Lumpur


QUOTE(flashang @ Nov 10 2022, 12:40 AM)
using powershell is "easier" for administrator group of people to manage and "upgrade", 
which most of them does not require know how to code javascript.

smile.gif
*
Any material I can get, specifically in altering XML content?
silverhawk
post Nov 10 2022, 10:53 PM

Eyes on Target
Group Icon
Elite
4,956 posts

Joined: Jan 2003


What are you altering in XML?

XML can be pretty finicky when it comes to its schema, so you have to be careful when manipulating it.
angch
post Nov 11 2022, 01:06 PM

On my way
****
Junior Member
636 posts

Joined: Jul 2006
Powershell's file extension is .ps1, not .bat (and you should just run it directly, outside of .bat), and has built-in parsing and manipulation for XML. Think jquery.

https://learn.microsoft.com/en-us/powershel...=powershell-7.3

Heck lot more powerful than Javascript or PHP for XML, before using 3rd party libraries.

This post has been edited by angch: Nov 11 2022, 01:10 PM
MatQuasar
post Oct 16 2023, 03:17 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
user posted image

bruce.gif

This post has been edited by MatQuasar: Oct 16 2023, 03:38 PM
MatQuasar
post Dec 7 2023, 03:53 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
Can use PowerShell command in .bat batch file, or Command Prompt window.

user posted image

Just need to type "powershell" followed by commands.

 

Change to:
| Lo-Fi Version
0.0191sec    0.42    5 queries    GZIP Disabled
Time is now: 24th December 2025 - 06:45 AM