Hi guys,
I am using Powershell DSC for a silent newinstallation of our Win7 Computers in my Company and i got some Problems with my Script. I am using Win7 Professional on the traget computers and a Windows Server 2012 R2 as a Pull Server for the configuration. here is my Script:
configuration CADKonfig { node 4d374ba6-416b-4b88-9322-00d7a9c2da9d #Zielcomputer { Script deskupdate { TestScript = {$false} SetScript = ([String]{ \\hhinstall2\Konfiguration\PowerShellScript\Deskupdate.ps1 }) GetScript = { } } Script wpi { TestScript = {$false} SetScript = ([String]{ \\hhinstall2\Konfiguration\PowerShellScript\WPIsilent.ps1 }) GetScript = { } } Script VLC { TestScript = {$false} SetScript = ([String]{ \\hhinstall2\Konfiguration\PowerShellScript\vlcInstallieren.ps1 }) GetScript = { } } Script WU { TestScript = {$false} SetScript = ([String]{ \\hhinstall2\Konfiguration\PowerShellScript\WindowsUpdate }) GetScript = { } } File DirectModeling { Ensure = "Present" Type = "Directory" DestinationPath = "C:\PTC\Creo Elements\Direct Model and Drawing Manager 18.1" SourcePath = "\\hhcadfs\PTC\Creo Elements\Direct Modeling 18.1_x64" Recurse = "True" } File PunktKomma { Ensure = "Present" Type = "Directory" DestinationPath = "C:\Programme\PunktKomma" SourcePath = "\\hhinstall2\Konfiguration\PunktKomma" Recurse = "True" } File OsdKill { Ensure = "Present" Type = "Directory" DestinationPath = "C:\Programme\osdKill" SourcePath = "\\hhinstall2\Konfiguration\osdKill" Recurse = "True" } File Desktop18xx { Ensure = "Present" Type = "Directory" DestinationPath = "C:\Users\Public\Desktop\18.xx" SourcePath = "\\hhcadfs\PTC\Startscripts\Desktop\18.xx" Recurse = "True" DependsOn = "[File]PunktKomma" } File DruckerEinrichtenDesktop { Ensure = "Present" Type = "File" DestinationPath = "C:\Users\Public\Desktop\DruckerEinrichten.ink" SourcePath = $Drucker Recurse = "True" DependsOn = "[File]PunktKomma" } File OsdKillDesktop { Ensure = "Present" Type = "Directory" DestinationPath = "C:\Users\Public\Desktop\osdKill" SourcePath = "C:\Programme\osdkill" Recurse = "True" DependsOn = "[File]OsdKill" } File Mountprinter64bit { Ensure = "Present" Type = "File" DestinationPath = "C:\Users\Public\Desktop\mountprinter64bit.bat" SourcePath = "\\hhinstall2\Konfiguration\Drucker\mountprinter64bit.bat" Recurse = "True" } File PunktKommaAutostart { Ensure = "Present" Type = "File" DestinationPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\Autostart" SourcePath = "C:\Programme\PunktKomma\Punkt.exe" Recurse = "True" DependsOn = "[File]PunktKomma" } File TempVerzeichnis { Ensure = "Present" Type = "Directory" DestinationPath = "C:\Temp" } Script runmountprinter { TestScript = {$false} SetScript = ([String]{ \\hhinstall2\Konfiguration\PowerShellScript\Startmountprinter64bit.ps1 }) GetScript = { } DependsOn = "[File]Mountprinter64bit" } } } $MofFile = CADKonfig $Drucker = "\\hhinstall2\Konfiguration\Drucker\Drucker einrichten (64bit).lnk" CADKonfig -ComputerName $env:COMPUTERNAME -OutputPath "C:\DSCMOF"
here is the Windows Update Script:
Get-WUInstall -NotTitle “Internet Explorer 11″ -AcceptAll
here the WPI Script:
Start-Process -FilePath “\\hhinstall2\hhinstall\setup\WPI.exe” -verbose -ArgumentList 'timer=1 force=true'
the VLC Script:
$Anwendung = “\\hhinstall2\Konfiguration\vlc-2.2.0-win32\vlc-2.2.0-win32.msi”; #(Get-WmiObject -Class Win32_Product | where {$_.Name -eq “7-Zip 9.20 (x64 edition)”}).Uninstall(); (Get-WmiObject -ComputerName localhost -List | Where-Object -FilterScript {$_.Name -eq “Win32_Product”}).Install($Anwendung);
and here the DeskUpdate Script:
start -FilePath “C:\Program Files (x86)\Fujitsu\DeskUpdate\ducmd.exe” -ArgumentList “/web /drv”
So the configuration runs in Push Mode without any Problem but when I pull the configuration from my pull Server then the config doesnt work like it shouldt. i tried it to pull parts of the config as single configuration and noticed that the Windows Update, DeskUpdate, WPI and VLC Skripts doesnt work in pull mode. the other parts work without any problem. In addition i tried a configuration which uses a script to restart the Computer and this one also doesnt work in pull mode. I hope somebody couldt help me with this problem. Thank you in advance.