PowerShell Vs PowerShell run in SQL management studio

Welcome Forums General PowerShell Q&A PowerShell Vs PowerShell run in SQL management studio

This topic contains 1 reply, has 1 voice, and was last updated by

 
Participant
3 years, 10 months ago.

  • Author
    Posts
  • #24076

    Participant
    Points: 0
    Rank: Member

    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\'
    cd\
    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

    Participant
    Points: 0
    Rank: Member

    both versions of PowerShell look to be V2.0

The topic ‘PowerShell Vs PowerShell run in SQL management studio’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort