Friday, August 29, 2014

GPP - Mapping User or Home folders

Today I decided to attack our login script.. start using GPO more so first order of business is to create the user folder and map it.

Following this guy, I was able to get the folder creation part working on the first try, however because my file server is still Server 2003, the %LOGONUSER% variable won;t work on the mapping.  So I changed it to %USERNAME%.. which still did not work.  I was getting event 4098:


I resolved that by disabling the 'Reconnect' option in the drive mapping GPP.  Weird I know but these mapping is reconnected already because the Action is Replace.  So every 90+ minutes the mapping is renewed.  No need to programatically set the /persistent:yes switch.

So once done and gp refreshed I had a Home drive mapped, and the folder created on my file server using %logonuser% as the folder name, and that same user had Full Control perms.

Once I get all the user data migrated to the Netapp, I might run into a syntax issue with the mapping part.. IDK for sure yet.

Thursday, August 28, 2014

Systeminfo

This might be old for some but I just today learned of this command.  Co-worker asks me if I know of a way to remotely pull a bios date from a host on the network.  Interesting.. first thought was WMI i.e. Get-WMIObject win32_bios will show you the version, maker and stuff like that but no date.

Perform some Google-Fu and stumbled on this article that talks about the command 'systeminfo'.

I've fallen in love already!  Exactly what we needed, will pull info from remote host and given a nice helping of information without inundating you with a giant wall of text.



Thursday, August 21, 2014

HP Z230 Workstation

Meh.


That usually the opinion I have over new HP offerings.  The Z series replaced the XW line of Workstations and while most of our 'power-users' are using a Z400 right now.  I have no real complaints about it except it's age, which is no fault of HP.  It's powered by a Xeon W6550 which is a work horse.  Problem is though there's little to no upgrade path hardware wise on this machine.

So enter the Z230.. now right off the bat I don't agree with the model numbers going down...usually that meant you are getting a lower class unit.  So BOO to HP for going that route on these new units.  Also I big BOO to HP for the psu maxing out at 400 watts.  It's a workstation powered by a nice Xeon E3-1270V3.. it came with 8gigs of pc3-12800... why gimp the power supply?  What if I wanted to toss in a big R9 290 along with a pair of 4TB Western Digitals?

Alas, nothing to be done about it now, except to set it up for a user whose known for breaking things and who works in a fairly dirty environment.

Tuesday, August 19, 2014

Modifying the Manager field in AD in bulk..

A quick PowerShell script that will allow you to modify the Manager field in user properties in AD.

get-aduser -filter * -searchbase "ou=test,dc=domain,dc=com" | set-aduser -manager "JBlow"


Or for the entire domain if you are running a small shop:

get-aduser -filter * | set-aduser -manager "JBlow"

The Manage value must be either a SamAccountName or Distinguished Name.

Monday, August 18, 2014

Microsoft Certified Solutions Associate: 70-410 exam SCHEDULED!

That's right.. exam is scheduled at the testing center at Davenport University in Grand Rapids, MI for this Friday.

WOOT.

Friday, August 15, 2014

WOOT!

Today I was given 10 Microsoft training vouchers for the remaining two MCSA: Windows Server 2012 courses at Directions Training!  And as a bonus their giving me three exam vouchers!  DBL-WOOT!

September 29 - October 3 for 70-411
December 1 - 5 for 70-412

Now to schedule the 70-410 exam.

YAY!

Searching Exchange 2010 mailboxes from Powershell

Customer Service reported an email they never received.. and the sender says they did not get an NDR.  I found a VERY nice explanation Here.

We have a Barracuda Spam Filter 300 in place, however it's dreadfully slow lately.  So searching it's logs takes FOREVER.

So I went to the Exchange side of things..

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery attachment:<filename> -TargetMailbox <name of mailbox> -TargetFolder <name of folder> -LogOnly -LogLevel Full

So I specified subject:'Woodbury Hospital' and a -targetmailbox as my own.  I had questioned whether or not the targetfolder needed to exist or not.  I created a folder, specified it as the target but the cmdlet created it's own subfolder with the specified name.

You can also delete emails using this method as well, as seen here:

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery subject:<verbatim subject line> -DeleteContent

Now if you wanted to search all mailboxes, copy the results then delete the content you;d do this:

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery subject:<verbatim subject line> -TargetMailbox <name of mailbox> -TargetFolder <name of folder> -DeleteContent












Thursday, August 14, 2014

Powershell - Adding new email address alias to Exchange 2010 mailboxes

$users = get-mailbox
foreach ($a in $user) {$a.emailaddresses.Add("smtp:$($a.alias)@new_domain.com")}
$users | %{Set-Mailbox $_.Identity -EmailAddresses $_.Emailaddresses}


I ran this with a -WhatIf inside the last } and it worked on my setup perfectly. Exchange 2010 SP3.

Wednesday, August 13, 2014

Listing users with session to specific share names

Helped a guy with a problem earlier..

He was migrating users to new shares, then in trying to remove the original share was being told that users were still connected, are you sure?  I'm sure you have seen that before.

The answer is so simple it took me a while to think of it.. you are wanting to view users that are connected to specific share names right?

net use [sharename]

DUH.  See I told you.. so simple that it's easy to over look!

Now granted this would only be time effective really if you had a few shares to check.. a few hundred would require scripting and piping the results to text files.

Installing and Configuring Microsoft Windows Server 2012 - UPDATE

So the situation I'm in is this:  the Enterprise Agreement (EA) administrator actually works for my parent company, Dover Corp.  One of Dover's like 4-6 actual SA's who, among other things, is also leading a dozen other projects while handling their normal duties.
I actually asked one of them last year.. I was astonished by that guys workload!

Anyway.. getting a reply from this guy has been problematic to say the least.. usually it takes my boss emailing his boss.  It sucks.  Anyway I've heard through the grapevine that their EA is up for renewal in September, so I'm trying to get 10 more training vouchers before then.

But here's the kicker, and another reason I have come to love Directions Training, they have free exam vouchers to give away.  I was told this morning that if I commit to the second MCSA: 2012 course that they will give me two training vouchers.. and since Microsoft exams are $150 a pop now that's $300 in savings WOOT.

Directions Training {ThumbsUp}

Exchange 2010 - Managing shared permissions

I created a new mailbox per Marketings request late week before last.  I was apparently in a rush so today one of the users reports that she cannot Send As this new account.

Get-MailboxPermissions shows that she has FullAccess, however Full Access does not mean you can Send on Behalf Of.

DOH.

So, Set-Mailbox 'name' -GrantSendOnBehalfTo 'user'


Monday, August 11, 2014

Installing and Configuring Microsoft Windows Server 2012

Hi all!
I was out all last week for an online, instructor-led training course provided by Directions Training on the 70-410 material which is.. Installing and Configuring Server 2012.  Some might ask, "Why would you waste the $$$ on the easiest course on almost any MSFT OS?"

Well for a couple reasons honestly..

My last certification was MCSA: Windows Server 2003.  I completed it back in 2004 and while I have supported 2008 and 2012 since then, I figured there'd be some new things.
Secondly, I did not pay for it.. I was able to use 5 training vouchers from my parent companies EA.

I was right too, there have been a few, albeit small changes officially and I did actually learn a couple new things about 2012.  The provider I found was Directions Training which was listed at a Microsoft Partner under the online training offerings.  I was pleased overall, the instructor Coach Culbertson was entertaining, humorous and very knowledgeable.  He spoke very well and offered many real-world examples of situations relating to the tasks covered in the book.  I'd recommend Directions and Coach to anyone looking for additional training as Directions covers ALOT of subjects/publishers.

Friday, August 1, 2014

FreeNAS on XW4600

I decided to try FreeNas at home, Especially after reading this forum post I think I have the answer to my dilemma of trying to remember to download the latest episodes of [insert new show here].

I have Charter 60mb internet at home, protected by a pfSense firewall, and a separate IBM sff Lenovo desktop hosting my Plex Media server.  Performance is good.. very good, however waiting the ~10 minutes to download and copy over a new episode of some show is horrible.  Well that's a lie sort of.. it's not horrible, in truth its actually quite nice but so is automation ;)

So I've got access to an old HP XW4600 workstation, powered by a Core2Duo E6850 3ghz,4gb ram, and I tossed in 4 x 2TB Western Digital green drives.  Since this box has a USB 2 port inside the case I installed the latest freeNas image onto a 4gb Cruzer thumbdrive and set the boot device to USB.

*FreeNAS loads itself into a ram drive


I know what you are thinking, "Why would you use WD Greens?!?"  Well normally I wouldn't until I read this explanation of the differences between Red and Green WD drives. Using a Win98 boot disk image, and WDIDLE3 I set mine to 300 seconds, whereas default head parking timeout is 8 seconds.
Everyone says increasing that time will allow for much quicker responsiveness and longer lifespan on teh parking mechanism.  We shall see.

I'd much rather be using Reds but I don't have any to test with currently. But Im taking this box home to setup over the weekend with FreeNAS, Plex Media Server, Couch Potato, Transmission and Slick beard.. couple that with some vodka and a litte BF4 in between I think it'll be a good weekend, rain or shine.