monkey365 icon indicating copy to clipboard operation
monkey365 copied to clipboard

[Bug]: VerbosePreference property not found on this object

Open silverhack opened this issue 6 months ago • 5 comments

What happened?

Originally posted by @roohfelix

Hi everyone,

I'm currently using Monkey365 (v0.95.1) to run a Microsoft 365 security assessment. I'm executing a collection that includes AdminPortal, ExchangeOnline, MicrosoftTeams, and SharePointOnline (Purview was excluded due to connection issues).

However, when I run the following:

$options = @{ Instance = 'Microsoft365'; Collect = @('AdminPortal','ExchangeOnline','MicrosoftTeams','SharePointOnline'); PromptBehavior = 'SelectAccount'; IncludeEntraID = $true; ExportTo = @('CSV', 'HTML'); WriteLog = $true; } Invoke-Monkey365 @options

I get this error:

Write-Error : [Invoke-M365Scanner] - Unable to create var object: The property 'VerbosePreference' was not found on this object. Verify that the property exists. At C:\Monkey365\core\tasks\Initialize-MonkeyScan.ps1:99 char:13

throw ("{0}: {1}" -f "Unable to create var object",$_.Exception.Message) Has anyone run into this issue?

Thanks in advance to anyone who can share insights or confirm the best approach.

silverhack avatar May 27 '25 16:05 silverhack

Hey all I can confirm that it's a bug and only appears when the -Verbose option is not set. I'll add this as a new issue.

In the meantime you can use the following:

$options = @{
    Instance = 'Microsoft365';
    Collect = @('AdminPortal','ExchangeOnline','MicrosoftTeams','SharePointOnline');
    PromptBehavior = 'SelectAccount';
    IncludeEntraID = $true;
    ExportTo = @('CSV', 'HTML');
    WriteLog = $true;
    Verbose = $true;
    Debug = $true;
}
Invoke-Monkey365 @options

Could you please let me know if the above works for you?

Thanks for catching this @roohfelix! It's really appreciated.

Cheers,

silverhack avatar May 27 '25 17:05 silverhack

Hey @roohfelix could you please check the dev branch and do let me know?

Thanks!

silverhack avatar May 27 '25 17:05 silverhack

@silverhack I also encountered the problem and can confirm it is fixed in the dev branch (0.95.2).

taikuli avatar May 28 '25 07:05 taikuli

Thanks mate! I'll then update the main branch shortly.

Cheers

silverhack avatar May 28 '25 11:05 silverhack

Hi all,

Main branch was updated, and a new release was published to the PowerShell Gallery.

Thank you all for your support. It's really appreciated.

silverhack avatar May 29 '25 17:05 silverhack

This issue has been automatically marked as stale because it has not had recent activity. We kindly ask you to check again if the issue you reported is still relevant in the current version of Monkey365. If it is, update this issue with a comment, otherwise it will be automatically closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 27 '25 02:09 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. If the issue is still relevant, feel free to re-open it or open a new one.

github-actions[bot] avatar Oct 11 '25 02:10 github-actions[bot]