Porting the diagnostics PaaS cmdlet to WAD 1.1

Fixed annoying Code Analysis warning