mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Remove Platform.HasGroupPolicySupport query
This commit is contained in:
@@ -217,12 +217,6 @@ namespace System.Management.Automation
|
||||
|
||||
}
|
||||
|
||||
// Linux does not have group policy support
|
||||
internal static bool HasGroupPolicySupport()
|
||||
{
|
||||
return IsWindows;
|
||||
}
|
||||
|
||||
// non-windows does not have network drive support
|
||||
internal static bool HasNetworkDriveSupport()
|
||||
{
|
||||
|
||||
@@ -649,13 +649,9 @@ namespace System.Management.Automation
|
||||
|
||||
internal static Dictionary<string, object> GetGroupPolicySetting(string groupPolicyBase, string settingName, RegistryKey[] preferenceOrder)
|
||||
{
|
||||
if (!Platform.HasGroupPolicySupport())
|
||||
{
|
||||
// Porting note: No group policy support means we have an empty set of
|
||||
// policies.
|
||||
return _emptyDictionary;
|
||||
}
|
||||
|
||||
#if LINUX
|
||||
return _emptyDictionary;
|
||||
#else
|
||||
lock (cachedGroupPolicySettings)
|
||||
{
|
||||
// Return cached information, if we have it
|
||||
@@ -730,6 +726,7 @@ namespace System.Management.Automation
|
||||
|
||||
return settings;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
static ConcurrentDictionary<string, Dictionary<string, object>> cachedGroupPolicySettings =
|
||||
new ConcurrentDictionary<string, Dictionary<string, object>>();
|
||||
|
||||
Reference in New Issue
Block a user