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

[Bug]: Invoke-RestMethod error on Get-WhoIs #151

Open
4 of 5 tasks
Douda opened this issue Jul 27, 2024 · 1 comment
Open
4 of 5 tasks

[Bug]: Invoke-RestMethod error on Get-WhoIs #151

Douda opened this issue Jul 27, 2024 · 1 comment
Assignees
Labels
bug triage new issue that needs review

Comments

@Douda
Copy link

Douda commented Jul 27, 2024

Describe the problem

Get-WhoIs fails with a specific IP passed

Install-Module PSScriptTools

Get-WhoIs -IPAddress 8.8.8.8

Name IP      RegisteredOrganization NetBlocks  Updated
---- --      ---------------------- ---------  -------
GOGL 8.8.8.8 Google LLC             8.8.8.0/24 28/12/2023 23:24:56

# Testing specific IP

Get-WhoIs -IPAddress 154.62.105.215
Invoke-RestMethod: C:\Users\Douda\Documents\PowerShell\Modules\PSScriptTools\2.50.0\functions\Get-WhoIs.ps1:53
Line |
  53 |  …                    = (Invoke-RestMethod $r.net.orgRef.'#text').org.ci …
     |                                            ~~~~~~~~~~~~~~~~~~~~~
     | Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null
     | or empty, and then try the command again.

Expectation

No response

Additional Information

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.3
PSEdition                      Core
GitCommitId                    7.4.3
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PowerShell version

Other

Platform

Windows 11 Pro or Enterprise

Additional Checks

  • You are using the latest version of this module.
  • You have read this repository's README file.
  • You have read full help and examples for the command you are having problems with.
  • You are running PowerShell in an elevated session.
  • You are running in a traditional PowerShell console or Windows Terminal > Windows Terminal
@Douda Douda added bug triage new issue that needs review labels Jul 27, 2024
@jdhitsolutions
Copy link
Owner

Looks like I need a little error handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage new issue that needs review
Projects
None yet
Development

No branches or pull requests

2 participants