A PowerShell module to access DataConduIT: the WMI namespace of Lenel OnGuard.
| Branch | Status |
|---|---|
| Master | |
| DEV |
- Windows PowerShell version 3.0 (at least)
- A Lenel license for DataConduIT
To avoid name collision between the cmdlet in this module and other cmdlets you can import this module with a prefix.
Import-Module -Name PSDataConduIT -Prefix LnlThis will add a prefix (Lnl) to the noun part of the cmdlet names. For example: Get-Panel will become Get-LnlPanel.
This PowerShell module uses various script variables which all cmdlets will use when they are executed. These global variables are located in Context.ps1 and can be viewed and set with the Get-Context and Set-Context cmdlets.
If you are connecting to a server other than localhost you only need the use the Set-Context cmdlet once per PowerShell session.
OnGuardNamespaceis the default DataConduIT wmi namespace root\OnGuard. This setting cannot be changed using theSet-Contextcmdlet, if you need to connect to an other namespace you can change this setting in the Context.ps1 file.Servercontains the server name on which the cmdlets will be executed. The default value is localhost.Credentialcontains the optional credetials used to connect to a remote server. Local connections do not support using credentials. The default value is none (no credentials).
Most cmdlets allow you to override the context server and credentials settings by specifing the -Server or -Credential parameters.
To view all the available commands simply use the following command:
Get-Command -Module PSDataConduITTo view command specific help use the following command:
Get-Help Get-CardholderShows the server name and credentials of the current context.
SYNTAX:
Get-ContextAllows you to set the context variables.
SYNTAX:
Set-Context [-Server] <string>
Set-Context [-Server] <string> [[-Credential] <pscredential>]To connection to a remote server using credentials.
SYNTAX:
Set-Context -Server remoteservername -Credential (Get-Credential)To remove a credential execute the Set-Context cmdlet without the -Credential parameter.
SYNTAX:
Set-Context -Server localhostNOTE:
Credentials are not supported for local connections.
Displays information and status of the Lenel DataConduIT Windows Service.
SYNTAX:
Get-DataConduITServiceStops the Lenel DataConduIT Windows Service.
SYNTAX:
Stop-DataConduITServiceStarts the Lenel DataConduIT Windows Service.
SYNTAX:
Start-DataConduITServiceGets all access groups or a single access group by AccessGroupID.
SYNTAX:
Get-AccessGroup
Get-AccessGroup [-AccessGroupID <int>]Gets all access levels or a single access level by AccessLevelID or Name.
SYNTAX:
Get-AccessLevel
Get-AccessLevel [-AccessLevelID <int>]
Get-AccessLevel [-Name <string>]Gets all access level assignments or a single access level assignemnt by AccessLevelID and/or BadgeKey.
SYNTAX:
Get-AccessLevelAssignment
Get-AccessLevelAssignment [-AccessLevelID <int>]
Get-AccessLevelAssignment [-BadgeKey <int>]
Get-AccessLevelAssignment [-AccessLevelID <int>] [-BadgeKey <int>]Gets all access level reader assignments or a single access level reader assignemnt by AccessLevelID and/or PanelID and ReaderID.
SYNTAX:
Get-AccessLevelReaderAssignment
Get-AccessLevelReaderAssignment [-AccessLevelID <int>]
Get-AccessLevelReaderAssignment [-PanelID <int>]
Get-AccessLevelReaderAssignment [-ReaderID <int>]
Get-AccessLevelReaderAssignment [-PanelID <int>] [-ReaderID <int>]Gets all antipassback areas or a single antipassback area by AreaID.
SYNTAX:
Get-Area
Get-Area [-AreaID <int>]Gets all badges or a single badge by BadgeID or BadgeKey.
SYNTAX:
Get-Badge
Get-Badge [-BadgeID <long>]
Get-Badge [-BadgeKey <int>]Gets the last badge location for a single badge by BadgeID.
SYNTAX:
Get-BadgeLastLocation
Get-BadgeLastLocation [-BadgeID <long>]Gets all badge types or a single badge badge type by BadgeTypeID.
SYNTAX:
Get-BadgeType
Get-BadgeType [-BadgeTypeID <int>]Gets all cardholders or a single cardholder by PersonID.
SYNTAX:
Get-Cardholder
Get-Cardholder [-PersonID <int>]Gets the current Lenel user account in which context the cmdlets are being executed.
SYNTAX:
Get-CurrentUserGets all directories or a single directory by DirectoryID.
SYNTAX:
Get-Directory
Get-Directory [-DirectoryID <int>]Gets all monitoring zones or a single monitoring zone by MonitoringZoneID.
SYNTAX:
Get-MonitoringZone
Get-MonitoringZone [-MonitoringZoneID <int>]Gets all panels or a single panel by PanelID.
SYNTAX:
Get-Panel
Get-Panel [-PanelID <int>]Get the panel hardware status for the given PanelID.
SYNTAX:
Get-PanelHardwareStatus [-PanelID <int>]Gets the current reader mode for the given PanelID and ReaderID.
SYNTAX:
Get-ReaderMode [-PanelID <int>] [-ReaderID <int>]Gets all segments or a single segment by SegmentID.
SYNTAX:
Get-Segment
Get-Segment [-SegmentID <int>]Gets all segment groups or a single segment group by SegmentGroupID.
SYNTAX:
Get-SegmentGroup
Get-SegmentGroup [-SegmentGroupID <int>]Gets all segment units or a single segment unit by SegmentUnitID.
SYNTAX:
Get-SegmentUnit
Get-SegmentUnit [-SegmentUnitID <int>]Gets all timezones or a single timezone by TimezoneID.
SYNTAX:
Get-Timezone
Get-Timezone [-TimezoneID <int>]Gets all timezone intervals or a single timezone interval by TimezoneIntervalID.
SYNTAX:
Get-TimezoneInterval
Get-TimezoneInterval [-TimezoneIntervalID <int>]Gets all users or a single user by UserID.
SYNTAX:
Get-User
Get-User [-UserID <int>]Gets all user accounts or a single user account by UserAccountID.
SYNTAX:
Get-UserAccount
Get-UserAccount [-UserAccountID <int>]Gets all visits or a single visit by VisitID.
SYNTAX:
Get-Visit
Get-Visit [-VisitID <int>]Gets all visitors or a single visitor by VisitorID.
SYNTAX:
Get-Visitor
Get-Visitor [-VisitorID <int>]Initiates a download database to the panel specified by the given PanelID.
SYNTAX:
Invoke-DownloadDatabase [-PanelID <int>]Initiates a download firmware to the panel specified by the given PanelID.
SYNTAX:
Invoke-DownloadFirmware [-PanelID <int>]Opens a given door by issuing a strike on a reader specified by the given PanelID and ReaderID.
SYNTAX:
Invoke-OpenDoor [-PanelID <int>] [-ReaderID <int>]Refeshes the DataConduIT Manager cache.
SYNTAX:
Invoke-OpenDoorForces a specific panel specified by the given PanelID to update its hardware status.
SYNTAX:
Invoke-UpdateHardwareStatus [-PanelID <int>]Allows you to set a specific reader mode on a reader specified by the given PanelID and ReaderID.
SYNTAX:
Set-ReaderMode [-PanelID <int>] [-ReaderID <int>] [-Mode {Locked | CardOnly | PinOrCard | PinAndCard | Unlocked | FacilityCodeOnly | CypherLock | Automatic} ]Various cmdlets can be used together to get the data you need.
To get the badge type for a specific badge you can use the Get-Badge and Get-BadgeType cmdlets together:
Get-Badge -BadgeID 1 | Get-BadgeTypeTo get the hardware status for a specific panel you can use the Get-Panel and Get-PanelHardwareStatus cmdlets together:
Get-Panel -PanelID 1 | Get-PanelHardwareStatusTo get the current reader mode for a specific reader you can use the Get-Reader and Get-ReaderMode cmdlets together:
Get-Reader -PanelID 1 -ReaderID 1 | Get-ReaderModeTo open a specific door you can use the Get-Reader and Invoke-OpenDoor cmdlets together:
Get-Reader -PanelID 1 -ReaderID 1 | Invoke-OpenDoorSYNTAX:
Restart-DataConduITServiceAlternatively the Stop-DataConduITService and Start-DataConduITService cmdlets can be used together using the PassThru parameter to restart the DataConduIT service.
SYNTAX:
Stop-DataConduITService -PassThru | Start-DataConduITServiceAll cmdlets return objects that contain WMI properties. If you want to export data to a csv file for example you may not want to include these properties. The Remove-WmiProperty cmdlet allows you to easily remove these properties before exporting.
SYNTAX:
Get-Cardholder | Remove-WmiProperty | Export-Csv- Lenel, http://www.lenel.com/
- DataConduIT Manual, http://www.lenel.com/assets/images/solutions/open-integration/DataConduIT.pdf
- Lenel and OnGuard are registered trademarks of Lenel Systems.
