У меня есть 2 сервера, настроенных для DSC. Обе версии Powershell 5.0 и Server 12 R2, DSCPULL настроены как сервер DSC Pull через HTTP, DSCIIS является клиентом.Как настроить клиента в Powershell 5.0 DSC Pull Mode
В DSCIIS я пытаюсь настроить его так, чтобы он загружал конфигурацию с сервера Pull через имена конфигурации, я взял код с веб-сайта MSDN и немного изменил свои требования, но он все еще не работает.
[DSCLocalConfigurationManager()]
configuration PullClientConfigID
{
Node localhost
{
Settings
{
RefreshMode = 'Pull'
RefreshFrequencyMins = 30
RebootNodeIfNeeded = $true
}
ConfigurationRepositoryWeb DSCPULL
{
ServerURL = 'http://DSCPULL:8080/PSDSCPullServer.svc'
RegistrationKey = 'test'
ConfigurationNames = @('WebServer')
AllowUnsecureConnection = $true
}
}
}
PullClientConfigID -OutputPath c:\Configs\TargetNodes
Start-DscConfiguration C:\Configs\TargetNodes -ComputerName localhost -wait -Verbose
Ошибка я получаю является
Start-DscConfiguration : The computer-specific MOF file for computer localhost does not exist in the current directory.
At line:1 char:1
+ Start-DscConfiguration C:\Configs\TargetNodes -ComputerName localhost ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-DscConfiguration], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.DesiredStateConfiguration.Commands.StartDscConfiguration
Command
Я попытался изменить «Node Localhost» с именем сервера, а затем запустить последнюю строку с правильным «имя_компьютером», но я получаю ту же ошибку.