As stated in the other thread you posted to - the problem is that SQL Server Agent uses tokens, and tokens are defined by $(token). Since your code has this: $(get-date -f yyyy-MM-dd-hh-mm-ss), SQL Server Agent is attempting to parse that out as a token.
Change your code so it doesn't use that structure, something like:
$directoryName = "E:\Archive_Backups\" + (Get-Date -f yyyy-MM-dd-hh-mm-ss);
$f = New-Item $directoryName -ItemType Directory -Force;
With that said - you can simplify your code to just this:
Copy-Item -Path E:\MainBackups\ -Destination "E:\Archive_Backups\" + (Get-Date -f yyyy-MM-dd-hh-mm-ss);