共用方式為


Get-ScannerRepository

取得 Microsoft Purview 資訊保護 掃描器內容掃描作業的存放庫數據。

Syntax

Get-ScannerRepository
   [-Path <String>]
   [<CommonParameters>]

Description

取得內容掃描作業設定為掃描的數據存放庫清單。

如需內容掃描作業的詳細資訊,請參閱 Microsoft Purview 資訊保護 掃描器檔

範例

範例 1 取得內容掃描作業所有存放庫的詳細數據

PS C:\WINDOWS\system32> Get-ScannerRepository

Path: c:\repoToScan1
OverrideContentScanJob: Off
EnableDlp: Off
Enforce: On
LabelFilesByContent: On
RelabelFiles: Off
AllowLabelDowngrade: Off
EnforceDefaultLabel: Off
DefaultLabelType: PolicyDefault
DefaultLabelID: 
DefaultOwner: Scanner
RepositoryOwner:
PreserveFileDetails: On
IncludeFileTypes: 
ExcludeFileTypes: .lnk,.exe.,.com,.cmd,.bat,.dll,.ini,.sca,.drm,.sys,.cpl,.inf,.drv,.dat,.tmp,.msp,.msi,.pdb,.jar,.ocx,.rtf,.rar,.msg

Path: c:\repoToScan2
OverrideContentScanJob: On
EnableDlp: Off
Enforce: Off
LabelFilesByContent: On
RelabelFiles: On
AllowLabelDowngrade: On
EnforceDefaultLabel: Off
DefaultLabelType: PolicyDefault
DefaultLabelID: 
DefaultOwner: Scanner
RepositoryOwner:
PreserveFileDetails: On
IncludeFileTypes: 
ExcludeFileTypes: .lnk,.exe.,.com,.cmd,.bat,.dll,.ini,.sca,.drm,.sys,.cpl,.inf,.drv,.dat,.tmp,.msp,.msi,.pdb,.jar,.ocx,.rtf,.rar,.msg

此範例顯示回應,其中包含針對內容掃描作業設定的所有存放庫。

範例 2 取得內容掃描作業中特定存放庫的詳細數據

PS C:\WINDOWS\system32> Get-ScannerRepository -Path 'c:\repoToScan1'

Path: c:\repoToScan1
OverrideContentScanJob: Off
EnableDlp: Off
Enforce: On
LabelFilesByContent: On
RelabelFiles: Off
AllowLabelDowngrade: Off
EnforceDefaultLabel: Off
DefaultLabelType: PolicyDefault
DefaultLabelID: 
DefaultOwner: Scanner
RepositoryOwner:
PreserveFileDetails: On
IncludeFileTypes: 
ExcludeFileTypes: .lnk,.exe.,.com,.cmd,.bat,.dll,.ini,.sca,.drm,.sys,.cpl,.inf,.drv,.dat,.tmp,.msp,.msi,.pdb,.jar,.ocx,.rtf,.rar,.msg

此範例顯示回應,其中包含針對內容掃描作業設定的所有存放庫。

參數

-Path

定義您想要傳回資料之特定存放庫的路徑。

此參數值必須是內容掃描作業中所定義的確切路徑或路徑模式。

不過,此參數也支援星號 * 和問號 ? 通配符:

例如:

  • 輸入 -Path c:\repo? 會傳回任何名為 存放庫的存放庫詳細數據,並加上額外的單一字元後綴,例如 c:\repo1

  • 輸入 -Path c:\repo* 會傳回任何具名 存放庫 的詳細數據,其中包含任何額外的字元作為後綴,例如 c:\repoToScan

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

輸入

None

輸出

System.Object