How To Fix Outlook 2016 Freezing on Loading Profile

I haven’t found a permanent fix for this problem in all cases. So consider this article “ongoing” for now. I’ve noticed that sometimes that Outlook 2016 will freeze on the “Loading Profile” screen on Windows 10 computers. This seems fairly specific to machines connected to an Exchange account of some kind.

The first few times I encountered it the below fix resolved it completely after one time. I have seen a few computers where, it still does this despite a local profile wipe (which on Windows 10 is not the best idea apparently). It usually happens after the user reboots. If anyone knows what actually causes this problem, and an actual fix, rather than the below “band-aid” I’d love to hear it and will give credit in an addendum to the article.

Fix Outlook 2016 Freeze on “Loading Profile” Screen

Step 1 – Either close Outlook or have the user do it. You can kill the task remotely or just close the load screen window. It isn’t really frozen, it’s just stuck most of the time.

Step 2 – Navigate to the following directory on the user’s machine: C:\Users\[user profile name]\AppData\Local\Microsoft\Outlook

Tip: You can do this remotely by navigating to \\[user’s PC hostname]\C$\Users\[user profile name]\AppData\Local\Microsoft\Outlook

Step 3 – Look for a file in that directory called “useremailaddress@domain.com.ost”. Delete it.

Step 4 – Have the user re-open Outlook.

This seems to resolve the problem. The issue seems to stem from a corrupted OST file or something. Sometimes this will keep happening when the user reboots the computer or the computer updates. Most of the time not though.  I’ve tried the following to fix the issue on the machines where this recurs with no luck:

  • Making a new Mail Profile and re-setting up Outlook
  • Doing a full Profile Wipe on the local computer
  • Doing a Windows 10 “restore”
  • Repairing Office.

I haven’t tried taking Office completely off and putting it back on, may try that next and see if it’s just a corrupted Office installation, nor have I tried removing the affected user’s Inbox at the Exchange level and see if that fixes it. I tend to think it’s a problem on the local machine as only certain PC’s have the problem.

I’ve read a few Technet articles and had very little luck with that either.

It could, in theory be some other file that’s corrupted, I have a hard time believing Outlook would repeatedly corrupt an OST file, I have not tried removing the entire Outlook Folder to see if that fixes the issue.

If anyone has any ideas please let me know!

How To Schedule Remote Restarts For Windows PC’s In A Specific OU – Server Basics

Restarting a local server once after hours is a pretty neat trick but sometimes you need to restart an entire Organizational Unit of computers. There’s a few ways to do this. You can do it with the shutdown command by hostname and keep a little batch script updated. Or you can use a PowerShell Script.

I’d like to credit Jack McCarty for this command. He came up with most of this either on his own or from stuff he found various places on the internet.

 

How To Remotely Restart Computers In A Specific OU With Powershell

This is one of several methods and, honestly it’s pretty slow but it works pretty well, and the advantage is you can just add machines to the OU you want to restart. This is a pretty flexible command/script and can be modified to do other things instead of restarting computers. Also, please note this forces the restart.

Step 1 – Open up your favorite script editor on your server. I like Notepad++ personally. The Powershell ISE is pretty good as well.

Step 2 – Copy and paste the code snippet below into your code editor and change it. The appropriate place to modify is the string after -searchbase. You’ll need to change “OU=Lab, OU=Workstations, DC=workendtech, DC=local” to fit your environment. If your domain is say, Example.com and you wanted to reboot everything in the Computers CN you’d change it to something like “CN=Computers, DC=Example, DC=com”.

get-adcomputer -filter * -searchbase "OU=Lab, OU=Workstations, DC=workendtech, DC=local"|Select * ,@{n='computername';e={$_.name}} |restart-computer -force

Step 3 – Save the file as a plain text file with a .ps1 file extension. Some code editors will have a Save As “PowerShell Script” file type that will do this do you.

Step 4 – Run the script through Powershell. You can also run the command directly without saving it as a script.

Scheduling A Powershell Script in Task Manager

There’s not much to scheduling a powershell script in task manager.

Step 1 – Create your Task as normal

Step 2 – In the Actions Window/Tab type “powershell” (without the quotes) in the ‘program/script’ box. In the arguments type “-file ” in the arguments box. You can also add the path to your script in the “Start In”  box.

Note: Some scripts may need a few extra arguments. Testing the command in your command prompt will usually help you figure that out. The one above seems to work just fine with just “-file”.

How To Schedule Windows Server For Automatic Restart – Server Basics

 

This is one of those really basic tasks you can easily set up with no added software or even Powershell scripts. It’s extremely useful too. Say you need to reboot a server because you installed some software that you didn’t expect needed a reboot, or there’s some updates, or some other reason. You can’t really do it until after hours and you don’t want to hang around and would just like it to reboot itself a couple of hours after closing time when everyone is home.

You might also want to reboot a Windows Server a month or once a week as a matter of routine maintenance.

This is fairly trivial to set up in Task Scheduler.

How To Schedule A Windows Server For Automatic Reboot

Note: I’m using Server 2016. This is almost exactly the same in 2008 and 2012.

Step 1 – Open Task Scheduler. In the newer versions of Windows Server you can just click on the start button and type “Task Scheduler”. You can find it manually under Control Panel under Administrative Tools. You can find it in the Start Menu in Server 2003 but the Task Scheduler is a bit different.

Step 2 – Right Click on the Task Scheduler Library (Highlighted in the picture in Step 1) and click “Create Basic Task”. This will open the Wizard. You don’t have to use the Wizard, but since this is a very simple task it’s easier.

Step 3 – Give a name to the task. I called this “Restart Server Once”. In a multi-server environment, my personal preference is to call it “Restart This Server Once” or “Restart Local Server Once” to show that the task restarts that specific machine. As I usually also have tasks to restart remote servers and workstations on at least one of them as well. If I were also making one to restart the box on a schedule I’d name it something like, “Restart Local Server On First Of Month”.

Click Next.

Step 4 – Since this task is to just restart the server one time click the “One Time” option and then click next.

You’ll note the sub-task called “One Time” under triggers.

Step 5 – Give it a date and time to restart. Click next.

I chose 8pm the next day.

Step 6 – Select “Start A Program”. Click Next.

Step 7 – Type “shutdown” without the quotes into the “Program/Script” box and “/r” into the “Add arguments” box. Click Next.

Step 8 – Click Finish

Step 9 – You aren’t done yet because you want this to run if you get logged off and you want to set this up so you can use it again later.  In the Task Scheduler right-click on your new task and click Properties. This will bring up the general settings page. The radio buttons on the bottom will default to “Run only when user is logged on” change it to “Run whether user is logged on or not”.

Step 10 – Click OK. It will make you enter your administrator password.

You’re finished!

Changing the Schedule for The Automatic Reboot

So now you have a task that will automatically reboot your server (Or PC) one time. Now  you need it to do it again. There’s no need to make another task, you just need to update the trigger.

Step 1 – Go back into Task Scheduler, right-click on your task and click Properties. Click on the Triggers tab.

Step 2 – Click on the “One Time” trigger and click the Edit button. Change the time and date, click OK on all the dialog boxes and your server/PC will now restart at the new time.

It will ask  you to re-enter the administrator password.

How To Set Up A New Windows Domain – Server 2016 Essentials

I had some extra hardware lying around, and my trusty backup drive got full so, I decide it was time to build a lab environment so I could develop stuff easier. This involves, to start with a Windows Server 2016 Essentials server. Hopefully everyone out there will find the process I’m going through to set this all up useful.

One of the first steps is creating a Windows Domain. There’s a pretty good TechNet article on this that gives some really good advice for people new to the industry. There are a few things you don’t get to do often in IT, and creating a domain from scratch, unless you routinely install Windows systems for customers is one of them.

The process for creating a Windows domain is pretty simple and basically the same on newer versions of Server. You set up the server, give it a static IP, promote it to a domain controller, and follow the wizard. It reboots a couple of times, and you have your very own Windows domain.

Once you do this you pretty much can’t go back, so you have to make some decisions and give it some thought beforehand.

Now, like the TechNet article this is mainly for relative beginners with a network requiring one domain controller (possibly two), small to medium size business owners, and technicians just starting to dip their toes into these waters. This is not for Enterprise IT guys with a huge domain forest. You guys already know what you’re doing. If you’re starting out and you feel your network is big enough for ten domain controllers, three sub-domains and has five thousand users, consider hitting that contact form up there. Also I’m using the Essentials version of 2016. The processes I’ll be describing in this and future articles are similar but not exactly the same as what you’ll find in  Standard and Datacenter versions.

Considerations For Naming Your Windows Domain

This is where I’ve seen the biggest mistakes made. You need to answer a few questions and do this very deliberately. Now fortunately, Microsoft has some very good defaults that make this a little easier, but it probably wasn’t always this way.

Questions

  • Do I have a website and email that’s hosted somewhere outside my premises?
  • Will I ALWAYS have that website/email domain or could it be changed it in the future? (Less important)
  • Do I like making really creative changes to my DNS to make things work because I named my internal domain the same as my external hosted domain?
  • Is anyone actually going to care that the internal domain doesn’t match our external website? (The answer is likely not).

The reason is, and let’s use this website as an example. Say, GoDaddy hosts WorkendTech.com and its email. I then name my internal domain “WorkEndTech.com” as I’ve seen many people do. When I pull up a website on any computers attached to that domain, using my domain controller as a DNS server, I won’t able to reach my website, or get e-mail. This is because internally “WorkEndTech.com” is now referring to my domain controller(s), not GoDaddy’s hosting. Also my email will  not magically start going to my email server because I set up an Exchange server to start accepting email for that domain.

This should seem obvious but, you have to tell everything on the Internet where you want that stuff to go. You will then also have to tell your own internal DNS servers that you want “http://WorkEndTech.com” to point to something on the internet, and if your host doesn’t have a static IP assigned to your website, or if they change name servers sometimes, which they may, this can get super annoying. Also, remember once you set the domain up it can’t be changed without wiping the domain controller and starting over.

Now if you host your own website, email, and all that other fun stuff on the very server you’re setting up, this is irrelevant and you might actually consider naming your website and internal domain the same thing for convenience. You can name it something else and point your internal stuff to an internal server a lot easier than the situation above.

Consider using the .local extension for your domain heavily. That way you can differentiate it from your external domain. By default Microsoft will assign it this way.

Setting Up Your First Domain Server 2016 Essentials (And other versions of Server)

So you’ll need a few things before you start.

  • A Static IP for your server.
  • A name for your domain (See considerations above).
  • A hostname for your server.
  • Internet Access for your Server (OK this is breaking some security rules, but it makes time synchronization easier. If your router has an NTP server on it, just network access will do).
  • About 30 minutes.

Step 1 – Install Server 2016 Essentials on your machine. Just get the DVD or use a Bootable USB drive.

Step 2 – Give your server a static IP.  Reboot the server. Ignore the “Configure your Server” wizard that pops up. It’ll pop  up on reboot. You can even close it. I’m not sure how to make it pop back  up manually, but rebooting seems to work fine.

Step 3 – A wizard for “Configuring Your Server” should pop up automatically. Read it, click Next.

Step 4 – Make sure your Time Zone and Date/Time are correct.

If the time and date and time zone aren’t correct hit the “Change System Time and Date Settings” and you need to change the time zone here. Usually it’s just the time zone that’s wrong as it is always set to US Pacific time by default. Click Next once that’s all set up.

Step 5 – Enter your company name. The wizard will suggest a domain name and host name for your machine. With mine, I put in WorkEndTech. It suggested WORKENDTECH as the domain and WorkEndTeServer. Obviously I changed it.

I changed my server name to just WorkEndTechServer and made sure my domain was WorkEndTech.local. You can make doubly sure or change the full domain name by clicking the “Change Full DNS Name”. I highly suggest doing this just to make sure.

You can also go with a different naming scheme for your servers, changing the host name will in no way affect the domain name. Click Next.

Step 6 – Create a network admin username and password. I’d suggest against “administrator”. You can use your own name. I went with WorkEndAdm. Click next.

Step 7 – Choose whether you want to use the recommended security settings or do that all later. I just went with the recommended and clicked next. You can tweak those security settings later if you’d like.  Click Next.

Step 8 – The wizard will then start setting up your server as a domain controller for you. This process can take up to half an hour depending on your hardware. I’ve seen some take as little as three or four minutes. It will reboot, continue to set up, and possibly reboot again.

That’s it. You’re pretty much done. The server is now a domain controller. You can now start joining client PC’s to it, making group policy stuff, adding users into to Active Directory, and adding roles and features.

 

 

ShoreTel Backup Method Revisited

Occasionally I’ll get a comment on the blog that says, “This post is three years old but it worked” which is really nice to hear. It also means that at least in the case of ShoreTel most stuff is fairly consistent between versions.

I was thinking about backing up ShoreTel servers today and looked at my old post on backing up your server and thought this would be a good time to post again about using a method I’ve found that works well, but that ShoreTel doesn’t seem to talk about.

I am going to disclaim this, as ShoreTel does not suggest it. However, if you poke through this blog, other forums, and talk to ShoreTel customers and partners you’ll find out that basically none of them set up a backup plan on standalone servers. If they do it’s ShoreTel’s included scripts, which almost always fail after a minor update, if they ever worked in the first place.

Backing Up Your Stand Alone Server With Windows Server Backup

You’ll need a NAS or other remote storage for this. These instructions are a little more ‘theory’ than the precise step by step instructions I’d rather give. They’re also geared for Server 2008 and Server 2012. It should work just fine with Server 2016 and forward as Server Backup hasn’t changed much since the 2003 days. If you are still using 2003 you’ll need an external hard drive and a floppy disk probably.

You will also need an installation media for Server 2008/2012 for this to restore correctly. You can usually download this from Microsoft. Someone with a volume license agreement or a Microsoft partner can usually get you the Installation Media (I’ve never had a problem getting one for free if it was an emergency). If you have an install disk from a major hardware vendor like Dell, this will work too as you aren’t actually using the install media to do the installation. I do not think you’ll need your Server Key, but you should be keeping a copy of that somewhere safe anyway.

Step 1 – Open server backup and select the option for a scheduled backup.

Step 2 – You will want to do a full back up to a remote share. The remote share is your NAS. Depending the on the version you may be able to do incremental backups to a remote share as well. Don’t do this. Just do a full, bare metal backup of everything every night or once a week or whatever you feel comfortable with.

Note: A word on the scheduling. You want this to be some crazy hour when nothing is going on. I’ve checked logs on a few servers with this set up. It does not take long, anywhere from ten minutes to an hour at most. Depends on the speed of the machine, NAS and network. It uses shadow copy snapshots so it basically is just copying an image of the machine when the backup copy job starts. I HAVE run these during the day and it doesn’t seem to mess anything up. I would not trust that to happen on a really busy server.

Note 2: This method just backs up the server once, and wipes out the previous backup. Because ShoreTel is constantly writing and deleting stuff, I am of the opinion that a full backup every time is better. This is really for disaster recovery not recovering a deleted extension or a voicemail someone accidentally got rid of.

Restoring the ShoreTel Server

This is pretty straight forward. You want to boot from the Server 2008/2012 installation media and select the “Restore my server” or advanced options instead of the “Install” button. You’ll find a restore from image option. You can usually browse for the image on a network location, sometimes you may need to put it on an external drive (May be a version thing).

You’ll need similar or the exact same hardware to use this. Some backup software will let you restore on dissimilar hardware but, I have no idea how well this works with ShoreTel. It’s probable you could make this work somehow with virtualization though. Newer versions of Server Backup make a VHD file so, it’s entirely likely you could boot it directly in HyperV, but that’s just speculation.