hawk icon indicating copy to clipboard operation
hawk copied to clipboard

Select-MgProfile : The term 'Select-MgProfile' is not recognized as the name of a cmdlet

Open Tularis1 opened this issue 1 year ago • 1 comments

When running "Start-HawkTenantInvestigation" after the connection to Microsoft Graph is made, the script throws up;

Select-MgProfile : The term 'Select-MgProfile' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:31 char:9
+         Select-MgProfile -Name "v1.0"
+         ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Select-MgProfile:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Tested on a new Windows 10 Install.

To Reproduce Steps to reproduce the behavior:

Run "Start-HawkTenantInvestigation" Make connection to MS-Graph

Expected behavior No Error ?

Screenshots If applicable, add screenshots to help explain your problem. 2024-04-29 16_20_28-Windows 10 x64 - VMware Workstation

File (please complete the following information):

  • File Name:

Additional context

3.4.0 ExchangeOnlineManagement 3.1.0 Hawk 2.18.0 Microsoft.Graph 1.1.183.66 MSOnline 1.10.318 PSFramework 2.1.0 RobustCloudCommand 0.9.6 PSAppInsights 2.0.2.182 AzureAD

Tularis1 avatar Apr 29 '24 15:04 Tularis1

I ran into the same error and ended up downgrading some of my modules. I also fully reinstalled HAWK. You also need to be careful to connect the modules in the exact order they are in the documentation. Try to downgrade below modules to the provided versions: AzureAD - 2.0.2.180 Microsoft.Graph - 1.28.0

Sucks you need to be running outdated modules, but just a sacrifice that needs to be made I suppose.

syne0 avatar May 12 '24 19:05 syne0