Win32_TSSessionDirectory类的 SetSessionDirectoryProperty 方法

设置 类的 SessionDirectoryLocation 属性或 SessionDirectoryClusterName 属性。

语法

uint32 SetSessionDirectoryProperty(
  [in] string PropertyName,
  [in] string Value
);

参数

PropertyName [in]

类型: 字符串

指定方法设置的属性。

SessionDirectoryLocation

该方法正在设置 SessionDirectoryLocation 属性。

SessionDirectoryClusterName

该方法设置 SessionDirectoryClusterName 属性。

[in]

类型: 字符串

PropertyName 参数指定的属性的新值。

返回值

类型: uint32

如果成功,则返回 0,否则返回 WMI 错误代码。 有关这些值的列表,请参阅 远程桌面服务 WMI 提供程序错误代码 。 如果设置处于组策略控制之下,该方法将返回错误。

注解

托管对象格式 (MOF) 文件包含 Windows Management Instrumentation (WMI) 类的定义。 MOF 文件未作为 Microsoft Windows 软件开发工具包 (SDK) 的一部分安装。 使用服务器管理器添加关联的角色时,它们安装在服务器上。 有关 MOF 文件的详细信息,请参阅 托管对象格式 (MOF)

要求

要求
最低受支持的客户端
无受支持的版本
最低受支持的服务器
Windows Server 2008
命名空间
Root\CIMv2\TerminalServices
MOF
TSCfgWmi.mof
DLL
TSCfgWmi.dll

另请参阅

Win32_TSSessionDirectory