PowerShell Vs PowerShell run in SQL management studio

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Peter Bushaw Peter Bushaw 1 year, 6 months ago.

  • Author
  • #24076
    Profile photo of Peter Bushaw
    Peter Bushaw

    I created a script in PowerShell 2.0 that works like a charm. It runs an exe file that downloads a file from a ftp site. I then went into SQL Server Management Studio 2012, launched the power shell. I then used the command to get me to the regular PowerShell. I then tried to run my script and I got an error on the executable. I get the red error that it is not recognized as the name of a cmdlet, function, script file, or operable program. The script with the exe file in it worked fine if I did not go through the sql PowerShell first. Any help would be great. The code that I am using in the regular PowerShell looks like this:

    $date = (get-date -Format yyyyMMddHH)
    $path = 'c:\program files (x86)\ipswitch\ws_ftp 12\'
    Push-location $path

    & wsftppro.exe -s PCC_FTP:/eslcrrdbuser/logs/LOG_us_eslc_multi_replica_$date.sqb -d local:c:\logs\

    I do realize I will have to add the Start-Process PowerShell

    Any help would be great!

  • #24088
    Profile photo of Peter Bushaw
    Peter Bushaw

    both versions of PowerShell look to be V2.0

You must be logged in to reply to this topic.