I\'m trying to run a PowerShell script inside cmd command line. Someone gave me an example and it worked:
powershell.exe -noexit \"& \'c:\\Data\\Schedule
Try just:
powershell.exe -noexit D:\Work\SQLExecutor.ps1 -gettedServerName "MY-PC"