Exchange Online Bulk Add SMTP Addresses

We are a Microsoft partner and have been standing up a lot of clients on Office 365, the management of which requires a lot of PowerShell use to administer properly. My last boss told me that Microsoft’s move away from the GUI toward PS scripting is what is going to ‘separate the men from the boys’, and I’ve taken this to heart, trying to script out everything as much as possible. Server 2012 has really made improvements over 2008 as far as this goes, and Exchange Online and Office 365 (AKA Microsoft Online Services) are strongly there as well. Sure, there are web interfaces for them, but Microsoft seems to have a habit of changing the navigation and language every few weeks and the GUI has been inconsistent between the business and enterprise plans as well, so the Powershell commands seem be the way to go.

For this most recent job, we had a client who wanted to change domain names, so we stood up the new domain on O365 and configured client workstations for the new accounts. Once that was done we verified the old domain with Microsoft in anticipation of routing the old domain to the new mailboxes. Rather than manually add each additional SMTP address for each user account, I used the following script. Make sure you connect to Exchange Online using remote PowerShell first.


$users = get-user * #Filter your OU appropriately, this was a blanket change for a flat hierarchy.
foreach ($user in $users)
{
$mailbox = get-mailbox $user.identity
$newmailbox = $user.id + "@yourNewDomain.com"
set-mailbox -identity $user.identity -EmailAddresses @{Add=$newmailbox}
}

You can then verify that the changes went correctly with the following:

foreach ($user in $users) {
$mailbox = get-mailbox $user.identity
$mailbox.emailaddresses
write-host  $addresses
}

Game(r) development

So I’ve been playing a whole lotta HearthStone lately. A lot. I’ve been using Icy-Veins for basic decks and card descriptions to up my game, and although I haven’t gotten anywhere near legend ranking, I have been doing pretty well. I started tracking my game history in OneNote, tracking the cards my opponents have played against me to try and some good openers. I’ve been somewhat limited with my success as I refuse to pay for decks and have been spending all of my gold to buy Naxxramas wings, (I’ve just started the Construct quarter,) and I did find an interesting project that will automate that for me. It’s called Hearthstone Deck Tracker, and in addition to showing me which cards of my deck I’ve drawn and which ones remains, it will also record my opponent’s plays and will even allow me to export them into a deck of my own pretty handy. This tracker belongs to a series of programs which have sprung up that utilize Hearthstone’s debug log to pull this information. Another one is a tool created by Elie Bursztein and his wife used data collected from over 100,000 games to predict what card you opponent will play next. They gave a talk at Defcon where they demoed the tool as well as some of their research on valuing Hearthstone cards, but apparently someone from Blizzard was in the audience and convinced them not to release the tool for fear of ruining the game. One of the things that their tool did have was a tracker that shows card, hand and mana advantage between your opponent, and that does look like something that could be integrated into the Hearthstone Tracker, which is written in C. I’ve been delving into the source code to try and and figure out if I can make any contributions to it.

HearthStone was actually created with the Unity3D development platform, and I’ve been playing around with that lately, having finished several of the tutorial projects with it. I don’t really have too much interest in developing a full fledged 3D game, but it has real object-oriented scripting, unlike GameMaker, which doesn’t fully implement OO methods. Unity seems really powerful, and I’m looking forward to delving into it a bit more and seeing if any projects come from it.

I’ve also been inspired to add to my real life collection lately. Reading the blog on the site https://wischweiz.wordpress.com, I was inspired even more. Every time I’d go into Barnes and Nobles I’d drool over the Android:Netrunner and other strategy games, and a few weeks ago they had copies of Summoner Wars on sale for half off, and I had to go back and pick one up. It’s a cool game; I’ve only had a chance to play a few games with a few friends, including a 2v1 match that ran on way to late and ended in a draw. And I also caved in and bought A:NR off of Amazon and have played a few games with it. I’ve probably spent more time teaching it to other people than I have playing it, but I found that there’s a version of it on OCTGN, which is like VASSAL on steroids, and I’ve had a couple good matches on there. The best part is that OCTGN and the modules are open source, so I can look through the Python code to see how the game mechanics were implemented. Fascinating stuff.

Halfway between the polished gem of Hearthstone’s Unity engine and the arcane workings of OCTGN/VASSAL games is HEX, a Magic:The Gathering clone that is currently in beta. The mechanics of the game seem strong, but the graphics and the game flow itself seem rather clunky. I’ve only played two games against AI thus far, but the interface has a ways to go yet. I don’t really recall how M:TG online plays in comparision, but it seems like the amount of clicks passing back and forth between players each turn is way to much. One thing I’ve yet to figure out is whether all the cards in Hex will be available by grinding the game, such as in Hearthstone, or whether certain cards will only be available through real-money decks, as I hear was done with the latest Dual of the Planeswalker version.

 

 

And now for some emotional release

I’ve been pretty stoic this past week with what happened in Connecticut last Friday, however while watching this video the damn broke and I couldn’t stop crying. Ode to Joy is beautiful, and for some reason I find these kind of public performances the antithesis of what happened last week.

My Cholesterol

So, a lot has changed for me in the past year or so. My wife and I decided to have a baby, and I was forced to make a lot of lifestyle changes as a result. One thing that my wife insisted on was getting life insurance, which I did back in March. As part of the application process I was required to get my cholesterol screened, and the results came back that I was slightly elevated. As a result, I stopped buying steaks every week from the grocery store and stopped eating roast beef on my sandwiches for lunch every day. I also tried to cut out the Farm Fresh spicy wing zings that I am absolutely addicted to. During that time I spoke to my father, as my grandfather died from a heart attack at a relatively early age, and red meat was always at our dinner table several times a week. My dad told me that his cholesterol was 280, and I thought I was doing OK as he does not eat very healthy at all and basically eats junk all the time.

As the end of the year is here I decided to take advantage of my health insurance eye plan and get my checkup and free pair of eyeglasses for the year, and as I had some downtime between job contracts I decided to go in and get a full physical and see how I was doing. My wife recently upgraded her YMCA membership to a family plan to take advantage of the 2 hours of babysitting so that she can go back to the gym and I’ve decided to go back as well. I had been working out pretty regularly when we started dating but I’ve been in rough shape the past few years and wanted to get a physical before I started doing anything too crazy. I was diagnosed with a heart murmur when I was 15 and haven’t had it checked out since, so I wanted to get it checked out and scheduled a full physical. They took 4 or 6 vials of blood at the doctors and told me that they were going to do a very thorough screening. Well I got the results last week and it turns out that my cholesterol was over 280, so it’s apparent that some more serious lifestyle changes are in order.

I was actually surprised at some of the junkier foods that are cholesterol free, most notably my favorite Oreos, as well as Doritos and snack foods. It’s the meat and dairy products that I love so much that are killing me. I’ve spent the past two days looking at labels on everything I’m eating, and I’m trying to figure out the best way to keep track of my daily consumption. I don’t want to go crazy and keep track of everything, but I do want to keep notes on my specific cholesterol intake so that I can establish a baseline that will be helpful at determining any additional changes after my next screening. The last thing I want to do is go on some kind of pill cure, so I’m determined to fix this myself. I’m just not sure what’s the best tool to keep track of things. I’ve been using my iPhone to track my auto maintenance and workout regimen, so that’s my first choice, however an initial scan of the apps out there didn’t show any sure fire one that will let me track my portions against a daily goal.

I do know one thing though, I’m going to have to be very careful about eating out from here on out. My usual faves are Buffalo wings and potato skins, and looking at the nutrition information for my last meal at Smokey Bones it looks like I ate way over my daily goal (300mg) with just one appetizer. I’m going to have to make a point to ask for the information or pull it up on my phone before ordering from now on.

There’s some additional analysis that I need to do on my detailed results, which were broken down by HDL, LDL and a dozen other factors. There’s one in particular that has a genetic component that I’ll have to take a closer look at, and it also turns out that I’ve actually got a bit of a vitamin D deficiency that needs correction with a supplement. My short term goal is to keep an accurate record of my cholesterol intake until my next screening, which I want to happen in the next 3-12 weeks. Hopefully I will see a reduction in my cholesterol count and fix my vitamin D issue, and then we’ll see where we are.

“Red Dawn”: Dumbest ’80s remake ever? – Salon.com

Yea, I think I’ll skip this one.

[T]o release a movie today that celebrates the moral right — nay, responsibility — of well-scrubbed American children to kill invaders is like giving a giant middle finger to the people around the world who see us as the invading army, and whose children have died by the thousands already. “Red Dawn” is a ghoulish parody of reality, served up earnestly and obliviously, to an audience whose enjoyment will, perforce, be directly proportional to its ignorance.

via “Red Dawn”: Dumbest ’80s remake ever? – Salon.com.

Ecstasy-assisted psychotherapy shows promising results for PTSD | The Raw Story

Ecstasy-assisted psychotherapy shows promising results for PTSD | The Raw Story.

The latest research from the Journal of Psychopharmacologyshows that MDMA helps with post traumatic stress disorder when coupled with psychotherapy. This follow-up study by Dr. Michael C. Mithoefer shows that 17 of 19 study subjects showed long term improvement after 3 and a half years of the initial treatement.

Remarks on CBS on Sunday morning

So hello again, it’s been a while, I know. Almost two years. Obama was just re-elected president, and this has upset a lot of people, like my father in law, who sent the following chain email to my wife today:

Only hope we find GOD again before it is too late ! !

The following was written by Ben Stein and recited by him on CBS Sunday Morning Commentary.

My confession:

I am a Jew, and every single one of my ancestors was Jewish.  And it does not bother me even a little bit when people call those beautiful lit up, bejeweled trees, Christmas trees…  I don’t feel threatened..  I don’t feel discriminated against.. That’s what they are, Christmas trees.

It doesn’t bother me a bit when people say, ‘Merry Christmas’ to me.  I don’t think they are slighting me or getting ready to put me in a ghetto.  In fact, I kind of like it.  It shows that we are all brothers and sisters celebrating this happy time of year. It doesn’t bother me at all that there is a manger scene on display at a key intersection near my beach house in Malibu .  If people want a crèche, it’s just as fine with me as is the Menorah a few hundred yards away.

I don’t like getting pushed around for being a Jew, and I don’t think Christians like getting pushed around for being Christians.  I think people who believe in God are sick and tired of getting pushed around, period.  I have no idea where the concept came from, that America is an explicitly atheist country.  I can’t find it in the Constitution and I don’t like it being shoved down my throat…

Or maybe I can put it another way: where did the idea come from that we should worship celebrities and we aren’t allowed to worship God as we understand Him?  I guess that’s a sign that I’m getting old, too.  But there are a lot of us who are wondering where these celebrities came from and where the America we knew went to.

In light of the many jokes we send to one another for a laugh, this is a little different:  This is not intended to be a joke; it’s not funny, it’s intended to get you thinking.

In light of recent events… terrorists attack, school shootings, etc..  I think it started when Madeleine Murray O’Hare (she was murdered, her body found a few years ago) complained she didn’t want prayer in our schools, and we said OK.  Then someone said you better not read the Bible in school…  The Bible says thou shalt not kill; thou shalt not steal, and love your neighbor as yourself.  And we said OK.

Then Dr. Benjamin Spock said we shouldn’t spank our children when they misbehave, because their little personalities would be warped and we might damage their self-esteem (Dr. Spock’s son committed suicide).  We said an expert should know what he’s talking about..  And we said okay..

Now we’re asking ourselves why our children have no conscience, why they don’t know right from wrong, and why it doesn’t bother them to kill strangers, their classmates, and themselves.

Probably, if we think about it long and hard enough, we can figure it out.  I think it has a great deal to do with ‘WE REAP WHAT WE SOW.’

Funny how simple it is for people to trash God and then wonder why the world’s going to hell.  Funny how we believe what the newspapers say, but question what the Bible says.  Funny how you can send ‘jokes’ through e-mail and they spread like wildfire, but when you start sending messages regarding the Lord, people think twice about sharing.  Funny how lewd, crude, vulgar and obscene articles pass freely through cyberspace, but public discussion of God is suppressed in the school and workplace.

Are you laughing yet?

Funny how when you forward this message, you will not send it to many on your address list because you’re not sure what they believe, or what they will think of you for sending it.

Funny how we can be more worried about what other people think of us than what God thinks of us.

Pass it on if you think it has merit.

If not, then just discard it… no one will know you did.  But, if you discard this thought process, don’t sit back and complain about what bad shape the world is in.

My Best Regards,  Honestly and respectfully,

Ben Stein

This is the same sort of bullshit that he used to send me before I started pointing him back to Snopes or challenging him on. Now he doesn’t send me anything and I must say I really miss the energy I get from rebutting all of the misinformation. Now to keep things civil around here I’m not going to send it back to him, but will instead vent my feelings here and then pass the good word back on upstream to the person that sent it to him. Not that I have any illusions that it will convince him of anything, but rather that this kind of thing is bit of a hobby of mine.

So Snopes has a rather good page on Ben Stein’s Confession for the Holidays email, which shows that like most of these forwarded emails, they start with the truth and then veer off into the realm of the untrue. In this case, someone appended their own remarks onto the email that were then later forwarded on as Mr. Stein’s, so everything starting with “in light of the many jokes…” and continuing on with “in light of recent attacks” and so on to the end of the email, each person adding on their own little bit or removing things like the Jessica Simpson mention like some game of telephone, turning it into a chain-mail goulash of opinion and falsehoods like the fact that Dr. Spock’s schizophrenic grandson committed suicide, or that death and murder existed long before O’Hare took prayer out of school. This email demonstrates exactly what I find so fucked up and ignorant of so many people: that they will take anything that reinforces their worldview as gospel and preach it and forward it without any regard, or, dare I say, any care of whether it is true or not. It’s like the word of God, handed down unto man and misquoted, mis-attributed and forwarded on to the next sucker without a second thought.

By far the best thing about this whole thing that brings me the most joy in my heart of hearts is that Ben Stein actually did post on CBS News this yesterday, and this is what he had to say regarding the GOP coming back after last week’s election loss:

We still have great ideas […b]ut we have to make some changes in our hearts – big changes. This is not the white man’s country exclusively anymore, and it hasn’t been for a long time. The strategy of appealing to angry white men is not correct, either morally or practically.

This is a genuine multi-cultural, multi-racial democracy today. We must appeal to working women, to single women, to blacks. In particular, we can and must stop hurting the feelings of Hispanics and start inviting them into our party.

While I’m not sure entirely if these remarks spawned this latest round of the Christmas Tree chain mails, but it is a funny coincidence, almost like one is trying to drown out Stein’s acknowledgement of the changing face of America and his appeal to greater inclusion with this appeal to traditional right wing values, just in time for the War on Christmas.