Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ Example 2 returns the file stream.
### EXAMPLE 3

```powershell
$SPOFileUri = "https://contoso.com/sites/Marketing/Shared Documents/Doc1.docx"
$spoFileUri = "https://contoso.com/sites/Marketing/Shared Documents/Doc1.docx"

$fileName = $SPOFileUri.split("/")[-1]
$localFolder = ".\$fileName"
$fileName = $spoFileUri.split("/")[-1]
$localFolder = "C:\temp\$fileName"
$targetfile = New-Object IO.FileStream ($localFolder,[IO.FileMode]::Create)
[byte[]]$readbuffer = New-Object byte[] 1024

$file = Get-SPOMalwareFile -FileUri $SPOFileUri
$file = Get-SPOMalwareFile -FileUri $spoFileUri
$responseStream = Get-SPOMalwareFileContent -MalwareInfectedFile $file
do{
$readlength = $responsestream.Read($readbuffer,0,1024)
Expand Down Expand Up @@ -102,7 +102,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## NOTES

To get the `SPOMalwareFile` object, the user should execute the `Get-SPOMalwareFile` cmdlet first. Then that object can be used as a parameter to the `Get-SPOMalwareFileContentContent` cmdlet.
To get the `SPOMalwareFile` object, the user should execute the `Get-SPOMalwareFile` cmdlet first. Then that object can be used as a parameter to the `Get-SPOMalwareFileContent` cmdlet.

## RELATED LINKS

Expand Down