# Check-Items This function is executed when clicking the "Check" button within the [Item Tab](/bom_window).\ All the [Items](/code_reference/commandlets/show-bomwindow/objects/item) from the BOM Window can be checked against ERP. ## Syntax ```powershell Check-Items [-Items] ``` ## Parameters | Type | Name | Description | input/output | Mandatory | Default value | |----------------------------------------------------------------------|-------|-----------------------------------|--------------|-----------|---------------| | [Item](/code_reference/commandlets/show-bomwindow/objects/item) \[\] | Items | The Items which should be checked | input | yes | | ## Return type **void** ## Remarks Each **unique** [Item](/code_reference/commandlets/show-bomwindow/objects/item) shown in the BOM Window will be passed to this function. It's recommended to update the [](/bom_window/status) of all the Items with the [](/code_reference/commandlets/show-bomwindow/commandlets/update-bomwindowentity) cmdlet. When an exception is thrown within this function, the BOM Window {ref}`shows the Exception ` message of the terminated Check operation.\ The [](/bom_window/status) of all the [Items](/code_reference/commandlets/show-bomwindow/objects/item) that where not updated, gets automatically changed to *Unknown*. ## Examples **Marking all items that exist on ERP with Status and StatusDetails “Identical”, otherwise as “New”:** ```powershell function Check-Items($items) { foreach($item in $items) { $erp_material = Get-ERPObject -EntitySet 'Materials' -Keys @{'Number' = $item._PartNumber} -Expand "Descriptions" if($erp_material) { $item | Update-BomWindowEntity -Status 'Identical' -StatusDetails 'Item exists in ERP' }else{ $item | Update-BomWindowEntity -Status 'New' -StatusDetails 'Item does not exist in ERP' } } } ```