Partager via


DevicePropertyFactory.CreateRDPStatusProperty Method (RDPStatus, Boolean)

 

Create an RDPStatusProperty object that contains information about the Remote Desktop (RDP) status of a device.

Namespace:   Microsoft.WindowsServerSolutions.Common.Devices
Assembly:  DevicesOM (in DevicesOM.dll)

Syntax

public static RDPStatusProperty CreateRDPStatusProperty(
    RDPStatus status,
    bool blockedByFW
)
public:
static RDPStatusProperty^ CreateRDPStatusProperty(
    RDPStatus status,
    bool blockedByFW
)
Public Shared Function CreateRDPStatusProperty (
    status As RDPStatus,
    blockedByFW As Boolean
) As RDPStatusProperty

Parameters

  • blockedByFW
    Type: System.Boolean

    true if the firewall blocks the RDP port; otherwise false.

Return Value

Type: Microsoft.WindowsServerSolutions.Common.Devices.RDPStatusProperty

An instance of RDPStatusProperty.

Examples

The following code example shows how to create an RDPStatusProperty object:

RDPStatus status = RDPStatus.Available;
bool blockedyByFW = false;      

// create the rdp status property
RDPStatusProperty rdpStatusProperty = 
   DevicePropertyFactory.CreateRDPStatusProperty(status, blockedyByFW);

Console.WriteLine("Status = {0}", rdpStatusProperty.Status);
Console.WriteLine("Blocked By Firewall = {0}", 
   rdpStatusProperty.BlockedByFirewall);

// expected output
// Status = Available
// Blocked By Firewall = False

See Also

DevicePropertyFactory Class
Microsoft.WindowsServerSolutions.Common.Devices Namespace

Return to top