Provides an enumerator to access the security policy hierarchy by levels, such as computer policy and user policy.
[Visual Basic] Public Shared Function PolicyHierarchy() As IEnumerator [C#] public static IEnumerator PolicyHierarchy(); [C++] public: static IEnumerator* PolicyHierarchy(); [JScript] public static function PolicyHierarchy() : IEnumerator;
|SecurityException||The code that calls this method does not have SecurityPermissionFlag.ControlPolicy.|
The returned enumerator provides successive PolicyLevel objects that represent the policy at the respective (machine, user, enterprise, application domain) level of the hierarchy. These objects are the live policy objects; altering these objects can have unpredictable results.
Minimum policy hierarchy consists of a machine level, an enterprise level, and a user level. However, the hierarchy can include additional levels.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- SecurityPermission for the ability to view and modify policy. Associated enumeration: SecurityPermissionFlag.ControlPolicy