Ana içeriğe atla

Kayıtlar

configurationfile etiketine sahip yayınlar gösteriliyor

Windows Feature Batch Deployment

Aşağıdaki function ile bir sunucu üzerinde oluışturduğumuz configuration file dosyası ile uzak lokasyondaki birden çok sunucuya yükleme yapabiliriz. Umarım faydalı olur, her türlü ek geliştirme için hakki.ogretmen@gmail.com adresine mail atabilirsiniz. function Invoke-WindowsFeatureBatchDeployment { param ( [parameter(mandatory)] [string[]] $ComputerNames, [parameter(mandatory)] [string] $ConfigurationFilePath ) # Deploy the features on multiple computers simultaneously. $jobs = @() foreach($ComputerName in $ComputerNames) { $jobs += Start-Job -Command { Install-WindowsFeature -ConfigurationFilePath $using:ConfigurationFilePath -ComputerName $using:ComputerName -Restart } } Receive-Job -Job $jobs -Wait | Select-Object Success, RestartNeeded, ExitCode, FeatureResult }