resolve PowerShell deprecated warning