web-dev-qa-db-ja.com

New-ComplianceSearchAction -Previewパラメーターが機能しない

次のコマンドを実行すると、エラーが発生します。この時点までにすべてのコマンドが正常に完了し、67項目が見つかります。

  PS C:\WINDOWS\system32> New-ComplianceSearchAction -SearchName 'PhishingSearch' -Preview
A parameter cannot be found that matches parameter name 'Preview'.
    + CategoryInfo          : InvalidArgument: (:) [New-ComplianceSearchAction], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,New-ComplianceSearchAction
    + PSComputerName        : can01b.ps.compliance.protection.Outlook.com

結果をプレビューして、GUIで取得した結果と比較したいと思っていますが、-Previewパラメーターがないと、実行できません。 Microsoftのドキュメントには、次のパラメータが含まれています。

New-ComplianceSearchActionの例

これが私のコード全体です:

# Create a credential object
$UserCredential = Get-Credential

# Configure a remote session to the Exchange Compliance and Security Module
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.Outlook.com/powershell-liveid -Credential $UserCredential -Authentication Basic -AllowRedirection

# Connect session and import commands
Import-PSSession $Session -AllowClobber -DisableNameChecking

# Create a search query specifying a name, where to look, and the search parameters
New-ComplianceSearch -Name "PhishingSearch" -ExchangeLocation 'All' -ContentMatchQuery "(c:c)(Subject: 'Urgent Request') AND (From:[email protected])"

# Start the search query created above
Start-ComplianceSearch -Identity 'PhishingSearch'

# Check status of the search query
Get-ComplianceSearch  -Identity 'PhishingSearch'
Get-ComplianceSearch  -Identity 'PhishingSearch' | Format-List -Property Items

# Preview the results to compare with the web-results,
New-ComplianceSearchAction -SearchName 'PhishingSearch' -Preview
Get-ComplianceSearchAction  -Identity 'PhishingSearch_Preview' | Format-List -Property Results

# Purge the emails
New-ComplianceSearchAction -SearchName 'PhishingSearch' -Purge -PurgeType SoftDelete
Get-ComplianceSearchAction  -Identity 'PhishingSearch_Purge' 
Get-ComplianceSearchAction  -Identity 'PhishingSearch_Purge' | Format-List -Property Results
2
christopher

マイクロソフトのサポートから返信がありましたが、eDiscovery ManagerまたはeDiscovery Administratorのアクセス許可を割り当てる必要があることがわかりました。私が読んだ他の場所では、私が試した組織管理権限またはコンプライアンス管理者が必要だったので、これは役に立ちます。残りのコマンドは、実際には電子メールを一覧表示しないため、機能します。検索対象の電子メールを実際に使用するには、eDiscoveryのメンバーである必要があります。

https://docs.Microsoft.com/en-us/office365/securitycompliance/assign-ediscovery-permissions

1
christopher

機能が比較的新しい場合は、テナントがホストされているOffice 365でアクセスしているエンドポイントがまだ更新されていないため、更新されたコマンドレットが含まれていない可能性があります。

Microsoftサポートでチケットを作成し、これが事実であることを確認することをお勧めします。また、テナントに更新が適用される時期についてETAを提供できる場合もあります。

セキュリティとコンプライアンスセンターでは、デフォルトで、プレビューの役割はeDiscovery Manager役割グループにのみ割り当てられます。テナントを役割グループに割り当てている場合は、プレビュー役割が役割グループに含まれているかどうかを確認してください。テナントを削除して、役割グループに再度追加することもできます。

0
Kelvin_D