Wenn die DoUpdate.cmd jedoch manuell mit dem Parameter "/instpsh" aufgerufen wird, versucht WSUSOU die Powershell zu instllieren, ohne vorher zu prüfen, ob .NET installiert ist.
Notiz: Powershell 1.0 erforderte .NET 2.0, daraus schlussfolgere ich, dass Version 2.0 eine neure Version erfordert. (vermutl. 3.0 oder 3.5)
Ich werde dies natürlich noch prüfen.
[edit]Habe es mitlerweile gerüft. PSH 2.0 benötigt .NET 2.0 SP1.[/edit]
Dort sollte ein Code eingebracht werden, der die Installation von .NET prüft.
z.B.
- Code: Select all
rem *** Install Windows PowerShell 2.0 ***
if "%INSTALL_PSH%" NEQ "/instpsh" goto SkipPShInst
if %DOTNET35_VER_MAJOR% lss 2 (
if "%INSTALL_DOTNET35%"="" (
goto SkipPShInst
)
)
echo Checking Windows PowerShell 2.0 installation state...
if %PSH_VER_MAJOR% LSS %PSH_VER_TARGET_MAJOR% goto InstallPSh
if %PSH_VER_MAJOR% GTR %PSH_VER_TARGET_MAJOR% goto SkipPShInst
if %PSH_VER_MINOR% LSS %PSH_VER_TARGET_MINOR% goto InstallPSh
if %PSH_VER_MINOR% GEQ %PSH_VER_TARGET_MINOR% goto SkipPShInst
:InstallPSh
if "%PSH_TARGET_ID%"=="" (
echo Warning: Environment variable PSH_TARGET_ID not set.
echo %DATE% %TIME% - Warning: Environment variable PSH_TARGET_ID not set >>%UPDATE_LOGFILE%
goto SkipPShInst
)
echo %PSH_TARGET_ID%>"%TEMP%\MissingUpdateIds.txt"
call ListUpdatesToInstall.cmd /excludestatics /ignoreblacklist
if errorlevel 1 goto ListError
if exist "%TEMP%\UpdatesToInstall.txt" (
echo Installing Windows PowerShell 2.0...
call InstallListedUpdates.cmd /selectoptions %BACKUP_MODE% %VERIFY_MODE% /errorsaswarnings
) else (
echo Warning: Windows PowerShell 2.0 installation file ^(kb%PSH_TARGET_ID%^) not found.
echo %DATE% %TIME% - Warning: Windows PowerShell 2.0 installation file ^(kb%PSH_TARGET_ID%^) not found >>%UPDATE_LOGFILE%
goto SkipPShInst
)
set REBOOT_REQUIRED=1
:SkipPShInst
Viele Grüsse