RSS All Posts

RSS PowerShell Posts

Tags

2142 Active Directory Administrativia Announcements Battlefield Blogging Cricket Deployment Deployment4 Get-PSUGUK Group Policy HowTo Linux MDT MDT 2010 Microsoft Deployment Toolkit MSDN Music Permissions Personal PowerGui Power Lines PowerShell PowerShell Groups PowerShell Support PowerShell Tools PowerShell V2 Presentations PSUGAU Quick Tips Scripting SDDL Security Tech Talk Ubuntu User Groups Virtualisation VMware Infrastructure Client WAIK Weekly Poll Windows 7 Windows Automation Installation Kit Windows Server 2003 Windows Server 2008 XML

Archives

Meta

Archive for March, 2007

« Previous Entries

Static Members and PowerShell obscurity

Thursday, March 29th, 2007

I recently posted a question on the Microsoft PowerShell NG on how to use a .Net function in PowerShell.
It might be easier if I put this in context. I had a requirement to take a string containing a mixture of upper and lowercase letters, and rewrite it with a hyphen preceding the uppercase letters. This [...]

Extended Rights in Active Directory

Wednesday, March 28th, 2007

Extended Rights are one of the mechanisms behind Active Directory permissions that allow for such granular control over the delegation of tasks in your environment. There’s a Technet article that explains delegation and touches on Extended Rights (near the bottom).
Extended Rights exists in AD as objects stored within the Extended-Rights container, which is located in [...]

Security Identifiers (SIDs) and NT Account name

Monday, March 26th, 2007

I have a couple of functions that are quite useful when dealing with Active Directory permissions.
Translate SID to NT Account:
:get-NTaccount.ps1

#----------------------------------------------------------------------------------------------------------
function get-NTaccount
#----------------------------------------------------------------------------------------------------------
{
Param (
  $SID
  )
  $id = New-Object System.Security.Principal.SecurityIdentifier($sid)
  $account = $id.Translate( [System.Security.Principal.NTAccount] )
  return $account
}
 
#----------------------------------------------------------------------------------------------------------
get-NTaccount "S-1-5-21-812403740-544655063-2921696178-1958"

In this function we take a SID in string format, and cast it as a SecurityIdentifier and then use the .Net method to translate [...]

« Previous Entries