Get-SPOMalwareFile
Extracts and displays the malware-related information of an infected file stored in SharePoint.
Syntax
Default (Default)
Get-SPOMalwareFile
[-FileUri] <Uri>
[<CommonParameters>]
Description
The Get-SPOMalwareFile
cmdlet runs on a single file. If the file is malware-infected then it returns an object of the type SPOMalwareFile
which contains siteURL, filePath, malwareStatus flag, and malwareInfo (if applicable). You must be a SharePoint Online administrator to run the Get-SPOMalwareFile
cmdlet. Note that this cmdlet does not work on files that are not malware-infected.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at Intro to SharePoint Online Management Shell.
Examples
EXAMPLE 1
Get-SPOMalwareFile -FileUri "https://contoso.com/sites/Marketing/Shared Documents/Doc1.docx"
Example 1 returns an object of the type SPOMalwareFile
which contains siteURL, filePath, malwareStatus flag, and malwareInfo (if applicable).
Parameters
-FileUri
Applicable: SharePoint Online
Full URL for the file.
Parameter properties
Type: | System.Uri |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
System.Object
Notes
The Get-SPOMalwareFile
cmdlet returns an object of the type SPOMalwareFile
. To get the file stream of the infected file, pass this object as a parameter to the Get-SPOMalwareFileContent
cmdlet.