Some command not recognized in the internal environment

Hi

We are creating an apppage that can sign certificate from our internal CA.
In the script, we are using the following commands that ‘normally’ should already be present in the modules but apparently it says its not recognized:

[9/20/2024 11:30:57 AM] [Error] [App-Portal] The term ‘Write-EventLog’ is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
[9/20/2024 11:30:57 AM] [Error] [App-Portal] The term ‘Compress-Archive’ is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Does anyone know why this is happening?

Info:
Server: Windows server 2022
PSU version: 5.0.7 (msi install)

I just hit this error on integrated environment with v4.4.1
PSVersion 7.3.7
Windows Server 2019

I wrote a script a while back to auotmate a task, it uses compress-archive. Ran it on the PSU server but in vscode to ensure it would work, since the first run was manual I then scheduled it for this month to run again, it just failed with:

[error] The term 'Compress-Archive' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 

Powershell constrained language mode caught us with this recently. It appears it might have been enforced more strictly in the October patch.