Header Ads

recent

PowerShell DSC on Linux--Part3


How to Push the DSC configuration to the Linux Computer

Dsc configure can be pushed to the Linux computer, use the start to dsc configuration, along with that to get config use get dsc configuration and to test use test dsc configuration cmdlet.

to push config remotely, you should use new-cimsession command to Linux system as below code.

$Node = "LX-dsc-01.test.lab" $Credential = Get-Credential $opt = New-CimSessionOption -UseSsl:$true  
$Sess=New-CimSession -Credential:$credential -ComputerName:$Node -Port:5986 -Authentication:basic -SessionOption:$opt -OperationTimeoutSec:90   


Distribute the configuration using pull server
Distribute configuration to Linux system with pull server, follow same process as on windows system, 
Local Configuration parameters
Configuration local script for local Linux system, all the scripts located on "/opt/microsoft/dsc/Scripts"

To get current local configuration run "sudo ./GetDscConfiguration.py"  

Get local meta-configuration applied to linux local system "sudo ./GetDscLocalConfigurationManager.py"

To install new Module run "sudo ./InstallModule.py /tmp/nx.zip"


You can find DSC log files (omiserver.log, dsc.log) on Linux system at /var/opt/omi/log



Enjoy DSC on Linux !!!!!!!!!!!!!!!!!!!!

No comments:

Systemadminworld. Powered by Blogger.