[Bug]: -instance is not recognized
sreemanshanker opened this issue · 1 comments
What happened?
When running monkey365, following the examples and documentations i keep getting the following error:
"-Instance:
Line |
2 | -Instance Microsoft365 -Analysis SharePointOnline
| ~~~~~~~~~
| The term '-Instance' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
How to reproduce it
Steps to reproduce the behavior:
- I used the following:
$assets = Invoke-Monkey365 -ExportTo PRINT -PromptBehavior SelectAccount
>> -Instance Microsoft365 -Analysis SharePointOnline
$assets = Invoke-Monkey365 -ExportTo PRINT -PromptBehavior SelectAccount -IncludeAzureActiveDirectory
>> -Instance Office365 -Analysis SharePointOnline
The above (second) one ran, and stopped once it got to the sharepoint scans.
Screenshots or Logs
PS C:\Users\me\Desktop\monkey365> $assets = Invoke-Monkey365 -ExportTo PRINT -PromptBehavior SelectAccount -IncludeAzureActiveDirectory
>> -Instance Office365 -Analysis SharePointOnline
WARNING: [01:44:35:295] - [Get-MonkeyADAuthenticationMethodsPolicy] - The Azure AD authentication policy query did not return any data in <tenantID> tenant - warning - <laptop> - AzurePortalAuthPolicyEmptyResponse
WARNING: [01:44:36:465] - [Get-MonkeyADPasswordPolicy] - The Azure AD password template policy query did not return any data in <tenantID> tenant - warning - <laptop> - AzurePortalTemplatePolicyEmptyResponse
WARNING: [01:44:51:229] - [Get-MonkeyADPortalDeviceSetting] - The Azure AD device settings query did not return any data in <tenantID> tenant - warning - <laptop> - AzurePortalDevicesEmptyResponse
WARNING: [01:44:54:575] - [Get-MonkeyADDirectoryProperty] - The Azure AD B2B directory properties query did not return any data in <tenantID> tenant - warning - <laptop> - AzurePortalEmptyResponse
WARNING: [01:53:21:311] - [Get-MonkeyADMFAConfiguration] - The Azure AD MFA settings query did not return any data in <tenantID> tenant - warning - <laptop> - AzurePortalMFAEmptyResponse
WARNING: [01:53:21:834] - [Get-MonkeyADRoamingInfo] - The Azure AD Roaming properties query did not return any data in <tenantID> tenant - warning - <laptop> - AzurePortalRoamingEmptyResponse
-Instance:
Line |
2 | -Instance Office365 -Analysis SharePointOnline
| ~~~~~~~~~
| The term '-Instance' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
From where are you running Monkey365?
Please, complete the following information:
- Resource: Workstation
- OS: Windows 10
- PowerShell Version: PSVersion 7.2.6
- Monkey365 Version: v0.7-beta
- Others:
Additional context
Just want to say thanks for this tool !
Hi @sreemanshanker thanks for submitting this. This is not a bug, and is more about how PowerShell handles parameters. It seems that there is a new line between parameters, instead of a backtick or splatted command.
You can use the backtick ` (escape character) if you want to split command into multiple statements.
The following command will work (Please, note the backtick at the end of first line)
$asset = Invoke-Monkey365 -ExportTo PRINT -PromptBehavior SelectAccount `
-Instance Microsoft365 -Analysis SharepointOnline
Hope that helps.
Cheers,