This blog provides a PowerShell script to fix PSScriptAnalyzer line has trailing whitespace warnings.
Given the path to a PowerShell module it will iterate through any psd1 and psm1 files and remove any trailing white space:


This blog provides a PowerShell script to fix PSScriptAnalyzer line has trailing whitespace warnings.
Given the path to a PowerShell module it will iterate through any psd1 and psm1 files and remove any trailing white space: