Vitajte na [www.pocitac.win] Pripojiť k domovskej stránke Obľúbené stránky
Import-modul Microsoft.Exchange.Connection.Powershell
Import-modul Microsoft.PowerShell.Utility
$credential =Get-Credential
$session =New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $credential -Authentication Basic -AllowRedirection
$folderName ="Doručená pošta"
$messages =Get-Message -Session $session -Folder "$folderName"
foreach ($message in $messages)
{
Write-Host "Od:$($message.Sender)"
Write-Host "Subject:$($message.Subject)"
Write-Host "Body:$($message.Body)"
# Write-Host "Attachments:$($message.attachments.name)"
}
```