Friday, October 11, 2019

Enable a Remote Mailbox in Office 365

So I recently ran into an issue where I had a user who's Local AD account had been deleted but their Office 365 Mailbox was still showing up. We tried to bring the user account back, however the AD recycle bin was not enabled. So we had to create a brand new account for the user and then work from there.

We originally planned to create a new mailbox and let the user start from scratch. However we ran into an issue were the old mailbox would not go away, and it was preventing us from migrating a new mailbox into Exchange Online for the user.

I then found the following Exchange Management Shell command which will allow you to connect the local AD account to the Exchange Online Mailbox.

Enable-RemoteMailbox USERNAME -RemoteRoutingAddress Alias@domain.onmicrosoft.com

After running the command the user is now able to log in with their new AD account and have access to their mailbox.

I hope you found this post helpful, and if you did, please share it with your friends.

Friday, August 23, 2019

VMWorld is in 2 days!!!

Image result for vmworld 2019

VMWorld 2019 will be in 2 days!! I will be attending this year for my first time. I must say I am very excited and anxious to go. I am looking forward to all the people I will meet and events that I will have the opportunity to take part in. 

I will do my best to post updates throughout the week. Be sure to follow me on twitter @kenbshinn where I am sure I will be posting updates as well. 

Friday, August 9, 2019

Microsoft Active Directory Time Sync Settings

So I was recently asked by a client: "Why is the time on my PC 5 minutes off from my phone?"

Now this is a small environment, a very small environment (1 Server and 7 workstations). The first thing I thought about was what does the server clock look like? So I remoted into the server and sure enough it had the same time as the workstation.

I went and checked the registry and found that the server was pointed get its time from time.windows.com, but for some reason that was not working.

I then used the following command to point it to several of the pools hosted by NIST.gov

w32tm /config /manualpeerlist:time-a-g.nist.gov,time-b-g.nist.gov,time-c-g.nist.gov,time-d-g.nist.gov /syncfromflags:manual /reliable:yes /update

After that I restarted the W32Time (Windows Time) service to make the update work.

Once that is done it should force a resync of the time service which could take some time to update and to sync with all the workstations.

I hope you find this post helpful, and if so please share it with your friends.

Friday, July 26, 2019

Power off entire Virtual Environment using a PowerShell Script and PowerCLI

So I have a lab that I manage where we have had several scheduled power outages in the last few months. So it is my job to make sure that we power off the lab so none of our equipment have issues when we bring it back up.

I would estimate that our lab is comprised of about 90% VMware ESXi Hosts, and after going through the exercise of powering off the whole lab 1 or 2 times, it became it bit of a pain.

So I created a PowerShell Script using PowerCLI to not only power off all the Virtual Machine, but also the Virtual Hosts, and the VCSA appliance itself.

I have posted the script to my Github which you an check out here:

https://github.com/kenbshinn/Poweroff_VirtualEnvironment

Feel free to check it out and let me know what you think.

I hope you found this post helpful, and if so, please share it with your friends.

Monday, July 22, 2019

Home Automation.... reinventing the wheel

A few months back I had a catastrophic failure with the Raspberry Pi that had been running my Home Automation Platform (Home Assistant). Long Story short, I reached the physical limit of writes available on an SD Card. Who knew you could reach that limit on less than 2 years if you are running an a Home Automation System, Logging Location Services, Temperature monitoring, well as an MQTT Broker on the same box?? 

Unfortunately my schedule did not allow for me to rebuild my Raspberry Pi sooner, and I am kind of glad that it did. During the time of being Home Assistant-less, I learned that I was really not using it to it's fullest extent and that overtime most of the features that I depended on it for had been transitioned over to my Google Home/Smart Things Hub, or my kids ended up reprogramming (more on this later).

I started to think about what I really needed Home Assistant for, well besides turning on my Z Wave Controlled office lights for me (that was very handy). I also thought about how my Google Homes had been taking over my life. Then it occurred to me. 90% of what I use my Google Homes for is Voice controlling my lights. That is not Automation, 4 times out of 10 I have to repeat myself to get it to work, and the effort of turning on a light switch with my hand is not very taxing. 

Really, I am just being lazy..... End of Story!




Just kidding....

In all seriousness I decided to get back to basics and figure out what I had going on in my house that could use Automating and here is a list of projects I have come up with that I will do blog posts about in the future.

  • Install Philips Hue Lights (the wife bought me these about a year ago, Time I put them to work)
  • Automating Dehumidifier - using a Z Wave humidity sensor and a WEMO Outlet
  • Automating Basement Space Heater - Same concept as above
  • Automating Office Fan - Now this one is going to be tricky. I am not sure if I want it to turn on when I open the door, or at a certain temperature. 
  • Automating my Bearded Dragon's Lights - Using a WiFi Enabled power strip
  • Automating Exterior lights - Using Presence of all family members and time of day
I have other lists of things that I would like to do down the road, but for now, this should keep me busy. 

Just so you are aware, I do have vanilla Home Assistant running on my Raspberry Pi 3 B+ and I am still trying to figure out what I am going to do about an MQTT Broker to communicate with my Smart Things Hub. I have been playing around with Docker and I am thinking that is a good place for it to live, as well as hosting it on a separate Pi or Linux machine. 

Come September my schedule will be going back to crazy, if not worse with some additional things I am putting on my plate which I hope to talk about soon.



Friday, June 14, 2019

How to convert a User Mailbox to a Shared Mailbox in Exchange 2016

So I discovered that there is the right way and the wrong way to create a Shared Mailbox when using Office 365 Exchange Hosted and Exchange 2016 in a Hybrid configuration. So the way I would normally do it would be to migrate the mailbox to Office 365 and then click that pretty little button to convert to a Shared Mailbox.

It turns out that when you do that it will create the mailbox as a shared mailbox, however the Active Directory (AD) Components are non-existent. Which means you cannot assign permissions to users who are synced by AD.

Well.... you can.... but it doesn't actually work.

So what can we do to make it work when you have a user who is complaining that they need to send out a file at 4:45 PM on a Friday???

Well there is not much that you can do, but I would start with converting the mailbox back to a normal user mailbox and then migrate the mailbox back to your Local Exchange Environment.

Once the migration is complete you can then run the following command to convert a normal user account to a Shared Mailbox on Exchange.


Set-Mailbox AJones -Type shared
Once the command is complete (which is really freaky fast) you will then be able to see the mailbox under the "Shared Mailbox" section in Exchange.

I would then Migrate the mailbox back to Office 365 the way that it is and once it is done you should be good to go.

In the event that you would want to switch the Shared Mailbox back to a normal mailbox, here is the command to switch it back.

Set-Mailbox AJones -Type regular

I hope you found this guide helpful, and if did, please share it with your friends.



Friday, June 7, 2019

All vCenters not showing up after adding a new one to an SSO Domain

As I have mentioned before, the company I work for had a disaster event that took place almost a year ago and because of that we have had  some of our infrastructure duct taped together.

Today I am proud to say that I had the opportunity to rip off another piece of that duct tape and actually move our Virtual Infrastructure forward.

You see, Pre-Disaster we had a single vCenter appliance which managed 3 sites. (Yes I know... yuck)

But, because of the disaster we had to move all of our services from the 1 site to the other 2. In the middle of the DR event I had to create 2 VCSA appliances to be able to manage the 2 sites, and due to a lack of sufficient network connectivity at the time, they were just islands. I even set them up a separate SSO Domains.

Fast forward to today, and I have now consolidated these 2 SSO Domains down to 1 and I must say it is pretty slick.

I did however run into a bit of an anomaly, which is the purpose of my post today. You see on the VCSA appliance that was added to the existing SSO domain, I discovered that I could see the first VCSA Appliance in the vSphere Web Client as well as it's inventory which was awesome!

However on the vSphere Web Client of the Original VCSA Appliance, I can only see the 1 VCSA Appliance.

I consulted Dr. Google but found nothing at first, until I came across this post on the IBM Cloud for VMware Solutions site.

It turns out that you need to restart the vSphere Web Client in order for the new vCenter server to appear.

Just encase the link dies I will post the resolution here:

This is a known VMware 6.5 issue.

To resolve the problem, you must restart the vSphere Web Client:

Using the root account, connect over ssh to the vCenter VM (virtual machine) of the previously ordered instance.
Type shell to enter the bash shell.
Enter service-control --stop vsphere-client to stop the client.
Enter service-control --start vsphere-client to restart the client.
After the vSphere Web Client of the previously ordered instance is restarted, confirm that the vCenter Server system for the newly added secondary instance is visible in the vSphere Web Client.

NOTE: Rebooting the VCSA Appliance will also resolve your issue.

I hope you found this helpful, and if so please let me know and share with your friends.

I have moved!!!

Please check out my new blog which now contains all my old posts and some new goodies as well.  I can now be found at http://www.kenbshinn.c...