|
| 1 | +--- |
| 2 | +Module Name: PnP.PowerShell |
| 3 | +schema: 2.0.0 |
| 4 | +applicable: SharePoint Online |
| 5 | +online version: https://pnp.github.io/powershell/cmdlets/Remove-PnPSearchExternalItem.html |
| 6 | +external help file: PnP.PowerShell.dll-Help.xml |
| 7 | +title: Remove-PnPSearchExternalItem |
| 8 | +--- |
| 9 | + |
| 10 | +# Remove-PnPSearchExternalItem |
| 11 | + |
| 12 | +## SYNOPSIS |
| 13 | + |
| 14 | +**Required Permissions** |
| 15 | + |
| 16 | + * Microsoft Graph API : One of ExternalItem.ReadWrite.OwnedBy, ExternalItem.ReadWrite.All as a delegate or application permission |
| 17 | + |
| 18 | +Removes an external item from an external connector in Microsoft Search |
| 19 | + |
| 20 | +## SYNTAX |
| 21 | + |
| 22 | +```powershell |
| 23 | +Remove-PnPSearchExternalItem -ItemId <String> -ConnectionId <SearchExternalConnectionPipeBind> [-Verbose] [-Connection <PnPConnection>] |
| 24 | +``` |
| 25 | + |
| 26 | +## DESCRIPTION |
| 27 | + |
| 28 | +This cmdlet can be used to remove a specific external item from a Microsoft Search custom connector. The item will be removed from the index and will no longer be available for search results. |
| 29 | + |
| 30 | +## EXAMPLES |
| 31 | + |
| 32 | +### EXAMPLE 1 |
| 33 | +```powershell |
| 34 | +Remove-PnPSearchExternalItem -ConnectionId "pnppowershell" -ItemId "12345" |
| 35 | +``` |
| 36 | + |
| 37 | +This will remove the external item with the identifier "12345" from the external Microsoft Search index connector named "pnppowershell". |
| 38 | + |
| 39 | +## PARAMETERS |
| 40 | + |
| 41 | +### -Connection |
| 42 | +Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection. |
| 43 | + |
| 44 | +```yaml |
| 45 | +Type: PnPConnection |
| 46 | +Parameter Sets: (All) |
| 47 | +Required: False |
| 48 | +Position: Named |
| 49 | +Default value: None |
| 50 | +Accept pipeline input: False |
| 51 | +Accept wildcard characters: False |
| 52 | +``` |
| 53 | +
|
| 54 | +### -ItemId |
| 55 | +Unique identifier of the external item in Microsoft Search that you wish to remove. |
| 56 | +
|
| 57 | +```yaml |
| 58 | +Type: String |
| 59 | +Parameter Sets: (All) |
| 60 | +Required: True |
| 61 | +Position: Named |
| 62 | +Default value: None |
| 63 | +Accept pipeline input: False |
| 64 | +Accept wildcard characters: False |
| 65 | +``` |
| 66 | +
|
| 67 | +### -ConnectionId |
| 68 | +The Connection ID or connection instance of the custom connector to use. This is the ID that was entered when registering the custom connector and will indicate for which custom connector this external item is being removed from the Microsoft Search index. |
| 69 | +
|
| 70 | +```yaml |
| 71 | +Type: SearchExternalConnectionPipeBind |
| 72 | +Parameter Sets: (All) |
| 73 | +Required: True |
| 74 | +Default value: None |
| 75 | +Accept pipeline input: True |
| 76 | +Accept wildcard characters: False |
| 77 | +``` |
| 78 | +
|
| 79 | +### -Verbose |
| 80 | +When provided, additional debug statements will be shown while executing the cmdlet. |
| 81 | +
|
| 82 | +```yaml |
| 83 | +Type: SwitchParameter |
| 84 | +Parameter Sets: (All) |
| 85 | + |
| 86 | +Required: False |
| 87 | +Position: Named |
| 88 | +Default value: None |
| 89 | +Accept pipeline input: False |
| 90 | +Accept wildcard characters: False |
| 91 | +``` |
| 92 | +
|
| 93 | +## RELATED LINKS |
| 94 | +
|
| 95 | +[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) |
| 96 | +[Microsoft Graph documentation](https://learn.microsoft.com/graph/api/externalconnectors-externalitem-delete) |
0 commit comments