Hi,
I'd like to add the execution of a script from a URL via PowerShell but it's not working. Could someone explain what I need to do to make it work?
Here are the different methods I've tested:
I've hidden the link but it's a direct download link to a .ps1 file. I've tested by executing the command manually and it works, but I can't get it to run automatically with NtLite.
Here's what's inside the preset :
I'd like to add the execution of a script from a URL via PowerShell but it's not working. Could someone explain what I need to do to make it work?
Here are the different methods I've tested:
| Task | Parameters |
powershell | "& ([scriptblock]::Create((irm 'https://xxx')))" |
powershell | -Command "irm 'https://xxx' | iex" |
Here's what's inside the preset :
XML:
...
<Item type="20">
<Path>powershell</Path>
<Params>"& ([scriptblock]::Create((irm 'https://xxx')))"</Params>
<Index>1000</Index>
</Item>
<Item type="20">
<Path>powershell</Path>
<Params>-Command "irm 'https://xxx' | iex"</Params>
<Index>1001</Index>
</Item>
...