powershell – list local users and their groups
For Googlers, another way to get a list of users is to use: Get-WmiObject -Class Win32_UserAccount From http://buckeyejeeps.com/blog/?p=764
For Googlers, another way to get a list of users is to use: Get-WmiObject -Class Win32_UserAccount From http://buckeyejeeps.com/blog/?p=764
Note to people using this. When using literal strings for the FileSystemAccessRule, it should be WellKnownSidType.WorldSid instead of “everyone”. The reason is because there are multiple Window languages and Everyone only applies to EN ones, so for Spanish, it might be “Todos” (or something else). using System.Security.AccessControl; using System.Security.Principal; using System.IO; private void GrantAccess(string fullPath) … Read more
Though I haven’t personally tested, I have good reason to believe that the above stated AT COMMAND solution will work for XP, 2000 and Server 2003. Per my and Bryant’s testing, we’ve identified that the same approach does not work with Vista or Windows Server 2008 — most probably due to added security and the … Read more
Below I have put together everything I learned about Starting/Stopping a Windows Service from a non-Admin user account, if anyone needs to know. Primarily, there are two ways in which to Start / Stop a Windows Service. 1. Directly accessing the service through logon Windows user account. 2. Accessing the service through IIS using Network … Read more
This is a very good question and sadly many developers don’t ask enough questions about IIS/ASP.NET security in the context of being a web developer and setting up IIS. So here goes…. To cover the identities listed: IIS_IUSRS: This is analogous to the old IIS6 IIS_WPG group. It’s a built-in group with it’s security configured … Read more
‘Business’ or advertising accounts can’t manage apps – if at some point in the past you were able to create an app using a business account this was a bug or loophole and shouldn’t have been possible – only real verified user accounts should be able to create and manage apps. It’s also possible to … Read more
Try this out: using Microsoft.Win32; using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Principal; public static class UacHelper { private const string uacRegistryKey = “Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System”; private const string uacRegistryValue = “EnableLUA”; private static uint STANDARD_RIGHTS_READ = 0x00020000; private static uint TOKEN_QUERY = 0x0008; private static uint TOKEN_READ = (STANDARD_RIGHTS_READ | TOKEN_QUERY); [DllImport(“advapi32.dll”, SetLastError = true)] [return: … Read more