Get-MdpModules

SYNOPSIS

Gets the MDP (Modular Device Profile) modules and parameters of the target system.

SYNTAX

NetIdPort (Default)

Get-MdpModules [-NetId <AmsNetId>] [-Timeout <Int32>] [-Module <MdpModuleType>] [-Area <MdpArea>]
 [-Table <String>] [-PropertyName <String>] [-ServiceObjects]
 [<CommonParameters>]

AddressStr

Get-MdpModules [-Address] <String> [-Timeout <Int32>] [-Module <MdpModuleType>] [-Area <MdpArea>]
 [-Table <String>] [-PropertyName <String>] [-ServiceObjects]
 [<CommonParameters>]

Route

Get-MdpModules [-InputObject] <IRoute> [-Timeout <Int32>] [-Module <MdpModuleType>] [-Area <MdpArea>]
 [-Table <String>] [-PropertyName <String>] [-ServiceObjects]
 [<CommonParameters>]

Session

Get-MdpModules -Session <ISession> [-Timeout <Int32>] [-Module <MdpModuleType>] [-Area <MdpArea>]
 [-Table <String>] [-PropertyName <String>] [-ServiceObjects]
 [<CommonParameters>]

DESCRIPTION

This Cmdlet scans the MDP modules available on the specified target system and reads their configuration parameters. To contact the target system, it must be available as an actual route. The result contains module parameters including ModuleID, ModuleType, TableID, TableName, SubIndex, Name, DataType, Access, and Value.

Use the -Module parameter to filter by module type, -Table to filter by table name, and -PropertyName to filter by parameter name. Use -Area to read from different MDP areas (Configuration, General, Device, ServiceTransfer). Use -ServiceObjects to list available asynchronous service transfer operations.

This cmdlet is preliminary and subject to change.

EXAMPLES

Example 1

PS> Get-MdpModules

ModuleID ModuleType TableID TableName SubIndex Name         Value
-------- ---------- ------- --------- -------- ----         -----
1        NIC        1       IP         1       IPAddress    192.168.1.10
1        NIC        1       IP         2       SubnetMask   255.255.255.0
2        Time       1       Settings   1       UTCOffset    60

Scans all MDP modules on the local system and reads their configuration parameters.

Example 2

PS> Get-MdpModules -NetId 5.62.192.46.1.1 -Module NIC

ModuleID ModuleType TableID TableName SubIndex Name         Value
-------- ---------- ------- --------- -------- ----         -----
1        NIC        1       IP         1       IPAddress    172.17.60.100
1        NIC        1       IP         2       SubnetMask   255.255.255.0

Gets MDP parameters for the NIC module from a remote target.

Example 3

PS> Get-MdpModules -Module NIC -Table IP -PropertyName *Address*

ModuleID ModuleType TableID TableName SubIndex Name         Value
-------- ---------- ------- --------- -------- ----         -----
1        NIC        1       IP         1       IPAddress    192.168.1.10

Filters MDP parameters by module type, table name, and property name with wildcard support.

Example 4

PS> Get-MdpModules -Module Generic

ModuleID ModuleType TableID TableName SubIndex Name              Value
-------- ---------- ------- --------- -------- ----              -----
0        General    0       DevInfo    1       DeviceName        CX-123456
0        General    0       DevInfo    2       SerialNumber      12345

Reads General Area parameters using the virtual 'Generic' module type.

Example 5

PS> Get-MdpModules -ServiceObjects -Module NIC

ModuleID ModuleType TableID MethodName             DisplayName            Description
-------- ---------- ------- ----------             -----------            -----------
1        NIC        1       ApplyNetworkSettings   Apply Network Settings Applies pending network configuration

Lists the available service transfer objects (asynchronous operations) for the NIC module.

PARAMETERS

-NetId

NetId of the target system. Tab completion: Completes AmsNetId values from currently reachable routes on the local TwinCAT system. The target system AmsNetId.

Type: AmsNetId
Parameter Sets: NetIdPort
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Address

The address where to get the MDP modules. This can be the RouteName, NetId, the HostName or the IPAddress. Wildcards are permitted. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system. The target system address.

Type: String
Parameter Sets: AddressStr
Aliases: Name

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-InputObject

The route object where to get the MDP modules from. Can be piped from Get-AdsRoute. Tab completion: Completes route names from currently reachable ADS systems on the local TwinCAT system. The target route object.

Type: IRoute
Parameter Sets: Route
Aliases: Destination, Route

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Session

An existing ADS session to use for communication with the target system. The ADS session.

Type: ISession
Parameter Sets: Session
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Timeout

The communication ADS timeout in milliseconds. A value of 0 disables the timeout. A value <= 0 sets the Default (5000 ms). The ADS communication timeout in milliseconds.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: -1
Accept pipeline input: False
Accept wildcard characters: False

-Module

The MDP module type to filter by (e.g. NIC, Time, UserManagement, TwinCAT, Firewall). Use 'Generic' to read General Area parameters directly without scanning modules. The module type filter.

Possible values: Generic, AccessControl, NIC, Time, UserManagement, RAS, FTP, SMB, TwinCAT, Datastore, Software, CPU, Memory, Firewall, FileSystemObject, PLC, DisplayDevice, EWF, FBWF, SiliconDrive, OS, Raid, Fan, Mainboard, DiskManagement, UPS, PhysicalDrive, MassStorage, UWF, IO, Misc

Type: MdpModuleType
Parameter Sets: (All)
Aliases:
Accepted values: Generic, AccessControl, NIC, Time, UserManagement, RAS, FTP, SMB, TwinCAT, Datastore, Software, CPU, Memory, Firewall, FileSystemObject, PLC, DisplayDevice, EWF, FBWF, SiliconDrive, OS, Raid, Fan, Mainboard, DiskManagement, UPS, PhysicalDrive, MassStorage, UWF, IO, Misc

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Area

The MDP area to read from. Valid values are Configuration (default), General, Device, and ServiceTransfer. When set to General or Device, the cmdlet reads area-specific tables directly without scanning modules. When set to ServiceTransfer, it reads the raw service transfer parameters (Trigger, Status, StatusAndData). The MDP area.

Possible values: General, Configuration, ServiceTransfer, Device

Type: MdpArea
Parameter Sets: (All)
Aliases:
Accepted values: General, Configuration, ServiceTransfer, Device

Required: False
Position: Named
Default value: Configuration
Accept pipeline input: False
Accept wildcard characters: False

-Table

Filter tables by Name or DisplayName. Supports wildcards (e.g. User or Domain). When -ServiceObjects is set, this filters by MethodName or DisplayName of the transfer object instead. The table name filter.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-PropertyName

Filter by entry name. In standard mode this matches the table entry (sub-index) Name or DisplayName. When -ServiceObjects is set, this matches the MethodName or DisplayName of the transfer object. Supports wildcards (e.g. Mem or Group*).

Type: String
Parameter Sets: (All)
Aliases: MethodName

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-ServiceObjects

When specified, returns the Service Transfer objects of the modules instead of Configuration Area parameters. Service Transfer objects describe asynchronous operations available on the target (e.g. AddRoute, Reboot, FileTransfer, ApplyNetworkSettings). Use this to discover operations that can be executed with Write-MdpTransferObject. Whether to return service transfer objects.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
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.

INPUTS

TwinCAT.IRoute

TwinCAT.ISession

OUTPUTS

NOTES