Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 3.07 KB

getgraceperioddays-win32-terminalservicesetting.md

File metadata and controls

85 lines (54 loc) · 3.07 KB
title description ms.assetid ms.tgt_platform keywords topic_type api_name api_location api_type ms.topic ms.date
GetGracePeriodDays method of the Win32_TerminalServiceSetting class
Retrieves the number of days that are remaining in the Remote Desktop Services licensing grace period for a Remote Desktop Session Host (RD Session Host) server. A zero value indicates that the grace period is over.
d84d7815-ee09-43d9-a370-993d23f14898
multiple
GetGracePeriodDays method Remote Desktop Services
GetGracePeriodDays method Remote Desktop Services , Win32_TerminalServiceSetting class
Win32_TerminalServiceSetting class Remote Desktop Services , GetGracePeriodDays method
apiref
Win32_TerminalServiceSetting.GetGracePeriodDays
TSCfgWmi.dll
COM
reference
05/31/2018

GetGracePeriodDays method of the Win32_TerminalServiceSetting class

Retrieves the number of days that are remaining in the Remote Desktop Services licensing grace period for a Remote Desktop Session Host (RD Session Host) server. A zero value indicates that the grace period is over.

Syntax

uint32 GetGracePeriodDays(
  [out] uint32 DaysLeft
);

Parameters

DaysLeft [out]

The number of days that are remaining in the grace period.

Remarks

To connect to the \root\CIMV2\TerminalServices namespace, the authentication level must include packet privacy. For C/C++ calls, this is an authentication level of RPC_C_AUTHN_LEVEL_PKT_PRIVACY. For Visual Basic and scripting calls, this is an authentication level of WbemAuthenticationLevelPktPrivacy or "pktPrivacy", with a value of 6. The following Visual Basic Scripting Edition (VBScript) example shows how to connect to a remote computer with packet privacy.

strComputer = "RemoteServer1" 
Set objServices = GetObject( _
    "winmgmts:{authenticationLevel=pktPrivacy}!Root/CIMv2/TerminalServices")

Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Microsoft Windows Software Development Kit (SDK). They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMv2\TerminalServices
MOF
TSCfgWmi.mof
DLL
TSCfgWmi.dll

See also

Win32_TerminalServiceSetting