Get-ItemState¶
SYNOPSIS¶
Obtiene el itemState de todos los elementos conocidos del sitio.
SYNTAX¶
DESCRIPTION¶
Envía un mensaje MessageCommunication.ProvideCurrentStateRequest y devuelve la respuesta.
La ProvideCurrentStateResponse contiene una ilustración de objetos ItemState que representan el estado de todos los elementos conocidos en el sitio. Cada ItemState contiene una propiedad FQID y State. Los FQID.Kind y FQID.ObjectId se pueden usar para determinar qué tipo de objeto representa el estado y el identificador de ese objeto.
La mayoría de las veces, probablemente solo le interesarán los objetos de la Cámara, por lo que puede filtrar la salida con el switch -CamerasOnly.
REQUIREMENTS
- Requires VMS connection and will attempt to connect automatically
EXAMPLES¶
EXAMPLE 1¶
Get-ItemState -CamerasOnly | Where-Object State -ne "Responding" | Foreach-Object { $camera = Get-VmsCamera -Id $_.FQID.ObjectId; Write-Warning "Camera $($camera.Name) state is $($_.State)" }
Escribe una advertencia para cada cámara que se encuentre con un estado que no "Responda".
EXAMPLE 2¶
Get-ItemState -CamerasOnly | ForEach-Object {
$camera = Get-VmsCamera -Id $_.FQID.ObjectId
$hardwareId = $camera.ParentItemPath | Split-VmsConfigItemPath -Id
Get-VmsHardware -Id $hardwareId
}
powershell
Obtiene el objeto Hardware asociado para cada resultado de Camera ItemState.
PARAMETERS¶
-CamerasOnly¶
Filtrar los resultados de ItemState a elementos de la cámara.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.