Using PowerShell 5.0
I have a current configuration that configures my server. I would like to modify this configuration so that the last step removes the mof file from the system (c:\windows\system32\configuration).
How can I use the following cmdlet in my configuration?`
Remove-DscConfigurationDocument -Stage Current, Pending, Previous -Verbose
Should I make a custom dscressource that uses the cmdlet or do i add a script block at the end of the configuration that runs the cmdlet above at all runs?
any tips/hints are welcome:)