Jump to content


Photo

PowerShell Script


  • Please log in to reply
3 replies to this topic

#1 Yoda

Yoda
  • Members
  • 2 posts

Posted 06 October 2009 - 06:45 PM

I about have way through creating a FTP script using PowerShell and I am stuck. When I reach the section to for proxy setting I run into an error.
I have looked at a couple scripts but, no matter how I change it I still get the error message. I am missing something and need some help

The following lines fail with or with out "ProxyType" or "FTPProxyType"
$objFTPConnectionMTA.ProxyType = sfFTPLib.ProxyType.enumProxyType.ftpProxyTypeNone;
$objFTPConnectionMTA.FTPProxyType = sfFTPLib.FTPProxyType.enumFTPProxyType.ftpFTPProxyTypeNone;

This is the error message I am getting
The term 'sfFTPLib.ProxyType.enumProxyType.ftpProxyTypeNone' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
At C:\MyScripts\FTPTest.ps1:45 char:95
+ $objFTPConnectionMTA.ProxyType = sfFTPLib.ProxyType.enumProxyType.ftpProxyTypeNone <<<< ;
+ CategoryInfo : ObjectNotFound: (sfFTPLib.ProxyT...tpProxyTypeNone:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Note: $objFTPConnectionMTA = new-object -comobject sfFTPLib.FTPConnectionMTA is loaded and works. The issue is on the sfFTPLib side.

#2 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 06 October 2009 - 07:05 PM

Can you send the complete script to support at smartftp.com

Thank you
Regards,
SmartFTP

#3 Yoda

Yoda
  • Members
  • 2 posts

Posted 06 October 2009 - 08:05 PM

Can you send the complete script to support at smartftp.com

Thank you
Regards,
SmartFTP



#4 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 06 October 2009 - 09:04 PM

Hm your last post was empty.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users