waar is de beste plaats om te kopen van voorschrift brillen http://hollandpillen.com/lorazepam/ beste otc koud geneeskunde
Jeff Wouters's Blog

Every now and then I find myself in the situation where I need to get the SID of a (currently logged on) user.
So, here’s a snippet that will do exactly that 🙂

$SID = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-21-1581844226-2168725104-3887129977-2731") 
$User = $SID.Translate( [System.Security.Principal.NTAccount]) 
Leave a Comment more...

Sometimes I feel the need to do a small inventory.
In this case, the need to do that with monitors found itself to the upper corners of my cranium.
I wanted to get the manufacturer and model. Remembering that many customers also like a serial number in their CMDBs, I put that in there too 🙂
So while waiting for another customer, I wrote this little thing:

$ComputerName = 'MTHSPC01','MTHSPC02','MTHSPC03'
Get-CimInstance -Namespace root\wmi -ClassName wmimonitorid -ComputerName $ComputerName | foreach {
	New-Object -TypeName psobject -Property @{
        Manufacturer = ($_.ManufacturerName -notmatch '^0$' | foreach {[char]$_}) -join ""
        Name = ($_.UserFriendlyName -notmatch '^0$' | foreach {[char]$_}) -join ""
        Serial = ($_.SerialNumberID -notmatch '^0$' | foreach {[char]$_}) -join ""

Hope you find it useful 🙂

5 Comments :, , more...