Powershell script executed by SQL Server doesn't take effect
xp_cmdshell is not PowerShell.
If you run: xp_cmdshell 'whoami.exe'; you will discover that you are nt service\mssqlserver and not Administrator.

xp_cmdshell is impersonating that user (which is a service in our case).
So the solution of the problem should be to impersonate an Administrator.
But you cannot do that.
I have tried using Proxy Credentials:
EXEC sp_xp_cmdshell_proxy_account 'ADVWKS\Max04', 'ds35efg##65';  
GO 

But I couldn't impersonate Administrator.
I have also tried adding this code at the beginning of the script:
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] &quot;Administrator&quot;)) { Start-Process powershell.exe &quot;-NoProfile -ExecutionPolicy Bypass -File `&quot;$PSCommandPath`&quot;&quot; -Verb RunAs; exit }

But the code just run forever because is expecting you to click on the YES and impersonate the Administrator.
I have also tried to run it from an Agent job: no joy.
This guide says not to impersonate a domain Admin. Which is exactly what you want to do. I let you try that because I cannot do that on my PC.
For start debugging try to run this:
runas /user:domain\administrator $^

and check if you can at least be Administrator on that machine.
So the recipe is:

Try to impersonate Administrator and execute the .ps1 script from command line
In alternative add a user with Administrator privileges
Impersonate it through SSMS

Good luck.