Thursday, January 29, 2015

Public Folders, Exchange 2013

Are a massive pain in the ass...

So you have the main mailbox, assigned the Primary Hierarchy, and all mailboxes beyond that are assigned the Secondary Hierarchy.
If a folder resides in anything but the Primary Hierarchy, you will NOT be able to add subfolders to it through Outlook.
You'll get this window:
The connection to Microsoft Exchange is unavailable.  Outlook must be online or connected to complete this action.









You'll still be able to add folders through the EAC, but this is a massive administrative pain if your users are adding subfolders all the time.
You will be able to move data like emails and tasks to it if its in a Secondary Hierarchy though.

If you have a folder tree like this:
Root public folder
                    ∟Team folder
                                          ∟ Folder for Stuff
                                          ∟ Folder for Stuff
                                          ∟ Folder for Stuff

That continues on and on for different root public folders, this is how you have to have them assigned on the back end:
Root public folder(primary hierarchy)
                    ∟Team folder (primary hierarchy)
                                          ∟ Folder for Stuff (secondary hierarchy)
                                          ∟ Folder for Stuff (secondary hierarchy)
                                          ∟ Folder for Stuff (secondary hierarchy)

This way, you're moving the actual data to another PF-Mailbox and allowing the Primary space to create other useable folders through outlook.
In the Folder for Stuff, you'll be able to add emails, tasks, etc, just not subfolders.

If you've migrated from a previous version of exchange and didn't map out your public folders like this prior to the move, here are some powershell scripts you'll need.  You'll need to be in the exchange shell, running as admin and logged in with a user that has exchange administration rights.

I'd just CD to the location of scripts since you'll be running a number of scripts.  The scripts are located in program files\Microsoft\exchange server\

so you'll need:
.\move-publicfolderbranch.ps1
This script moves the folder you select along with everything underneath it.  If you're moving a large folder, it will lock down all public folders until its done.
FolderRoot:
the location of the folder, if its a root folder, just type its name, if its not, type \home folder\sub folder\sub folder\etc until you get to the folder you're going to move.  If you use the EAC to find the public folder, drill down to as far as you need and you can copy the path/paste it into powershell with a right click.

TargetPublicFolderMailbox:
The pf-mailbox you're moving to (the secondary hierarchy folder)

To see the statistics:
get-publicfoldermoverequeststatistics -identity \publicfoldermove

Before you move on to the next folder move you have to remove the finished job (there might be a better way to go about this, but I'm new to powershell/coding in general)
remove-publicfoldermoverequest -identity \publicfoldermove

If you only want to move the root folder:
new-publicfoldermoverequest

You'll be able to select the folders you want to move with this command.

Sunday, January 4, 2015

Sorry, Word Web App ran into a problem opening this document.

I've been working on documents on one drive pretty frequently.  I use the free onedrive account and all the word documents I use there were created in one drive, not uploaded.
Here's the problem, 1 document comes up with this error:

Sorry, Word Web App ran into a problem opening this document.  To view this document please open it in Microsoft Word.

Which I was able to do, so my data wasn't lost.  But I wanted to open it in browser so I could continue working on that file.

I was able to open up every other word document I created in one drive just fine.  This was happening in Chrome, Firefox and IE on two different computers.  Since downloading it worked, I know my data is still there and wasn't panicking too bad.

What I ended up doing to fix it was to create a share to the document with edit privileges, I copied that link and logged out of one drive.  Opened up the document and edited it, waited for the save to complete and closed out.  Logged back into OneDrive, and the document worked again.

Pulling local admin accounts on a windows system WITH POWERSHELL

 There’s a couple ways to get them, I’m sure you’ve been around the internet looking. The Powershell scripts I use: Get-LocalGroupMember -Gr...