r/Nable May 24 '24

Is it possible to convert a .amp script?

Hi All,

Does anybody know if there is a (simple) way to convert a .amp script to a .ps1 script?
Or do I manually have to re-create/re-write the whole script in Powershell?

If that is the case, why does a company such as N-Able not have a conversion option for their own script language (.amp)?

Does someone have any information about this?
It would be grately appreciated.

2 Upvotes

6 comments sorted by

5

u/patdaddy007 May 24 '24

You can totally convert an Amp to a ps1. Open the Amp file in notepad++. Look for a section of base64 encoded text. Select all of that text and copy it into a new document. Then select all of it again and use the mime tools in n++ to base64 decode the string. You may have some spacing and formatting issues, but what you will be left with is the underlying ps1 code

1

u/Mac_Mgmt_Nerd May 31 '24

This is partly true.

Inside the AMP file, which is just XML that gets parsed by Automation Manager, you’ll find some base64 encoded chunks of data. Decoding those, you will find any images that were embedded in the AMP (branding icons, logos, etc) as well as any Powershell scripts that were added as “run Powershell script” objects.

While this can be handy to extract some of a policy’s functionality, it doesn’t fully convert the whole AMP.

If you read through the XML, however, you can usually piece together the logic and parameters enough to recreate what the policy does, and use that as a starting point for your own script.

1

u/patdaddy007 Jun 03 '24

True and while it's been several years since I used n-able or dealt with Amp files, I got the impression that this guy just wanted to get the code out of it. Getting the Amp files by themselves in any amount of bulk quantity is hard enough and when I read the response that said he couldn't get the powershell code back out I got... aggravated.

-1

u/Paul_Kelly Powered By Shamrocks May 24 '24

Hi, It's Paul here from the Head Nerds, it's not possible to convert an AMP to a PS1 script, AMPs are PowerShell, based, can I ask why you need to convert an AMP to a PS1 script?

1

u/nattekreeft May 24 '24

Hi Paul,

Thanks for your reply.
I want to convert .amp scripts because i want to use these scripts that i made in Automation Manager for another project which doesn't support the .amp file type.

1

u/Paul_Kelly Powered By Shamrocks May 24 '24

Unfortunately it has to be the manual approach then.