Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples on Front page of Github has typo #11

Closed
AaronG1234 opened this issue Nov 14, 2019 · 1 comment
Closed

Examples on Front page of Github has typo #11

AaronG1234 opened this issue Nov 14, 2019 · 1 comment

Comments

@AaronG1234
Copy link
Contributor

Expected Behavior

Cache credentials, tenable server, web session, and token.

$Credential = Get-Credential
Connect-PSTenable -Credential $Credential -TenableServer "server.domain.com/rest" -Register

Should return nothing, (but have cached a tenable rest api token for future calls)

Current Behavior

PS H:> Connect-PSTenable -Credential $creds -TenableServer "securitycenter.xxxx.xxx/rest" -Register
Invoke-RestMethod : Unable to connect to the remote server
At \pnas02fs2\Home\XXXX\WindowsPowerShell\Modules\PSTenable\0.2.3\public\Connect-PSTenable.ps1:72 char:20

  •     $Session = Invoke-RestMethod @SessionSplat
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], WebException
    • FullyQualifiedErrorId : System.Net.WebException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Possible Solution

Change the Example to read

Cache credentials, tenable server, web session, and token.

$Credential = Get-Credential
Connect-PSTenable -Credential $Credential -TenableServer "https://server.domain.com/rest" -Register

OR

update code to prepend 'https://' if the tenable server argument does not have :// in it.

Steps to Reproduce (for bugs)

Single step, so just review the above unexpected result.

Context

I had to read your code ... I was traumatized... just kidding, Im satisfied, just caused frustration

Your Environment

  • Module version used: 0.2.3
  • Operating System and PowerShell version: Win10 1809 (17763.805), 5.1
@jwmoss
Copy link
Owner

jwmoss commented Nov 14, 2019

Well that's embarrassing. Let me update that!

@jwmoss jwmoss closed this as completed Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants