Posts tagged: Microsoft

Microsoft KMS licensing quick tips

From the cmd line run the following.

View Current Counts
cscript C:\windows\system32\slmgr.vbs /dlv all

Uninstall KMS
slmgr /upk

Convert client from MAK to KMS
slmgr /upk
slmgr /ipk <KMS Client Key>

Set KMS Server
slmgr /skms servername.fqdn.here

Dynamic lists and mail migration in Exchange 2007

Just a couple of quick tips which have helped me recently. Unlike Exchange 2003, creating dynamic lists based on AD attributes has become a little more complicated. Granted there is a built in wizard which works for some basic queries but doesn’t have the fine grained control that I needed.

For example to create a dynamic mailing list which will contain all users who have been marked as being in say the Perth office. This refers to the office field which you can set through AD users and computers or via the Exchange console. To create this load your Exchange shell as admin and run the following.

New-DynamicDistributionGroup -Name ‘Perth Staff’ -OrganizationalUnit yourdomain.com.au/MyBusiness/Users/Staff’ -Alias ‘PerthStaff’ -RecipientFilter { (Office -eq ‘Perth’) }

To break it down you are limiting your search scope with the –OrganizationalUnit which improves performance by not having to search the entire tree when you don’t need to. The -Alias is self explanitory and the –RecipientFilter is simply what you are filtering on and in this case its the Office field and the fact it equals Perth.

This is just a simple dynamic list, check out the Microsoft page here http://technet.microsoft.com/en-us/library/aa996561(EXCHG.80).aspx for more advanced examples and options.

 

Mail migration between mailboxes has always been a bit of a pain. In the past Exmerge was the tool of choice however this is no longer needed come Exchange 2007. This could be useful for archiving mail out from one mailbox to another on different storage (Exchange 2010 has archiving built in which is much better) or you can even go to PST for maybe permanent archival to tape or optical media.

Make sure you have the latest service and you can simply run the export-mailbox tool via the Exchange shell.

export-mailbox –identity source.mailbox -includefolders "\Inbox" -MaxThreads 4 –TargetMailbox destination.mailbox -TargetFolder Archive

You can filter this further if needed but it’s relatively straight forward and will pull all the mail you specify out and put directly into the target mailbox without having to go to PST in between or use Outlook.

Good luck and have fun.

Howto generate Exchange 2007 certificates

By default Exchange uses a self signed certificate. If you are allowing external access its best practice to use a CA signed certificate either by your own internal CA or an external 3rd party trusted CA.

So to generate yourself a signing request open an Exchange shell as admin and run the following.

New-ExchangeCertificate -GenerateRequest -SubjectName “cn=remote.domain.com.au” -IncludeAcceptedDomains -DomainName additional.domain.com.au,internal.domain.com.au -IncludeAutoDiscover -Path c:\mycert.req

To break this command down, –GenerateRequest and –SubjectName are pretty straight forward and define the primary subject for the certificate. –IncludeAcceptedDomains tells it to add any other accepted domains to the certificate, useful if you accept mail for multiple domains. –DomainName is for additional domains you wish to specify, sometimes you may have a split internal and external domain so this would be used in that instance. And –IncludeAutoDiscover is one that gets forgotten but adds the autodiscover domain name to the certificate. If you do not include your autodiscover domain or the domain of the server it is on then you may get certificate errors when launching Outlook.

So now you have your certificate request, either plug it into your internal CA to get signed or pass this on to a 3rd party to get it signed by them. You should get a certificate file back and once you do simply run the following from your admin Exchange shell.

Import-ExchangeCertificate -Path C:\certnew.cer

Next step is to tell Exchange to use the certificate. Upon importing you should get the thumbprint of the certificate. With this you can enable the certificate by running the following and substituting the thumbprint.

Enable-ExchangeCertificate -Thumbprint THUMBPRINT -Services SMTP,POP,IMAP,IIS

One gotcha that I have seen a couple of times now is that the IIS/SMTP certs don’t stick. This presents itself after a reboot when suddenly its reverted back to the original certificate. In these cases I have found it necessary to re-run the command with just IIS and SMTP like below.

Enable-ExchangeCertificate -Thumbprint THUMBPRINT -Services SMTP,IIS

And that should be it, your certificate will take affect immediately and you should be good to go.

One last note, its worth keeping in mind that your paths may vary in terms of the OWA, OAB and Autodiscover paths and you should check to ensure that these are all correct. Domain name mismatch is pretty common which can create error messages which have the potential confuse users.

Bypass SBS 2008 Memory Requirements

For anyone looking to work with SBS 2008 in a dev environment but unable to provision VM’s with 4gb of ram you may be interested in this little reg key..

I see lots of posts around the net asking for ways to bypass the memory requirements but not many with answers. I stumbled upon this one recently which has finally allowed me to get some SBS 2008 dev work done.

When installing SBS 2008 once you are past the initial install and are up to the first page of the configuration if you hit shift+F10 to bring up a command prompt then launch regedit you can edit the following key to allow the install to continue even though your machine doesn’t meet the requirements.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SmallBusinessServer\Setup]
“SkipReq”=”RamRequirement”

This may also be useful for those of you running on the bare minimum but with an onboard videocard which is consuming some of the ram pushing your usable ram down.

Hope this helps a few people :)