diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs index 189a0efd0d46..8721e39eacbe 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs @@ -14,6 +14,11 @@ public bool IsMet { get { + if (!OperatingSystem.IsWindows()) + { + return false; + } + var identity = WindowsIdentity.GetCurrent(); var principal = new WindowsPrincipal(identity); return principal.IsInRole(WindowsBuiltInRole.Administrator) || SkipInVSTSAttribute.RunningInVSTS;