SMB

时间:2019-06-04 07:37:57

标签: powershell dsc

不幸的是,我在Internet上找不到适合我的情况的示例。

我有一个具有SMB共享的DSC服务器。我想像https://docs.microsoft.com/de-de/powershell/dsc/pull-server/partialconfigs

那样部署部分配置

但是,只有HTTP DSC服务器而不是SMB的示例。 SMB DSC服务器也可以这样做吗?如果是这样,我可以举个例子吗?

1 个答案:

答案 0 :(得分:0)

我找到了一个例子:

[DSCLocalConfigurationManager()]
configuration PartialConfig
{
    Node localhost
    {
        Settings
        {
            RefreshMode = 'Pull'
            ConfigurationID = 'a5f86baf-f17f-4778-8944-9cc99ec9f992'
            RebootNodeIfNeeded = $true
        }
           ConfigurationRepositoryShare SMBPull
        {
            SourcePath = '\\Server\Configurations'
            Name = 'SMBPull'
        }
           PartialConfiguration OSConfig
        {
            Description = 'Configuration for the Base OS'
            ConfigurationSource = '[ConfigurationRepositoryShare]SMBPull'
            RefreshMode = 'Pull'
        }
           PartialConfiguration SQLConfig
        {
            Description = 'Configuration for the SQL Server'
            DependsOn = '[PartialConfiguration]OSConfig'
            RefreshMode = 'Push'
        }
    }
}