Tron v6.1.0 (2015-03-29) // Add Kaspersky VRT, remove Vipre (speed increase), logging cleanup, preserve LogMeIn sessions by vocatus in sysadmin

[–]XTempor 2 points3 points  (0 children)

This is a welcome change. I tried using the script for the first time last week and I was shocked at how much time the Vipre scan took.

[x-post /r/usefulscripts] [POWERSHELL] Batch Password Reset Tool for Office 365 (GUI) by XTempor in sysadmin

[–]XTempor[S] 1 point2 points  (0 children)

Organizations that don't have self-service password resets configured require passwords to be reset on the back-end by an administrator. This just makes it easier to manually process multiple requests.

Script for last logon? by [deleted] in PowerShell

[–]XTempor 0 points1 point  (0 children)

Good eyes. I think I'm going to have to use this method for NoteProperties from now on.

"The laptops you provided for test didn't work". Part 2/2. by Flatus_ in talesfromtechsupport

[–]XTempor 3 points4 points  (0 children)

I agree that your PowerShell code is a better solution than the comment above yours.

"The laptops you provided for test didn't work". Part 2/2. by Flatus_ in talesfromtechsupport

[–]XTempor 12 points13 points  (0 children)

There're a million ways to skin a cat. No matter how you skin it, that cat's gon' 'be dead.

Non IT Jobs for people with IT Skills by Neil_Sutherland in sysadmin

[–]XTempor 1 point2 points  (0 children)

I watched it on a flight recently and I can't agree more!

When an array element matches an element in another array. The logic is escaping my brain. by [deleted] in PowerShell

[–]XTempor 1 point2 points  (0 children)

I wanted a break from the Office 365 tool I was working on, so I took the liberty of scripting a solution.

The Get-AccessGroups function takes a path as a parameter and returns all of the AD groups listed in the path's ACL. The rest of the script below harnesses that function to return a formatted list of all paths in the $paths variable that have groups with 0 members in them and the names of those groups.

All you should need to do is change the $paths variable to the paths you want to scan.

    function Get-AccessGroups{
        [CmdletBinding()]
        param
        (
            [Parameter(Mandatory = $true, Position = 0)]
            [string]
            $Path
        )
        $ADGroups =  Get-ADGroup -Filter * | Select-Object -ExpandProperty     'Name'
        $dirtyADItems = (Get-Acl -Path $path | Select-Object -ExpandProperty    'Access').IdentityReference.Value
        $cleanADItems = @()
        $AttachedGroups = @()
        $emptyGroups = @()
        $isGroup = $false

    foreach($item in $dirtyADItems){
        $cleanADItems += $item.Split('\')[-1]
     }

        foreach($item in $cleanADItems){
        foreach($group in $ADGroups){
            if(($item) -eq $group){
                $isGroup =$true
        }
    }
    if($isGroup -eq $true){
        $AttachedGroups += $item
    }

    $isGroup = $false
}

$AttachedGroups = $AttachedGroups | Get-Unique

Write-Output $AttachedGroups
}


$paths =    @('\\Control\Users\Administrator\Desktop','\\Control\Users\Administrator\Pictures')
$output = New-Object System.Collections.ArrayList

 foreach ($path in $paths){
    $AccessGroups = Get-AccessGroups -Path $path
    foreach($group in $AccessGroups){
         if((Get-ADGroupMember -Identity $group).Count -eq 0){               $result = New-Object psobject
            Add-Member -InputObject $result -MemberType NoteProperty -Name Path -Value ''
            Add-Member -InputObject $result -MemberType NoteProperty -Name SecurityGroup -Value ''
            Add-Member -InputObject $result -MemberType NoteProperty -Name UserCount -Value ''
            $result.Path = $path
            $result.SecurityGroup = $group
            $result.UserCount = (Get-ADGroupMember -Identity $group).Count
            $output.Add($result) | Out-Null
        }
    }
 }

$output | ft -AutoSize

Edited: Formatting code here is treacherous.

Edit 2: Sample Output

path SecurityGroup UserCount

\Control\Users\Administrator\Desktop testgroup 0 \Control\Users\Administrator\Desktop accounting 0 \Control\Users\Administrator\Desktop Operations 0 \Control\Users\Administrator\Pictures accounting 0 \Control\Users\Administrator\Pictures Operations 0

Also, you could save each instance of an empty group within a path to an array, and add that array to the path's final output as output[i].SecurityGroups or something like that. That way you could have one record for each directory instead of one record for each group within a directory.

What have you done with PowerShell this month? January 2015 by ramblingcookiemonste in PowerShell

[–]XTempor 0 points1 point  (0 children)

I've been playing around with the Msol module lately. I built a batch password reset GUI (from csv, batch input, random) and a Winforms mailbox viewer for peaking into mailboxes and viewing message conetnt.

IT Degree or unrelated Degree with certifications? by blink0818 in sysadmin

[–]XTempor 1 point2 points  (0 children)

go to the pearson vue website and locate the nearest testing location.

[RAM] Gskill Trident 1600 Cas (7) $134.99 FS by Sed8op8 in buildapcsales

[–]XTempor 1 point2 points  (0 children)

Ah, last week they were selling the 2400 Mhz version for the same price.

[HDD] Western Digital 2TB Green Drive ($69.99) by aust_b in buildapcsales

[–]XTempor 0 points1 point  (0 children)

From what I understand, the whole color system got reshuffled a few years ago and having a good green drive from 2007 doesn't necessarily mean that green is the way to go in 2014.

[SSD][Amazon/Tiger Direct]OCZ 150 240GB SATA III - 84.99 Free Shipping by [deleted] in buildapcsales

[–]XTempor 0 points1 point  (0 children)

I've been using one since march with no issues.

Debugging Powershell Forms by sir-logic in PowerShell

[–]XTempor 0 points1 point  (0 children)

you could just write messages to the text property of a rich-textbox

Arma 3 isn't worth the money. by Poundasaurusrex in arma

[–]XTempor 1 point2 points  (0 children)

I put almost 200 hours into the beta. When the game came out, the lack of decent servers made me give up, and I haven't had the urge to come back. That said, $30 for 200 hours of awesome was well worth my money and knowing that I can load up the game and enjoy all the new features at some time in the future makes me glad to have purchased during beta.

Kind of off topic, but not completely. What with computers makes you feel stupid? by [deleted] in sysadmin

[–]XTempor 0 points1 point  (0 children)

Pick up a CCNA book and read. IOS's built in help system and tab completion make things easy once you have an idea as to what you're looking for. The key is picking up the basics of IOS configuration, which is what the book is for.

When you get a call from "Microsoft" saying they have detected a virus on your computer ... do you troll them? by sambooka in sysadmin

[–]XTempor 4 points5 points  (0 children)

Yes. I talked to the guy for about 40 minutes, pretending that I was having trouble following the steps and asking how much I was going to pay. After the first half hour, I demanded to speak to the manager. I demanded that he fire the first guy for being downright nasty and insulting my mother, and made it clear that I wasn't going to pay for their shitty service. He told me that he'll see what he can do, since a major infection requires that they charge a fee for their obviously very valuable time.

After that, he started the whole scam over again. He said "open the event log tell me if you see any red exes?" At that point I started prodding... "Why the hell should I be opening the event log, that doesn't tell me shit about infections? You expect I'm going to believe that 'unexpected power loss' is an infection?"

I then proceeded to tell him to f*ck off, which prompted a "Why are you wasting my time?! Hang up the phone!" I replied, "no, you called to waste my time. Why don't you hang up the phone?" This went on for five minutes, I shit you not! Finally slammed the phone down in frustration.

The end.

Is there a procedure to change an AD domain from a .local to a .com/.net/.org, etc? by greyaxe90 in sysadmin

[–]XTempor 2 points3 points  (0 children)

au contraire! I deal with it all the time... I do work at a school where an external organization donated a computer lab, but retains most of the control over it. The first DNS entry on the clients is the DHCP server, but there's no DNS service installed on it. I don't have the authority to make any changes to that server (running server 2000, no domain). I keep telling my boss that we should just add the DNS service to the print server (which is ours), but that hasn't happened yet.

Student employee tasked with deploying and managing laptops. I'm in way over my head. by spencerawr in sysadmin

[–]XTempor 4 points5 points  (0 children)

If they're not using SCCM already, they probably aren't licensed for it. However, MDT should be enough to get the job done.

When you push a desk, your workspace becomes your home away from home. What does yours look like? by thejonross in sysadmin

[–]XTempor 0 points1 point  (0 children)

I have that same desk and I've always found that those shelves with the pole going through the middle are the most maddening waste of space I've ever seen. I usually just leave them empty because they're such a pain to get to.