Moved al mailboxen to Office 365 & Still using dirsync! Can you remove the last Exchange 2010/2013 Server. Yes It Can! Just don’t do it!! You will have a support issue when you have problems!!

After a customer migrated  to Exchange Online some time ago.
They wanted not a hybrid situation. but they are using still DirSync!

After reading: Decommissioning your Exchange 2010 servers in a Hybrid Deployment a I read its not a real problem.

Changed DirSync & After that Uninstalling Exchange 2013 was very easy.

I had only to disable the Arbitration mailboxes: I did that with the following powershell command:

Get-Mailbox -Arbitration | disable-Mailbox -arbitration -RemoveLastArbitrationMailboxAllowed

I did not publish this article because i has still some doubts!!

I had still a question: Do want to remove the last Exchange Server? Have you a supported Environment without a local Exchange Server and still using DirSync??

Yes & No!!

After reading Concerning Trends Discovered During Several Critical Escalations

Microsoft Says:
You may remove the last Exchange Server locale when you move totally to Office 365/Exchange Online, but change Exchange Attribuuts trough ADSI is not supported.

If you don’t have a third party tool for that. The only way is trough ADSI and that is not supported.

My Conclusion:

You have a support issue when you dropped a Call at Microsoft and they investigate your environment.
Don’t remove the last Exchange Server even when all mailboxen exist in Office 365/Exchange Online and keep them up to date!
You can always install a Exchange Server but most of the times it will be always to late!

Bulk import applicaties in MDT

Mikael Nystrom created i freaking nice script.

Often I need to import applications into the Deployment workbench and that is fine. The process is easy and fast, but it is boring and if you have more then 5 apps it is really boring. Based on the fact that almost all my apps in MDT is deployed using VB or PowerShell wrappers its is just one file in a folder and then there is a subfolder with the content. You don’t need to be a genius to figure out that 90% of all the apps pretty much have the same folder and file structure in the root of the application folder, so why don’t we use PowerShell to import all the apps based on some guessing?

The command line:
This is the tricky part, since there is no way to know that it will be a guessing game and the command line might need to be modified after import, but I rather modify 2-3 applications instead of importing all of them manually.
The default cmdline for all imported apps will be:

.EXE    “$Install /q”
.MSI    “msiexec.exe /i $Install /qn”
.MSU    “wusa.exe $Install /Quiet /NoRestart”
.PS1    “PowerShell.exe -ExecutionPolicy ByPass -File $Install”
.WSF    “cscript.exe $Install”

The Script:
The script is rather easy, it takes 2 parameters. The folder from where to import and the deployment share. You need to have MDT installed since it is using PowerShell cmdlets from MDT. The syntax for the script looks like this:

.\Import-MDTApps.ps1 -ImportFolder d:\APPS -MDTFolder D:\DeploymentShare

image

You can download the script here: http://1drv.ms/1pGTvkA mirror: Import-MDTApps.7z

Hyper-V Reporting Script

Serhat AKINCI, a Hyper-V MVP, has just posted this very useful script:

https://gallery.technet.microsoft.com/Hyper-V-Reporting-Script-4adaf5d0

In his own words:

It can be difficult to monitor and assess resources in large Hyper-V environments. This PowerShell based script helps you to understand virtualization inventory, capacity and general resource availability in your Standalone or Clustered Hyper-V Environment.

Highlights
  • More than 2600+ lines of PowerShell, HTML and CSS code examples.
  • Creates a plain but detailed and user-friendly HTML report which is compatible with all modern browsers.
  • Provides more detailed information via tooltips in the HTML report. (cells with asterisks and highlights)
  • Checks and installs required runtime environment prerequisites like Hyper-V and Clustering PowerShell.
  • Collects information by using standard Hyper-V and Clustering PowerShell cmdlets and custom WMI queries.
  • Shows alerts in the report for certain situations (utilizations, VM checkpoints, replication status, etc.)
  • Can be used directly from command-line or as a scheduled Windows task.
  • Supports report delivery via e-mail with advanced options. (authentication, TLS/SSL, multiple recipients)
  • Includes a mode that reports only alerts in the Hyper-V environment. (aka Highlights Only mode)
  • Advanced error handling and logging. (Console messages and log file)

You can see an full example report here: http://www.serhatakinci.com/files/get-hypervreport-v1-0-demo-output.html
Open-mouthed smile

Configure your Exchange 2013 server with Configure-Echange2013.ps1 Updated to V2.2 Added Check Transaction Log Growth

I love Powershell <3.

Configure & maintaining your Exchange 2013 can be a hell… I do the most things with powershell…

I have a lot of standard scripts to configure an Exchange 2013 server or DAG cluster.

So i created a freaky nice script i my say so!! :

Updated to V2.2 Added Check Transaction Log Growth
Configure-Exchange2013

Download: https://gallery.technet.microsoft.com/scriptcenter/Configure-Exchange-2013-e0ffb2a6

Block iOS devices with Block-IOS-Devices.ps1 Script

Microsoft keeps a list of problems: Current issues with Microsoft Exchange ActiveSync and third-party devices

After some problems at a customer i looked deeper at these problems.
Most problems come’s with iOS devices (iPhone and iPad)

Sow I made a list of al iOS versions (6,7 and 8) and there problems.

To keep this simple i created a powershell script: Block-IOS-Devices.ps1 or you can download it from the Technet Script Libary: Block iOS devices with Block-IOS-Devices.ps1 Script

image

Rapid growth in transaction logs, CPU use, and memory consumption in Exchange Server 2010, Exchange 2013 and Office 365 when a user syncs a mailbox by using an iOS 6.1-based or iOS 6.1.1-based device

Yesterday i was at customer who had problem dat transaction logs Rapid growl.
It was on a Exchange 2013 Server with CU5.

For Exchange 2010 there was released a KB http://support.microsoft.com/kb/2814847

This is still a issue for Exchange 2010, Exchange 2013 and Office 365.

Microsoft has al ready blocked IOS 6.1 – 6.1.1 devices at Office 365.

Server was OK…. But When i run Get-EASDeviceReport.ps1 i saw some IOS 6.1 devices. Sow we going to block this IOS versions.

Powershell:
New-ActiveSyncDeviceAccessRule -querystring “iOS 6.1 10B141” -characteristic DeviceOS -accesslevel block
New-ActiveSyncDeviceAccessRule -querystring “iOS 6.1 10B142” -characteristic DeviceOS -accesslevel block
New-ActiveSyncDeviceAccessRule -querystring “iOS 6.1 10B143” -characteristic DeviceOS -accesslevel block
New-ActiveSyncDeviceAccessRule -querystring “iOS 6.1 10B144” -characteristic DeviceOS -accesslevel block
New-ActiveSyncDeviceAccessRule -querystring “iOS 6.1.1 10B145” -characteristic DeviceOS -accesslevel block

Fixing User Home Folder rights with Powershell

When i visit a lot of company’s i see many times that the home folder directory have not the right rights. To fix this that’s al lot of work. Sow it time to write about it. I wrote a nice powershell script to fix it and save me and you a lot of time.

Three steps :

1.  Set Share Permissions for the Everyone group to Full Control.

2.  Use the following settings for NTFS Permissions (http://support.microsoft.com/kb/274443):

  • CREATOR OWNER – Full Control (Apply onto: Subfolders and Files Only)
  • System – Full Control (Apply onto: This Folder, Subfolders and Files)
  • Domain Admins – Full Control (Apply onto: This Folder, Subfolders and Files)
  • Everyone – Create Folder/Append Data (Apply onto: This Folder Only)
  • Everyone – List Folder/Read Data (Apply onto: This Folder Only)
  • Everyone – Read Attributes (Apply onto: This Folder Only)
  • Everyone – Traverse Folder/Execute File (Apply onto: This Folder Only)

Pay attention when configuring the home directory or folder redirection policies.  If you enable the setting to give the user exclusive access to the folder, you will override the inherited permissions and need to reset the ACL Winking smile

3. Run the Following script Repair-HomeFolderPermissions.ps1

________________________________________________________________________

#########################################################################
# Script: Repair-HomeFolderPermissions.ps1
# Author: Ward Vissers    http://www.wardvissers.nl
# Date: 20/11/2014
# Keywords:
# Comments:
# Pre-Requisites: Full Control over destination folder.
#
# +————+—–+———————————————————+
# |       Date | Usr | Description                                             |
# +————+—–+———————————————————+
# | 20/11/2014 | WV  | Initial Script                                          |
# |            |     |                                                         |
# +————+—–+———————————————————+
#
#   1. http://support.microsoft.com/kb/274443
#
#   2. Set Share Permissions for the Everyone group to Full Control.
#  
#   3.  Use the following settings for NTFS Permissions:
#
#   CREATOR OWNER – Full Control (Apply onto: Subfolders and Files Only)
#   System – Full Control (Apply onto: This Folder, Subfolders and Files)
#   Domain Admins – Full Control (Apply onto: This Folder, Subfolders and Files)
#   Everyone – Create Folder/Append Data (Apply onto: This Folder Only)
#   Everyone – List Folder/Read Data (Apply onto: This Folder Only)
#   Everyone – Read Attributes (Apply onto: This Folder Only)
#   Everyone – Traverse Folder/Execute File (Apply onto: This Folder Only)
#
#
# DISCLAIMER
# ==========
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
# RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#############################################################################

$dirpath = “D:\Data\user”

# get list of all child directories, in the current directory
$directories = dir $dirpath | where {$_.PsIsContainer}

# iterate over the directories
foreach ($dir in $directories)
{
# echo out what the full directory is that we’re working on now
write-host Working on $dir.fullname using $dir.name

# setup the inheritance and propagation as we want it
$inheritance = [system.security.accesscontrol.InheritanceFlags]“ContainerInherit, ObjectInherit”
$propagation = [system.security.accesscontrol.PropagationFlags]“None”
$allowdeny=[System.Security.AccessControl.AccessControlType]::Allow

# get the existing ACLs for the directory
$acl = get-acl $dir.fullname

# add our user (with the same name as the directory) to have modify perms
$aclrule = new-object System.Security.AccessControl.FileSystemAccessRule($dir.name, “FullControl”, $inheritance, $propagation, “$allowdeny”)

# check if given user is Valid
$sid = $aclrule.IdentityReference.Translate([System.Security.Principal.securityidentifier])

# add the ACL to the ACL rules
$acl.AddAccessRule($aclrule)

# set the acls
set-acl -aclobject $acl -path $dir.fullname
}

__________________________________________________________________________

Microsoft Virtual Machine Converter 3.0 Released

New Features in Microsoft Virtual Machine Converter 3.0
The 3.0 release of MVMC adds the ability to convert a physical computer running Windows Server 2008 or above server operating systems or Windows Vista or above client operating systems to a virtual machine running on Hyper-V host.

Standard stuff is:

  • Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Microsoft Azure.
  • Provides native Windows PowerShell capability that enables scripting and integration into IT automation workflows.
    Note The command-line interface (CLI) in MVMC 1.0 has been replaced by Windows PowerShell in MVMC 2.0.
  • Supports conversion and provisioning of Linux-based guest operating systems from VMware hosts to Hyper-V hosts.
  • Supports conversion of offline virtual machines.
  • Supports the new virtual hard disk format (VHDX) when converting and provisioning in Hyper-V in Windows Server® 2012 R2 and Windows Server 2012.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.1, and VMware vSphere 4.1 hosts Hyper-V virtual machines.
  • Supports Windows Server® 2012 R2, Windows Server® 2012, and Windows® 8 as guest operating systems that you can select for conversion.
  • Converts and deploys virtual machines from VMware hosts to Hyper-V hosts on any of the following operating systems:
  • Windows Server® 2012 R2
  • Windows Server® 2012
  • Windows Server 2008 R2 SP1
  • Converts VMware virtual machines, virtual disks, and configurations for memory, virtual processor, and other virtual computing resources from the source to Hyper-V.
  • Adds virtual network interface cards (NICs) to the converted virtual machine on Hyper-V.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.0, and VMware vSphere 4.1 hosts to Hyper-V.
  • Has a wizard-driven GUI, which simplifies performing virtual machine conversions.
  • Uninstalls VMware Tools before online conversion (online only) to provide a clean way to migrate VMware-based virtual machines to Hyper-V.
    Important MVMC takes a snapshot of the virtual machine that you are converting before you uninstall VMware Tools, and then shuts down the source machine to preserve state during conversion. The virtual machine is restored to its previous state after the source disks that are attached to the virtual machine are successfully copied to the machine where the conversion process is run. At that point, the source machine in VMware can be turned on, if required.
    Important MVMC does not uninstall VMware Tools in an offline conversion. Instead, it disables VMware services, drivers, and programs only for Windows Server guest operating systems. For file conversions with Linux guest operating systems, VMware Tools are not disabled or uninstalled. We highly recommend that you manually uninstall VMware Tools when you convert an offline virtual machine.
  • Supports Windows Server and Linux guest operating system conversion. For more details, see the section “Supported Configurations for Virtual Machine Conversion” in this guide.
  • Includes Windows PowerShell capability for offline conversions of VMware-based virtual hard disks (VMDK) to a Hyper-V–based virtual hard disk file format (.vhd file).
    Note The offline disk conversion does not include driver fixes.

Download

Source

Microsoft Exchange 2013 Public Folder Directory Sync Support Scripts

Microsoft has recently updated the Microsoft Exchange 2013 Public Folders Directory Sync Support Scripts to version 15.00.1017.003.

Brief Description
Scripts to enable creation of public folder related objects in the O365 Active Directory and synchronization of public folder related Active Directory objects between on-premise and O365 directories.

Overview
Use this scripts if you need to do one of the following – – Initial creation of mail enabled public folder objects in the destination Active Directory for public folder migration from Exchange 2007 or 2010 to Exchange 2013 – Synchronization of mail enabled public folder objects from cloud to on-premise Active Directory – Synchronization of mail enabled public folder objects from on-premise to cloud Active Directory – Synchronization of public folder mailbox objects from cloud to on-premise Active Directory

Hyper-V Configuration Toolkit

Mark Scholman has been working on a new script project to configure Hyper-V hosts.

This tool allows you to configure hyper-v hosts. It is using the converged network setup as described in this blog post. What it does is the following:

  • Rename Adapters
  • Create Teams
  • Create Tnics
  • Set Network Config (MGT,LM,CSV)
  • Join Server to the Domain
  • Create a server-local administrators group in the domain
  • Allows you to create a new or join an existing cluster
  • Configure Cluster network names
  • Configure Cluster Live migration subnet

On the to-do list is the following and will be added with upcoming releases:

  • Configure Storage network (iSCSI & SMB3)
  • Use of different topologies for converged networking as described here
  • Using Jea or PSCustomSessionConfiguration for deployment of Hyper-V hosts

How to use the tool:

On the newly provisioned Hyper-V Server start the Deploy-HyperVHost.ps1. On the Configure Nic’s tab select the adapters you want to use for Management (MGT / LM / CSV) and click “Set Management Adapters”:

Notice the list box will refresh with the new names for the adapters. Next select the adapters you want to use for VM Network and click “Set VMNet Adapters”

Finally configure Storage adapters:

Result is that we have configured all adapters now with a logical name we can use in the rest of the deployment:

Side note: I used 2 adapters for each team configuration, but you can use for example 3 adapters or 4 adapters for Management and 2 or 3 for the VMNet. The script is intelligent on using the logical names and reusing them in the Team setup.

Next part is to setup the host parameters and start the deployment of the host. Go to the tab “Configure host”

We need to specify the next parameters:
Host Name
The name of the server.
Domain Name
The domain to join the server to.
Management IP
The ip address for the management interface.
Management VLAN
If you’re using vlans specify the vlan id. Untagged is vlan 1.
Management gateway
The gateway for the management network.
Live Migration IP
The ip address for live migration (LM) communication
Live Migration VLAN
The VLAN id used for the LM network.
CSV IP
Cluster IP Address.
CSV VLAN
Cluster VLAN ID.
Primary DNS
The Primary DNS server to use for management network.
Secondary DNS (optional)
If applicable: The second DNS server for the management network.
Domain Controller Name
The Name of a Domain Controller. (needs remote Powershell enabled)
Local Admin Group Name (optional)
Name of a Domain group what is configured to be Local Administrator on the host
Group OU Path (optional)
The OU DN where the group needs to be created.
LAB: Build HyperV on HyperV

Used for demo purposes when you want to run this tool in a Hyper-V Virtual Machine. (Team settings and Hyper-V Role modification in the VM)

Next click on the “Deploy Host” button and enter domain admin credentials

Now wait until the server automatically reboots. While server is rebooting you can verify that the computer is in the domain and the local group is created:

When the server is rebooted login as the domain admin and start the Deployment tool again.

The last tab is for Configure the Cluster. You can create a new cluster:

Or add the node to an existing cluster:

Download the script http://gallery.technet.microsoft.com/Hyper-V-Deployment-Tool-419679d3

Translate »