The term ‘/status.bat’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check
14:23:28 the spelling of the name, or if a path was included, verify that the path is correct and try again.
14:23:28 + CategoryInfo : ObjectNotFound: (/status.bat:String) , CommandNotFoundException
14:23:28 + FullyQualifiedErrorId : CommandNotFoundException
The PowerShell variable $RemotePath is expanding to the empty string. If the status.bat file is not in the root directory of the current drive, then it won’t be found at that location. Check that the $RemotePath variable has the value that you expect.