Skip to content

Issue running Invoke-AADIntReconAsOutsider - line 35 #16

@timkatsapas

Description

@timkatsapas

I get the following error when I try to run the command above against a domain that is not using Exchange Online.

Property "nameexchange" cannot be found.
Select-Object C:*\KillChain_utils.ps1:35

I looked and run the commands manually. It seems that the select-object with expandproperty isnt working correctly. Here is your command that is throwing the exception.

Image

I tried the below code to fix it:

This is line 34/35
$results1 = Resolve-DnsName -Name $Domain -Type MX -DnsOnly -NoHostsFile -NoIdn -ErrorAction SilentlyContinue
$results = $results1.NameExchange

This seems to fix the handling of the variables if its not one of the Microsoft EXO domains.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions