Thursday, November 1, 2012

Why my MacBook Air keeps crashing

Since I am somewhat profound on using Microsoft Software, I thought I needed a new challenge. So I bought myself a Apple MacBook Air.

I was very happy using it, didn’t miss that much functionality which I couldn’t add in another way with a simple application. I can manage all Microsoft Networks at ease… So I kept on using Mac OSX. (I do have a dual boot to Windows 8 which I work on regularly)

Since the beginning of June my MacBook started freezing, or Crashing… and I couldn’t find out why. So I started my troubleshooting skills on it and finally I found it…

What I noticed was the following. When the power is disconnected for a few seconds, and than reconnected the freeze would occur, but not always..

So It could be a power thingy, or a power save thingy… But still a little vague. And since it is doesn’t happen always it was extra strange… So I started to note which Applications I have open on the system when the crash or freeze occurs…

Mostly I had the same programs running in the system:

* Outlook
* Google Chrome
* Word
* Excel

But finally saturday at home I found it. I had only one program running when the freeze occurred: Google Chrome.

So I switched back to Safari, and stopped using Chrome. And am crash free for a few days now.

But a program such as Google Chrome should not be able to freeze or crash my system. So I started my search on the internet, and apparently I am not the only one with this problem since I found a load of references. The consensus seems to be that it has to do with the GPU acceleration used in Google Chrome. So my initial idea that it was a Power Safe Thingy might be right. When the power is disconnected the Mac switches from the highpower gpu to an internal low power GPU. When the power is reconnected Google Chrome starts to panic and keeps feeding the internal GPU and with that overloading the system bus and therefor freezing the system.

On a google Chrome forum I found that Google acknowledges this problem with the GPU and has disabled some features to track the problem down, but still haven’t found it. Now they have filed a bug report with Apple in the hope that Apple can fix something on their end.

So until this is fixed, I am to use Safari or Firefox.. But I think that for now I stick to Safari.

Thursday, September 27, 2012

Create an Import Export Management Group with rights

To be able to use the other script to import PST Files, you first must have the permission to do so.

Since I am in favor of RBAC I created a little script to create an Exchange Import and Export Management Group, add the current user to this group and assign the appropriate rights to the group.

# To be able to import PST files you must be member of the Import Export Management Role.
# Bas Steelooper, XOBIT IT Services
# This script will create an AD Group in the users OU named Exchange-ImportExport-Management
# And add the current user to this group.
# You have to logoff and logon again to use the newly acquired rights

# Configure here the name of the group to create
$GroupName = "Exchange-ImportExport-Management"

# Do not edit below this line

#Prepare the needed modules
Import-Module ActiveDirectory
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

# Create the AD Group as a Universal Group
New-ADgroup -Name $GroupName -GroupScope 2

# Add the current logged on user to the Group
Add-ADGroupMember -Identity $GroupName $env:username

# Assign the Import Export Rights to the Group
New-ManagementRoleAssignment -Name "ImportExport-Management" -SecurityGroup $GroupName -Role "Mailbox Import Export"

Monday, September 24, 2012

Importing a ####-Load of PST Files into Exchange

For a migration we needed to import a lot of PST files into the mailboxes of migrated users.. Since I am an IT guy, and therefor lazy, I created a script to do this.

This script creates a folder for each PST file with the name: "Import ()"

Prereqs for the script are:
* For each user with to be imported PST files create a folder with the first part of the emailadres (everything in front of the @-sign)
* add the PST files in the appropriate folder
* Edit the first two lines of the script to point to the share where the data resides, and the domainname with the @-Sign
* User must have the Import and Export management role assigned

# PST Import script.
# Bas Steelooper, XOBIT IT Services
# This script will import the PST files from a given location.
# The PST files must reside in a folder which is named as the part of the emailadres in front of the @-sign
# This script will import each folder one at a time and cleanup all the completed imports
# With the command Get-MailBoxImportRequest you can view all the failed import requests

# Configure the parameters. 
# $pstpath contains the share location where the PST Files are stored. ( The AD Computer account must have access to this location)
# $emaildomain contains the rest of the emailadres for all users
# $forceimport if $TRUE thePST-File will be forced imported, items which cannot be imported are skipped. Default is $FALSE
$pstpath = "\\<server>\<share>\UsersPSTData"
$emaildomain = ""
$forceimport = $TRUE

# Do not edit below this line

#Load the Exchange powershell Snap-IN
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

get-ChildItem $pstpath | Foreach-object{ 

 $curuser = ""
 $curuser = $_
 $PSTFiles = get-ChildItem $pstpath\$curuser 
 $PSTFiles | Foreach-Object{ 
  if ($forceimport) {
   New-MailboxImportRequest -BatchName $curuser -BadItemLimit 200 -AcceptLargeDataLoss -Name $_ -MailBox $curuser$emaildomain -FilePath $pstpath\$curuser\$_ -TargetRootFolder "INBOX/Import ($_)"
  else {
   New-MailboxImportRequest -BatchName $curuser -Name $_ -MailBox $curuser$emaildomain -FilePath $pstpath\$curuser\$_ -TargetRootFolder "INBOX/Import ($_)"

 while ((Get-MailboxImportRequest -BatchName $curuser | Where {$_.Status -eq "Queued" -or $_.Status -eq "InProgress"}))
  sleep 60
 Get-MailboxImportRequest -BatchName $curuser | Where {$_.Status -eq "Completed"} | Remove-MailboxImportRequest -Confirm:$false;