Sets the hardware driver to use for an existing hardware device.
Set-VmsHardwareDriver cmdlet is used to invoke the "ReplaceHardware"
configuration api method ID on a
Hardware object. This method ID was
introduced in XProtect VMS version 2023 R1, and this cmdlet is compatible only
with version 2023 R1 and later.
This cmdlet may be used to perform a "hardware replacement" which has traditionally only been possible to do through the "Replace Hardware Wizard" in the management client. In some cases you might perform this action to "refresh" an existing camera without changing the driver - for example, many cameras have a dynamic set of events available depending on settings or plugins on the camera itself. A hardware replacement procedure would force the recording server to re-discover the available features on the camera.
You may also use this cmdlet to change the driver used for a camera. For
example, you may wish to switch from an ONVIF driver to a dedicated driver. To
do so, you can supply a hardware driver object, driver number, or a driver name
If a hardware replacement fails, the TargetObject property of the
will contain an object of type
ReplaceHardwareTaskInfo. This error record
can be used to help determine which hardware replacements failed when performing
many operations in bulk. See the examples for reference.
- Requires VMS connection and will attempt to connect automatically
- Requires VMS version 23.1
Prompts for a hardware device selection, and then performs a hardware replacement without modifying the driver. If the resulting hardware change would result in a different number of camera channels connected to the hardware, the replace will fail since "AllowDeletingDisabledDevices" was not specified.
-Confirm:$false is present, no confirmation will be required before
Prompts for a hardware device selection, and then performs a hardware
replacement with the "AXIS" driver, driver number 806. You could also specify
the integer 806 instead of "AXIS", as a custom argument transformation will
take care of converting either the name or driver number to the corresponding
hardware driver object as is returned by
Prompts for a hardware device selection, and then informs what would happen
if you attempted to set the hardware driver to driver number 421, "Universal 1
channel driver". Remove the
-WhatIf switch to execute the hardware driver
Prompts for a hardware device selection, and then attempts to replace the driver
with the "Axis One-click" driver. Assuming this fails, the
ArrayList will be populated with an
ErrorRecord, and the
property of that record will be an object with the HardwareName, HardwarePath,
RecorderPath, and Task properties. This information can be used to produce
a report of hardware replacements that have failed and might need to be retried
or performed manually.
Specifies the new hardware address in URI format. For example: http://192.168.1.101
Specifies that if the resulting hardware configuration has fewer camera, microphone, speaker, input, output, or metadata channels than the number of enabled channels prior to hardware replacement, the disabled device channels may be deleted in order to complete the hardware replacement. If there are more enabled device channels than available in the resulting hardware configuration, the hardware replacement will not proceed.
Specifies new credentials to use for the specified hardware device. If the credentials have not changed, the current username and password will be used automatically.
Reserved for future use.
Specifies the new HardwareDriver object to use with the hardware device, or the driver number, or the full driver name. When supplying a driver name or number, it will be automatically translated to a HardwareDriver object for ease of use.
Specifies one or more hardware objects returned by
Get-VmsHardware on which
to perform the hardware replacement.
Pass the updated hardware object back to the pipeline on a successful hardware replacement.
Prompts you for confirmation before running the cmdlet.
Shows what would happen if the cmdlet runs. The cmdlet is not run.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This cmdlet accepts one or more Hardware objects from the pipeline, or by named parameter.
When invoked with the
-PassThru switch parameter, this cmdlet returns the
updated hardware object(s).