Get User Submissions via Powershell to Mark them

Copper Contributor

Hello all,

 

currently I try to find out how to load all User submissions in powershell and use the "Mark as and notify" feature on it. 

 

Attached you find a screenshot what I eactly mean:

pic2.png

 

Is this possible to make via Powershell ? I couldnt find not a single command for this on google.

 

Thank you very much

7 Replies
Thank you for the reply. UnfortunatelyIam not trained and never used Microsoft Graph so a Powershell command would be better. If I look at your link I dont understand anything. So i guess there no powershell command out there, right ? A yes would also answer this question
The Get-MgSecurityThreatSubmissionEmailThreat cmdlet from the "Security" module of the Microsoft Graph SDK for PowerShell should do. Unfortunately, said module is poorly documented, to the point that it's easier to use the API directly. Here's the corresponding "help" article, just in case: https://docs.microsoft.com/en-us/powershell/module/microsoft.graph.security/get-mgsecuritythreatsubm...

@Vasil Michev thank you so far for the help.

 

Iam completly new with Microsoft Graph. Iam not sure how to get the security module.

 

I installed the Microsoft Graph SDK for Powershell. 

Used both commands to connect to Graph (and beta to get the commands)

Select-MgProfile -Name "beta"
Connect-MgGraph

 

But Powershell still doesent know the cmdlet for Get-MgSecurityThreatSubmissionEmailThreat 

What do I need to do to import all the "MGSecurity" commands ?

 

Thank you very much

 

Which version of the modules you got?

[18:09:54][O365]# Get-Command Get-MgSecurityThreatSubmissionEmailThreat

CommandType Name Version Source
----------- ---- ------- ------
Function Get-MgSecurityThreatSubmissionEmailThreat 1.11.1 Microsoft.Graph.Security

@Vasil Michev 

 

Thank you for the reply. I dont get any mgsecurity Commands like "Get-MGSecurity".

 

Which cmdlet do I need to load to unlock all "MGsecurity" commands ?

 

Connect-MgGraph
Welcome To Microsoft Graph!

Get-Command : The term 'Get-MgSecurityThreatSubmissionEmailThreat' 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:1 char:1
+ Get-Command Get-MgSecurityThreatSubmissionEmailThreat
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-MgSecurityT...sionEmailThreat:String) [Get-Command], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-MgGraph.Security:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

 

this is the only command I have starting with Get-MGSe(curity)

 

pic3.png

You have to switch to the beta profile first. Do you have the Microsoft.Graph.Security module at all?

For the record, it's working on PowerShell 7, haven't tried the old ISE.