PowerShell – Script to run one-time full deduplication including optimization, garbage collection and scrubbing

I wrote a simple script to run full deduplication. It is handy when you need one-time deduplication including garbage collection and scrubbing job. $ErrorActionPreference = ‘Stop’ Function Wait-RvDedupJob { Write-Warning -Message ‘Wait for all jobs to finish’ while (Get-DedupJob -ErrorAction SilentlyContinue) { Start-Sleep -Seconds 10 } } Get-DedupVolume | ForEach-Object -Process ` { $_.Volume Wait-RvDedupJob […]

Simplify your PowerShell DSC Configurations by using parameterized DSC Resources

Often I can see that DSC adopters use similar code: Configuration TooVerbose { Import-DscResource -ModuleName PSDesiredStateConfiguration Service abc { Name = ‘abc’ State = ‘Running’ Ensure = ‘Present’ } Service def { Name = ‘abc’ State = ‘Running’ Ensure = ‘Present’ } Service xyz { Name = ‘abc’ State = ‘Running’ Ensure = ‘Present’ } […]