Benutzer:MovGP0/Powershell/DSC/LCM

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
   MovGP0        Über mich        Hilfen        Artikel        Weblinks        Literatur        Zitate        Notizen        Programmierung        MSCert        Physik      

Local Configuration Manager (LCM)

[Bearbeiten | Quelltext bearbeiten]
Get LCM settings
$session = New-CimSession -ComputerName 'hostname'
Get-DSCLocalConfigurationManager -CimSession $session
# or
Get-DSCLocalConfigurationManager -Computername 'hostname'
MyLcmConfig.ps1
# [DSCLocalConfigurationManager()] # starting with PowerShell 5.0
Configuration MyConfiguration {
    Node @($nodes) {
        LocalConfigurationManager {
            ConfigurationMode = 'ApplyAndAutoCorrect'
            ConfigarutionModeFrequencyMins = 120
            RefreshMode = 'PUSH'
            RebootNodeIfNeeded = $true
        }
    }
}
Set-DSCLocalConfigurationManager -Path ./MyLcmConfig.mof -Computername 'hostname'