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

Had to make a change to avoid $null errors #4

Closed
OutOfThisPlanet opened this issue Sep 12, 2022 · 1 comment
Closed

Had to make a change to avoid $null errors #4

OutOfThisPlanet opened this issue Sep 12, 2022 · 1 comment

Comments

@OutOfThisPlanet
Copy link

OutOfThisPlanet commented Sep 12, 2022

I don't know how to make a commit on GitHub, so I will just comment here:

I have changed the following line :

$Service = $PortsHashTable.Get_Item($Job_Result.Port).Split('|')

To this :

if ($PortsHashTable.Get_Item($Job_Result.Port))
{
    $Service = $PortsHashTable.Get_Item($Job_Result.Port).Split('|')
}
else
{
    $service = @("Unknown","Unknown")
}

This is because there are $null errors for certain SharePoint ports, which messes up the output in the console window.

@BornToBeRoot
Copy link
Owner

Thanks!

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