PowerShell: Identifying ActiveSync Devices with Get-ActiveSyncDevice for Exchange 2010

Tags

, , ,

PowerShell

Having recently started working with a new client and sorting out some Exchange 2010 problems, I wanted to identify what sort of mobile devices they had and more specifically what version of iOS any of their iPhones/iPads were running due to the issues that iOS 6.1 caused (see link iOS 6.1: Excess Exchange activity after accepting an exception to recurring calendar event)

To do this i used the command:

Get-ActiveSyncDevice | select devicetype, deviceos, deviceuseragent

Get-ActiveSyncDevice | select devicetype, deviceos, deviceuseragentTo narrow the search down further to see only the devices running iOS 6.1 i used the following command:

Get-ActiveSyncDevice | where {$_.deviceos -match “iOS 6.1 “} | select devicetype, deviceos, deviceuseragent

Get-ActiveSyncDevice | where {$_.deviceos -match "iOS 6.1 "} | select userdisplayname,deviceosThen finally to determine who owns the iOS 6.1 devices i used the following command:

Get-ActiveSyncDevice | where {$_.deviceos -match “iOS 6.1 10B14*”} | select userdisplayname,deviceos

A list of properties that can be obtained from the Get-ActiveSyncDevice PowerShell command can be found below:

RunspaceId
FriendlyName
DeviceId
DeviceImei
DeviceMobileOperator
DeviceOS
DeviceOSLanguage
DeviceTelephoneNumber
DeviceType
DeviceUserAgent
DeviceModel
FirstSyncTime
UserDisplayName
DeviceAccessState
DeviceAccessStateReason
DeviceAccessControlRule
DeviceActiveSyncVersion
AdminDisplayName
ExchangeVersion
Name
DistinguishedName
Identity
Guid
ObjectCategory
ObjectClass
WhenChanged
WhenCreated
WhenChangedUTC
WhenCreatedUTC
OrganizationId
OriginatingServer
IsValid

Related Posts:

1. PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 1

2. PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 2

3. How to install Exchange 2010 (SP3) on Windows Server 2012

ADUC: Object username contains other objects. Are you sure you want to delete object and all objects it contains?

Tags

,

While deleting a few disabled user accounts today I came across a warning message I’ve not encountered before.

Confirm Subree Deletion. Object conatins other objects. Are you sure you want to delete object and all of the objects it contains?

I was only deleting a user account and had already deleted a number of them so what was different about this one?

In ADUC, I selected View – Users, Contacts, Groups and Computers as containers.

ADUC - User, Contacts, Groups and Computers as containers.

I was then able to drill down into the user and see what other objects they contained. It turns out that there was an iPhone listed in the ExchangeActiveSyncDevices for the users.

ExchangeActiveSyncDevices

So, knowing what i was deleting, it was safe to proceed.

PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 2

Tags

, , ,

PowerShell

In Part 1 we looked at the Get-ADUser command, and used it to create a list of all users and display their homedrive, homedirectory and scriptpath.

In this post we’ll look at refining the results a little.

We’ll look at sorting the results, only returning results for user accounts that have a login script, and export them to CSV, which is much more useful than exporting the results to a text file.

So, the final command we ended Part 1 with was the following and it returned a text file to us with a list of all users as seen in the image below (I’ve added a few more parameters to users in this example.

Try Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | ft Name, scriptpath, homedrive, homedirectory > C:\temp\users.txt

export to text from get-aduser

In this next example, I’ve added the where cmdlet to only return results that contain bat in the script path.

Try Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | where {$_.scriptpath – like “*bat*”} | ft Name, scriptpath, homedrive, homedirectory

get-aduser where scriptpath -like

Now for some reason we may want to sort the list by scriptpath, so we add in the sort-object cmdlet.

Try, Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | where {$_.scriptpath – like “*bat*”} | sort-object scriptpath | ft Name, scriptpath, homedrive, homedirectory

get-aduser sort-object

And finally, lets export the list to CSV so we can work on it in Excel. In this example we substitute, format table (ft) for select-object.

Try, Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | where {$_.scriptpath – like “*bat*”} | sort-object scriptpath | select-object Name, scriptpath, homedrive, homedirectory | Export-csv -path c:\temp\user-login-script-20130429.csv

get-aduser export to csv

export to csv from get-aduser

Below are some links to invaluable Microsoft Technet references.

Get-ADUser can be found here: http://technet.microsoft.com/en-us/library/ee617241.aspx

Where cmdlet can be found here: http://technet.microsoft.com/en-us/library/ee177028.aspx

Sort-Object cmdlet can be found here: http://technet.microsoft.com/en-us/library/ee176968.aspx

Select-Object cmdlet can be found here: http://technet.microsoft.com/en-us/library/ee176955.aspx

Export-csv cmdlet can be found here: http://technet.microsoft.com/en-us/library/ee176825.aspx

Related Posts:

1. PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 1

2. Introducing Windows Server 2012 – Free ebook

3. Where is Windows Server 2012 Sysprep?

4. Recommended Small Business Scenarios with Windows Server 2012 Guide Available for Download

PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 1

Tags

, , ,

PowerShellHaving recently taken on a new client with a system that had been neglected somewhat I wanted to find out about the state of their user accounts.

I’d already looked at a couple of users at random and noticed some users had logon scripts while others didn’t, and some users had home drives while others didn’t.

Although the organisation wasn’t large, they had more than enough user accounts that I didn’t want to manually check every one. So i turned to PowerShell’s Get-ADUser command.

I’m not a PowerShell expert, and haven’t really given it much time until recently. But since using Windows Server 2012 I’ve found myself using it more and more, and I’m starting to like it!

Right, on with a quick tutorial of Get-ADUser.The following screenshots are taken from my Windows Server 2012 demo lab.

Get-ADUser on it’s own won’t give you any information. You need to give it a filter.Get-ADUserTry Get-ADUser -filter *.

This will return all the users in the domain. But as you can see from the format it isn’t really that useful to us at the moment as it isn’t showing any logon script information or home drives.Get-ADUser -filter *Next lets single out an individual user and see what information we can see.

Try Get-ADuser username -properties *.

This will show you all the properties associated with the user. Get-ADUser -properties * Now we can see a list of all the properties associated with a user account, we can start to format the Get-ADUser command to just show us the information we require.

Try Get-ADUser username Joe.bloggs -properties scriptpath, homedrive, homedirectory

Get-ADUser properties scriptpath homedrive homedirectory

We can now see the information we want for a single user, but a table of users would be useful…

Try Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | ft Name, scriptpath, homedrive, homedirectory

Get-ADUser properties scriptpath homedrive homedirectory formattable

Now the last step is to output the table to a file so we can use it in our documentation.

Try Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | ft Name, scriptpath, homedrive, homedirectory > C:\temp\users.txt

get-aduser output

By taking a look at the properties of an individual user you can build a table with any combination of user properties you are interested in.

The Microsoft Technet reference can be found here: http://technet.microsoft.com/en-us/library/ee617241.aspx

In Part two of this post we’ll look at Sorting tables and Exporting to CSV and picking out selecting data using parameters.

Related Posts:

1.PowerShell: Get-ADUser to retrieve logon scripts and home directories – Part 2

2. Introducing Windows Server 2012 – Free ebook

3. Where is Windows Server 2012 Sysprep?

4. Recommended Small Business Scenarios with Windows Server 2012 Guide Available for Download

Dell Server Update Utility SUU 7.2.1 released

Tags

,

Dell Server Update Utility

The latest version of Dell Server Update Utility (SUU) has been released. The SUU is an application used to help patch Dell PowerEdge servers. It will compare currently installed drivers and firmware with those available on the DVD.

This is release Q1 2013, and can be downloaded below, and is 7.3GB in size.

Dell Server Update Utility 7.2.1 Q1 2013

To make sure it is compatible with your Dell PowerEdge server I recommend you go to their technical support website, enter your Server’s TAG, and then look in the System Management section for the latest version for your server.

A double layer DVD is required to burn the iso image.

Related Posts:

1. Dell OpenManage Essentials 1.1 released

2. Dell Server Update Utility 7.2 released

3. Dell EqualLogic Configuration Guide (ECG) Version 14.1 release

Where is Windows Server 2012 Sysprep?

Tags

, ,

Windows Server 2012

If you are building a Windows Server 2012 lab for testing and want to remove unique information from the Server so you can replicate it rather than run through the install multiple times use Sysprep.

Since Windows 2008 and 2008 R2 is can be found in %windir%\system32\sysprep.

The interface hasn’t changed in Server 2012.

Windows Server 2012 Sysprep

Related Posts:

1. Introducing Windows Server 2012

2. Free ebook Understanding Hyper-V in Windows Server 2012

How to install Exchange 2010 (SP3) on Windows Server 2012

Tags

, ,

Server 2012 and Exchange 2010Now Microsoft Exchange 2010 SP3 has been released it provides support for Windows Server 2012 as the host operating system. In this blog we’ll run through the installation process.

The demo environment I am using includes a Server 2012 DC and a Server 2012 member server.

As this is a virgin demo environment as part of the installation the Exchange 2010 setup will upgrade the AD Schema, if this is an additional server in a migration scenario then the following won’t be necessary. To upgrade the Schema you have two options.

Option 1: Run the Exchange 2010 SP3 setup command with the PrepareAD and OrganizationName switches on the domain controller.

setup /preparead /organizationName:oxfordsbsguy

Then on the member server follow the instructions below to install Exchange 2010 SP3.

Exchange 2010 setup preparead

Option 2: Install the Remote Server Administration Tools (RSAT) onto the member server you are installing Exchange onto so that the ldifde.exe is in the correct location that the Exchange setup expects it to be.

Install RSAT AD DS Tools

With that done, on to the install.

1. On a Server 2012 member server, run PowerShell as Administrator.

Run Powershell as Administrator2. Run the following command to install the prerequisite Rolls required for a typical Exchange 2010 installation. (Source: Exchange 2010 Prerequisites)

Rolls required for Exchange 2010

Add the roles required for Exchange 2010

3. Wait for the rolls to be completed. On my test server this took about 4 minutes. The server will restart automatically.

Prerequisite Rolls for Exchange 2010 Progress

4. Download Microsoft Exchange 2010 SP3, Microsoft Office 2010 Filter Pack, and Microsoft Office 2010 Filter Pack SP1

Download Exchange 2010 SP3Download Microsoft Office 2010 Filter PackDownload Microsoft Office 2010 Filter Pack SP1

5. Install the Microsoft Office 2010 Filter Pack.

Install Microsoft Office 2010 Filter Pack

6. Install the Microsoft Office 2010 Filter Pack SP1.

Install Microsoft Office 2010 Filter Pack SP1

7. Run and extract Exchange 2010 SP3.Run Exchange 2010 SP38. Browse to the location you extracted the files to and run Setup.exe, then click on Step 4: Install Microsoft Exchange.

Exchange 2010 SP3 Installation

9. Read the introduction and click Next.

Microsoft Exchange 2010 Introduction

10. Accept the license agreement, and click Next.

Exchange 2010 Installation - License

11. Enable Exchange Error Reporting, and click Next.

Exchange 2010 Installation - Error Reporting

12. Select the Installation Type. In our example we will use the Typical Option, deselect “Automatically install Windows Server roles and features required for Exchange”, click Next.

Exchange 2010 Installation - Installation Type

13. Enter the Organization Name, I’ve changed mine from the default First Organization in the picture below to OxfordSBSGuy.

Exchange 2010 Installation - Specify the Name of this Organization

14. Select the appropriate client settings, click Next.Exchange 2010 Installation - Client Settings

15. Enter an external domain name to use with Exchange, click Next.

Exchange 2010 Installation - Client Access

16. Opt in/out of the Customer Experience Improvement Program, click Next.Exchange 2010 Installation - Customer Experience

17. Resolve any errors, you should have none! Note Organization Prerequisites, this refers to the Schema upgrade highlighted at the start of this article. Click Next.

Exchange 2010 Installation - Readiness check

18. Watch the progress bars (or go and make a cuppa) as Exchange is installed. You can see it if fairly quick at just under 20 minutes. Click Finish to complete the installation.

Exchange 2010 Installation - Completion

19. Run WSUS or Windows update to install any patches that have been release since SP3.

20. Reboot the server to complete the installation.

21. Once restarted log in to the Exchange Management Console and start configuring!

Exchange 2010 Management Console

Related Posts:

1. How to copy incoming or outgoing emails to another mailbox in Exchange 2007 or 2010

2. Microsoft Exchange 2010 SP3 now available

3. Exchange 2010 SP2 Update Rollup 6 Installation Tips

4. How to check which version of Exchange you are using

Dell EqualLogic Configuration Guide (ECG) version 14.1 released

Tags

, ,

Dell Equallogic Configuration Guide

Dell have released version 14.1 of the Dell EqualLogic Configuration Guide.

The guide is designed to help storage administrators build an iSCSI infrastructure for use with a Dell EqualLogic SAN solution.

The most significant changes to the previous version (13.4) is a new chapter on Data Center Bridging.

The guide can be download from here.

Data Center BridgingSource: Dell EqualLogic Configuration Guide 14.1

Related Posts:

1. Dell Server Update Utility SUU 7.2 released

2. Dell iDRAC7 Quick Start Guide now available

Your current security settings do not allow this file to be downloaded

Tags

, ,

Internet Explorer 10

Ok, you’ve just installed Windows Server 2012, and now want to add a few non MS programs to it to make like a little easier so you open IE and browse to a website, click download and you get the error message “Your current security settings do not allow this file to be downloaded“.

IE 10 - Your current security settings do not allow this file to be downloadedEven if you have turned off IE Enhanced Security Configuration, you may still need to enable downloads for the Internet Security Zone.

Click the cog in the top right corner of the browser and select Internet Options.

IE 10 - Internet Options

Select the Security tab, and click the Internet zone.

IE 10 Securiy tab

Click Custom level, and then scroll down to Downloads and select Enable.

IE 10 - Downloads

Click OK and Yes to confirm you want to make the change for the Internet Zone.

IE 10 Your current security settings do not allow this file to be downloaded - confirmation

Click OK to close the Internet Options.

IE 10 - downloads enabled

Downloads are now enabled.

Related Posts:

1. How to disable IE Enhanced Security Configuration in Windows Server 2012 Essentials

2. How to open Internet Explorer 10 in Desktop Mode on Windows 8

How to copy incoming or outgoing emails to another mailbox in Exchange 2007 or 2010

Tags

, , ,

Microsoft Exchange

Occasionally you may have a requirement to copy incoming or outgoing emails for specific users to another mailbox for monitoring or compliance purposes.

To be able to do this you can use an Exchange Transport Rule.

First open the Exchange Management Console, expand Organization Configuration, and select Hub Transport.

Exchange Hub Trasnport

Right click the blank space in the main window and select New Transport Rule.

Exchange - New Transport Rule

Enter the name for your new transport rule, click Next.

Exchange - New Transport Rule Introduction

Select the conditions you want for the rule. Select from people as a condition, and then click the underlined value people to select from which people you want the rule to apply to. Click Add, and then add the email accounts you want to copy emails from. In our example we want to copy emails from the accounts mailbox. Click OK.

Exchange - New Transport Rule Conditions

Click Next.

Now select the Action for the rule, in our scenario we are going to choose Blind carbon copy (Bcc) the message to addresses, once selected, click the underlined addresses value. Click Add, select the user to Bcc the emails to, in our example we are going to Bcc the Administrator email account, click OK, click Next.

Exchange - New Transport Rule Actions

Exchange - New Transport Rule Conditions Select Recipients

If you want to add an exception to the rule you can do so next, in our example we want all emails to be copied so we won’t select an exception. Click Next.

Exchange - New Transport Rule Exceptions

Then on the Configuration Summary page click New to create the rule.

Exchange - New Transport Rule Create Rule

Then on the Completion page click Finish to exit the Wizard.

Exchange - New Transport Rule Complete

You should now see your new Transport Rule in the Exchange Management Console.

Exchange - New Transport Rule Created

Related Articles:

1. How to install Exchange 2010 SP3 on SBS 2011

2. Exchange 2010 SP2 Update Rollup 6 Installation Tips

3. How to find the mailbox sizes in Exchange 2010

Follow

Get every new post delivered to your Inbox.

Join 264 other followers