ich möchte ein Powershell Skript ausführen lassen und so wie ausschaut brauche ich hierfür höhere Rechte.
Hier ist ein Skript über das ich mittels Microsoft Deployment Tool die Office Installation anstoßen möchte.
Code: Alles auswählen
powershellCall('Start-Process -NoNewWindow -FilePath "\\opsi-server.lab.example.de\software_deploy\software\setup.exe" -ArgumentList "/configure office_standard.xml" | out-file "c:\log.txt" -Append')
Code: Alles auswählen
(154) [7] [2023-01-06 10:20:26.931] [opsi-template] Start-Process : Dieser Befehl kann aufgrund des folgenden Fehlers nicht ausgeführt werden: Zugriff verweigert.
(155) [7] [2023-01-06 10:20:26.931] [opsi-template] In C:\opsi.org\tmp\_opsiscript_Nlh460cYS3.ps1:2 Zeichen:1
(156) [7] [2023-01-06 10:20:26.931] [opsi-template] + Start-Process -NoNewWindow -FilePath "\\opsi-server.lab.example.de\so ...
(157) [7] [2023-01-06 10:20:26.931] [opsi-template] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(158) [7] [2023-01-06 10:20:26.931] [opsi-template] + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
(159) [7] [2023-01-06 10:20:26.931] [opsi-template] + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Mit dem
Code: Alles auswählen
powershellCall(' whoami | out-file C:\log.txt')
Wahrscheinlich gibt auch diverse andere Methoden Office installiert zu bekommen, aber ich finde den Ansatz über Powershell gar nicht so schlecht, respektive für andere Software-Produkte.