Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The OpenRemoteMachineGPO method opens the default GPO for the specified remote computer and optionally loads the registry information.
Syntax
HRESULT OpenRemoteMachineGPO(
[in] LPOLESTR pszComputerName,
[in] DWORD dwFlags
);
Parameters
[in] pszComputerName
Specifies the name of the computer. The format of the name is \\ComputerName.
[in] dwFlags
Specifies whether or not the registry information should be loaded for the GPO. This parameter can be one of the following values.
GPO_OPEN_LOAD_REGISTRY
Load the registry information.
GPO_OPEN_READ_ONLY
Open the GPO in read-only mode.
Return value
If the method succeeds, the return value is S_OK. Otherwise, the method returns one of the COM error codes defined in the Platform SDK header file WinError.h.
Remarks
To retrieve the computer name of a remote GPO, you can call the GetMachineName method. Call OpenLocalMachineGPO to open the default GPO for a local computer.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | gpedit.h |
DLL | Gpedit.dll |