Sup? Welcome to the ups and downs of a young Systems Architect.
So you’ve just installed/upgraded to Windows 8 and errrmahhgerdd Metro UI is so cool, you then go to open exchange MMC and notice half it’s not working.
After a little research (Googling is hard) I found the following batch file will help you launch a fully functional Exchange MMC on Win 8
If you’ve installed the MMC in a different directory then you’ll have to change the start path.
Short, sweet and I should post more stuff.
Real simple one, but it’s something which can’t be done from the GUI from what I can see…
To view what currently is in the White List for senders, fire open the Exchange Management Powershell err shell.
And enter the following for induvidual e-mail address:
(Get-ContentFilterConfig).ByPassedSenders
And the following for white listed domains:
(Get-ContentFilterConfig).ByPassedSenderDomains
Now to add something to either of these!
To whitelist a domain e.g. justfen.com you’d do the this:
$WhiteDomain = (Get-ContentFilterConfig).BypassedSenderDomains
$WhiteDomain.add(“justfen.com”)
Set-ContentFilterConfig -BypassedSenderDomains $WhiteDomain
And to Whitelist a sender e.g. me@justfen.com you’d do this:
$WhiteSender = (Get-ContentFilterConfig).BypassedSenders
$WhiteSender.add(“me@justfen.com”)
Set-ContentFilterConfig -BypassedSenders $WhiteSender
Once you’ve done that, go ahead and confirm your changes by viewing the Bypassed Sender lists using the commands at the start of this post.
I’ve had quite a bit of communication about how the AutoNinite script I wrote quite some time ago, and there were some features in it which i actually wasn’t happy about it.
So here I am with my latest version, it can be viewed over on GitHub @ https://github.com/justFen/NiniteSloth
There’s still a few features I want to build into it, such as not having a user have to edit so many variables, altering the report generated with some colour coding,
If you’re looking to run this as a scheduled task, I’ve also included a batch file to call the PowerShell script for a windows server.
Just simply create a new scheduled task, have it re-occur everyday at a certain time and hook it up to the NiniteOne.bat packaged.
But really, please test this in your environments before going crazy and remember… YOU MUST SET THE VARIABLES TO BE SPECIFIC TO YOUR ENVIRONMENT
Hopefully this will be helpful to some people, it’s currently what is powering the software updates within my own organisation.
For more “detailed” instructions on how to use it, they can be viewed here: https://github.com/justFen/NiniteSloth/blob/master/README.md
If you have any questions, leave a comment or mail me at fen[at]justfen.com
Recently when working on our deployment of machines, we hit a few brick walls.
The main issue was how long it takes for a template from vSphere to be cloned, then join a domain. The delay is whilst you wait for the machine to Sysprep and VMWare to do it’s magic.
At first I was dirty and put a delay in our creation scripts before doing anything else to the machine, but this just didn’t cut it.
So, I moved on to prestaging the VM in our Windows AD, which meant things such as Group Policies and Security Groups would be applied on it’s very first boot which meant one less reboot before our virtual machines were ready to have applications deployed to them.
Here’s the function which can perform said wizardry… it’s pretty simple but doesn’t seem to be very well documented anyplace.
So this morning we faced a few interesting issues revolving around our HAProxy setup.
The scenario we faced was HAProxy reporting all our servers as down, despite them being perfectly accessible directly (i.e. not through the load balanced IP)
And thus the pprocess of elimination began;
I have to admit, we were pretty stumped. Our Icinga (Nagios fork) check_http checks were going through fine, when we duplicated checks to the servers they were also fine and reporting a normal 200 status.
Looking at the checks, it was reporting an issue with our mobile site (Currently in development) so we added in a agent-type to the HAProxy httpchk, still no dice.
After more prodding and poking and a big hint from vr (@vihaire) I added in a host header and as if by magic, the sun came out from behind the clouds and shone its delightful rays upon us.
The config used was the following;
So if you run into this issue, then this may just be the fix to your problems!
A nice little article on Host Headers and IIS @ http://www.it-notebook.org/iis/article/understanding_host_headers.htm
It wasn’t so long ago that I wrote this article; http://www.justfen.com/post/18843356303/automating-software-deployment-with-ninite
It seemed quite well received, I actually had some tweets and messages about it :O!
Now, two weeks ago I came across the following post on Reddit;
Ninite Pro. There’s a powershell script on a Spiceworks forum that pulls all machines from AD, as the Ninite machine scan leaves a lot to be desired.
Really I thought? I best go check that out!
The scripts in mention are the following;
http://community.spiceworks.com/scripts/show/1376-ninite-updater-domain-update-part-1-powershell
http://community.spiceworks.com/scripts/show/1377-ninite-updater-domain-update-part-2-batch
http://community.spiceworks.com/how_to/show/2968
Just thought I’d point these out in a great upbeat passive-aggressive manner.
Imitation is the best form of flattery
Anyway, moving on swiftly!
What this post really is about, an improved version
So that’s what I worked on tonight whilst upgrading our AV systems.
So this is single PowerShell file, it has the following Pre-requisites;
As for where I’d like to takes this script
Rather than writing a new blog post for when I push one of these features, you’ll be able to follow them over at GitHub @ https://github.com/justFen/NiniteSloth
So Google Drive, pretty cool eh? It seems nice so far!
Something I’ve found myself doing is using it sync my Sublime Text 2 files I’m working on, but I figure I can go one better and sync my Sublime Text 2 settings to create a seamless environment to work in.
I just have to say, if you’ve not tried Sublime Text 2 out I really… really think you should! It’s pretty damn awesome, so awesome here’s a link.
Now down to business;
First thing first, install Google Drive over @ https://drive.google.com/start#home
Now for the steps;
Okie doke, now it’s time to use mklink. Fire up a cmd prompt (As an administrator -_-)
And here goes, you’ll want to alter C:\Users\fen\Google Drive to your gDrive’s drive letter (e.g. Y:), then the magical mklink will create a link link to to your gDrive so that Sublime Text 2 will use the config files you just moved~!
Drum roll please, that’s that over and done with.
This method could be used by quite a few programs I’m sure.
There is a backstory for this which will be saved for a later post, but this is too good to not share.
So, say for example you have a script which isn’t signed (Ahem!) and you’re wanting to run it from a UNC path (Network Share)
If you try and do this, it’ll throw up a security error.
But to bypass this, you simply have to call it from a batch file something similar to this
This will then bypass any issues you have, and it’s for a one time use so you don’t have to change the ExecutionPolicy within Powershell.
Hope this helps some guys out there trying to run certain scripts on Logon (Or scheduled tasks!)