Coder Social home page Coder Social logo

Comments (4)

julianomaldaner avatar julianomaldaner commented on August 10, 2024

Committed new version (1.1) that addresses this issue.

from sharefile-powershell.

schaepersm avatar schaepersm commented on August 10, 2024

Hi,
took a while to check this. Are you sure this has been solved?
I'm running on version 1.3 still having the same issue running these commands:

PS C:\WINDOWS\system32> $sfCred = Get-Credential
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

PS C:\WINDOWS\system32> $sfLogin = New-SfClient -Name "$workDir$sfShortAccountName" -Credential $sfCred
New-SfClient : The remote server returned an error: (400) Bad Request.
At line:1 char:12

  • $sfLogin = New-SfClient -Name "$workDir$sfShortAccountName" -Credential $sfCred
  •        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [New-SfClient], WebException
    • FullyQualifiedErrorId : System.Net.WebException,ShareFile.Api.Powershell.NewSfClient

Mauricio

from sharefile-powershell.

julianomaldaner avatar julianomaldaner commented on August 10, 2024

Hi Mauricio, bad argument handling in our part: when using -Credentials, you have to provide -Account as well. -Account is the subdomain - i.e., the prefix for your sharefile account. If you use "acme.sharefile.com" as your web site, then "acme" is the subdomain.

I've just tested it in my account using 1.3, and it reproduces your issue when -Account is not provided; but works when it does. Hopefully that'll work for you as well! Thanks!

from sharefile-powershell.

schaepersm avatar schaepersm commented on August 10, 2024

Hi Juliano,

Ouch… seeing it right now in get-help new-sfclient on example two
I can confirm that this does work now

Thank you on your quick reaction!
Mauricio

From: julianomaldaner [mailto:[email protected]]
Sent: Wednesday, June 11, 2014 8:00 PM
To: citrix/ShareFile-PowerShell
Cc: Mauricio Schäpers
Subject: Re: [ShareFile-PowerShell] Passing PSCredentials to New-SFClient (#1)

Hi Mauricio, bad argument handling in our part: when using -Credentials, you have to provide -Account as well. -Account is the subdomain - i.e., the prefix for your sharefile account. If you use "acme.sharefile.com" as your web site, then "acme" is the subdomain.

I've just tested it in my account using 1.3, and it reproduces your issue when -Account is not provided; but works when it does. Hopefully that'll work for you as well! Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-45776940.

from sharefile-powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.