Configuration setupfilezip
{
param ($ComputerName)
$vdirectoryPath = “C:\temp\setupfiles”
Import-DscResource -ModuleName “PSDesiredStateConfiguration”
Node ‘localhost’{
File setupfiles {
Type = ‘Directory’
DestinationPath = $vdirectoryPath
Ensure = “Present”
}
}
}
setupfilezip
Start-DscConfiguration -ComputerName localhost -Path setupfilezip -Wait -Verbose
///another powershell script
Invoke-Command “C:\tmp\sample2.ps1”