Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
$status = Get-DscConfigurationStatus -CimSession $session;
Configuration Hoge
{
Import-DscResource –ModuleName PSDesiredStateConfiguration
Node 127.0.0.1
{
File Hoge
{
Ensure = 'Present'
DestinationPath = "d:\fuga"
Type = "Directory"
Force = $true
}
File Fuga
{
Ensure = 'Present'
DestinationPath = "x:\fuga"
Type = "Directory"
Force = $true
}
}
}
Hoge -OutputPath d:\hoge;
$session = (New-CimSession -ComputerName 127.0.0.1);
Start-DscConfiguration -Path d:\hoge -Wait -Force -Verbose -CimSession $session;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment