• Kiran Sharma posted an update in the group Group logo of PowerShellPowerShell 2 months, 1 week ago

    Hi Team, I’m using powershell to download a file from my github and place it in specific location on my laptop and it works fine. However when run the same command on windows Server, it throws an error. Exception calling “DownloadFile” with “2” argument(s): “An exception occurred during a WebClient request.” At line:3 char:1 + $WebClient.DownloadFile(“$Link”,”$env:C:Test_powershellBackupCI.xls … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : WebException any suggestions on this would be highly appreciated

  • Kiran Sharma became a registered member 2 months, 1 week ago

    avatar
  • Hello All,

    I’ve written a smile script to download a test file from my github and it works fine on my laptop powershell, however it throws below error when i run the same script on Windows Server 2012. The only thing i noticed is that version of Powershell is different only Laptop and the Server.

    Exception calling “DownloadFile” with “2” argument(s): “An exception occurred during a WebClient request.”
    At line:3 char:1
    + $WebClient.DownloadFile(“$Link”,”$env:C:Test_powershellBackupCI.xls …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

    any suggestions/help on this is highly appreciated

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account