IAmRoberson.com

Just a Tech Guy

I’m Sorry Mr. Holliman But… No!

House Majority Leader Hugh Holliman filed another infringement law on Wednesday morning. It can be found here: H.B. 2: Prohibit Smoking in Public & Work Places Act. This bill would enact strict rules to ban smoking in more places than ever before in N.C. I’ve written about this in the past on other sites but after reading over the article on WRAL, I can see that there is at least one person in our government that feels EXACTLY as I do. I’ve spoken these exact feelings in the past. “I have the right to choose where I go. What I don’t want to do is tell the person who has invested $1 million in his restaurant how he has to run the restaurant, what his rules have to be, what he has to allow and what he can allow,” said Sen. Eddie Goodall, R-Mecklenburg. (WRAL) Ok, here is where my pity ends. You see Mr. Holliman has battled twice with lung cancer. I am sorry for that Mr. Holliman. I am also sorry that your sister died of the same. To me that says its probably more genetic than smoking but either way, I am very sorry you’ve been through all of that. I truly am. “Holliman said he has experienced the danger of secondhand smoke firsthand – he believes it caused his two bouts with lung cancer and the death of his sister from the disease. Barnhart said his motivation is also personal.” (WRAL) Did you see that I highlighted and italicized that one word above? Ok, I will say this and hope not to offend too much. This is ignorance talking. We all know smoking can kill you, cause Cancer, and just plain stink. I’ve dealt with it in my personal life as well however, this is ignorance.

Continue Reading

Preventing A Disaster (with Powershell)

So, I walked into a production issue this morning at work that could have been easily prevented. A process we run at work moves files to a directory then imports the information from those files. This occurs every day and the files being moved into the import directory will not overwrite any files that are already in that directory. Long story short the files imported were the wrong ones since the ones that needed to be dropped off were moved to a staging area instead. Had I known there were files in there a 5 minute fix to prevent this would have saved me a half day’s recovery. I decided to prevent this from happening again by running a simple script. The following script checks the directory on a server for any files with the csv extension. If it doesn’t find any, then all is well, life goes on. If files are found, it emails/pages me so I can move those files before the process runs. /* 1      $filecheck = Test-Path “\\servername\directory\*.csv” 2      If ($filecheck) { 3            $SmtpClient = new-object system.net.mail.smtpClient 4            $SmtpServer = “localhost” 5            $SmtpClient.host = “exchange.server.address” 6 7           $msg = New-Object Net.Mail.MailMessage 8           $msg.From = “Your Server” 9           $msg.To.Add(“email@address.net”) 10        $msg.Subject = “Your Directory not Empty!” 11         $msg.Body = “The directory for the blah is not empty! ” + (Get-Date) 12         $SmtpClient.Send($msg) 13 14                                } */ Ok, broken down line one sets a variable querying whether or not the path listed exists. This variable saves as a boolean.  Line two does a simple If/Else statement. In Powershell Else will be assumed. Boolean equivalent of True is If($variable) if we needed to check for false we would use If(!$variable). Lines 3-12 are the lines needed to email with SMTP. Line 3 creates the email object. Line 4 uses the localhost

Continue Reading

Finding a Service’s Authentication ID

At work, us Administrators are considered prima donnas. And most of the time we accept that and will even admit to it. We like things a certain way and we tend to also get set in our ways. Recently the company hired a new VP of a department that promotes a more secure environment to work in. To protect the guilty, I’ll not use his name, so instead I’ll refer to him as Satan. *smirk* Satan has good intentions in the long run but has the social and personality skills of a pissed off bull. He has no professional courtesy nor does he wish to. Now I will also note that anyone in his position will always be considered the ‘bad guy’ but I think he really enjoys the title more than actually just accepting it as a side effect of his profession. I say all of that to say this: We, the prima donna group have been in the habit of not changing our passwords as regularly as we should, and in cases where our bosses and end users beat us into submission about getting something to work “no matter how it’s done”, we’ve made some bad practices over the years. Such as…. running a service, scheduled task, or mapping a drive with our own credentials. Well without warning Satan decided to enforce the company policies in the middle of a work day and force a company wide password change, which under most circumstances wouldn’t be so bad… however, this broke a lot of things that people have forgotten about for years. (ie. a Service that’s been running under ‘Johnsmith’ for the last 28 months. The key point in this was “WITHOUT WARNING”, none. He is 100% correct in enforcing the rule but professional courtesy should have given us

Continue Reading