patrick-it
Goto Top

Registry Keys im MDT Setup setzen

Hallo zusammen

Seit einer Weile versuche ich für ein Windows 10 Setup diverse Registry Keys zu setzen, leider schlägt die Installation mit dem Fehlercode 0x00000001 fehl.

Folgendes Powershell Script:
$Path = "HKLM:\SYSTEM\test"  
New-Item $Path -Force
$DateTime = Get-Date -Format "dd/MM/yyyy HH:mm"  

$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
$type = $tsenv.Value("'testComputerType")  

New-ItemProperty -Path $Path -Name "DateStaged" -Value $DateTime -PropertyType String -Force  
New-ItemProperty -Path $Path -Name "Build" -Value "1.0" -PropertyType String -Force  
New-ItemProperty -Path $Path -Name "Computer Type" -Value $type -PropertyType String -Force  

Die Variable testComputerType habe ich im UDI Wizard konfiguriert und sie wird je nachdem was ein Typ PC es ist dementsprechend gesetzt.

Die Position des Scripts in der Task Sequenz ist folgende:
positionmdt

Ich hoffe jemand kann mir sagen, wo sich der Fehler befindet.

Vielen Dank und beste Grüsse
Patrick

Content-Key: 491039

Url: https://administrator.de/contentid/491039

Printed on: April 23, 2024 at 22:04 o'clock

Member: mayho33
Solution mayho33 Sep 02, 2019 at 14:06:21 (UTC)
Goto Top
Nur so eine Idee:

Hast du wirklich alle PS-Scripts signed?? Andernfalls würde ich die PS- Execution Policy auf Bypass setzen und den Parameter auf Powershell.exe -ExecutionPolicy Bypass ergänzen.
Member: Patrick-IT
Patrick-IT Sep 02, 2019 at 15:37:04 (UTC)
Goto Top
Total vergessen, danke für den Hinweis, habe es jetzt hier gesetzt und es hat funktionert:
bypass

Hab überhaupt nicht daran gedacht, vielen dank für die schnelle Antwort!
Member: mayho33
mayho33 Sep 06, 2019 at 15:40:52 (UTC)
Goto Top
👍