Archive for the ‘Uncategorized’ Category

Website and other services monitoring…

Tuesday, March 1st, 2011

There is a great tool to get your public services monitored… It’s called mon.itor.us… It gives you alot of free features but you can still pay and use some more sofisticated…

Check this out:

SBS 2011 – Import PST in Exhange 2011

Tuesday, January 11th, 2011

To enable import and export of mailboxes on SBS 2011 you need to:

Go to Windows SBS console and create a security group – that shuld be universal (by default) for example: Mailbox management

Add administrator / admin account to the group

Then you need to enable “import / export” feature on members of this group. To do that you need to open Exchange Management Shell (Powershell with Exchange 2010 modules) as administrator and write:

New-ManagementRoleAssignment -Name “Import Export Mailbox Admins” -SecurityGroup “Mailbox management” -Role “Mailbox Import Export”

After that you can folow my article to import or export mailboxes

IPv6 is comming… Get some knowledge and get certified…

Sunday, November 21st, 2010

IPv4 address space is comming to an end… For all you there is an easy solution to get some knowledge and do some practice using IPv6 – the new generation of IP on http://ipv6.he.net/certification/

It is realy hard to move on in technology if you do not know what exercises to do and what to try… Hurrican Electric certification process will guide you through some basic and more advanced IPv6 tasks… Just go ahead and try… It’s free!

IPv6 Certification Badge for manojlovicl

Running Exchange 2010 on public IPv4 and IPv6…

Sunday, November 21st, 2010

Yey! Today I have put a testing Exchange 2010 online to make my “exam” on Hurricane Electric IPv6 certification program… Well what I did is to put two extra DNS records to my DNS one with IPv4 “A” record pointing mail.ipv6.testingdomain.com to some IPv4 address and another “AAAA” record pointing mail.ipv6.testingdomain.com to an IPv6 address where my Exchange 2010 is listening…
Then I have added an MX record for domain ipv6.testingdomain.com to point on mail.ipv6.testingdomain.com.
Great! Everything works? NOT! :)

If you want your Exchange 2010 to receive mail from IPv6 mail servers you need to configure your receive (and send) connector to listen on IPv6 address of your server…

 Let’s configure Internet receive connector that is listening on fqdn in my example mail.ipv6.testingdomain.com First you need to add IPv6 address on which your server is listening on…

 

By default your server will accept only traffic from IPv4 world so we need to add IPv6 range…

 

 Let’s do it…

 

 Here goes the tricky part… If you think about an IPv6 address you always thing about 8×16 bit separated by colon… And logical solution would be to insert beging of range 0000:0000:0000:0000:0000:0000:0000:0000 and the same for FFFF:FFFF:FFFF… eight times… But no… You need to replace last two segments of 16 bits with 32-bit IPv4 represntation… So you need to insert:

Windows Phone 7 – Active Sync issue… 80072F06 when using self-signed certificate

Friday, November 19th, 2010

I am a proud owner of a brand new Windows phone 7 (running on Samsung Omnia…)! :) As soon as I did unpacked my phone I wanted to sync it with my Exchange server… I am using a self-signed certificate and first I had to install the certificate… Ok, you have two options here… You can go to https://mail.domain.com/certsrv and install a certificate directly from your certification authority or somehow put it on your phone by sending it to your email that you can access using web browser on Windows Phone 7…

Ok… To this step everything fine… But now I want to sync and I receive an error saying…

There is a problem with the certificate for mail.domain.com. Contact a support person or your service provider. Error Code: 80072F06

Hmm.. I tried to open my Outlook web access using web browser on my Windows Phone 7 and it worked without any problem – no certificate error warning… So I was realy confused now… My certificate is installed and I do not get any error what the hell is wrong with Active Sync now?

Well… You need to “reboot” your phone and everyting will start to work :)

So press the power button and hold it for a few seconds until you receive a “Goodbye” on phone screen… After turning it back I tried to sync again and TADA! Everything is working now!

Peace and love,
Luka

Sinergija 2010 q&a 1 – RDS A to Z

Thursday, November 18th, 2010

On my Windows server 2008 R2 – Remote desktop services from A to Z there were two questions…

How to setup Single Sign-on so users do not have to reauthenticate to get to remote desktop resources?

Here you have a screenshot of group policy that controls that:

More about single sign-on you can find on:
http://blogs.msdn.com/b/rds/archive/2007/04/19/how-to-enable-single-sign-on-for-my-terminal-server-connections.aspx

The second question was about AERO on RDS server… Yes, you can do that by folowing this tutorial:
http://blogs.msdn.com/b/rds/archive/2009/06/23/aero-glass-remoting-in-windows-server-2008-r2.aspx

SBS 2008 / Exchange 2007 remote.company.com and TLS…

Sunday, September 5th, 2010

Everyone that has ever installed SBS 2008 has encountered the wizard that create certificate and remote workplace – by default called remote.company.com (yes, you can chose other prefixes but let say that I like remote becouse it is easy to remember for my users…).
SBS wizards generates a certificate for this hostname and uses it for all services (Outlook web access, Active Sync stuff and also for SMTP receive and send connectors…).
The problem is when you want to rename your SMTP receive and send connectors to match the records in DNS. It is a best practice to have same SMTP greetings as the records in DNS so for example if you have a domain company.com and you have an host record A called mail.company.com and MX record pointed to mail.company.com it is correct and I suggest you to folow this rule to have SMTP greeting or fqdn for SMTP connectors to match mail.company.com.

You can rename your connectors however you want by using Exchange management console but you will lose functionality of TLS in SMTP traffic – becouse the certificate remote.company.com does not match fqdn or smtp greeting of a connector that advertise mail.company.com. You will also get an error in Event log saying:

Microsoft Exchange could not find a certificate that contains the domain name mail.company.com in the personal store on the local computer…

 Ok, what can we do now?

Well turn on Exchange Management Shell – that is Powershell with modules for Exchange 2007 management – you can find it in star menu… And first of all we want to see current Exchange certificates that are enabled for Exchange services by using cmdlet:

[PS] C:\Windows\System32>Get-ExchangeCertificate 

and you wil receive something like this:

Thumbprint                                Services   Subject
———-                                ——–   ——-
45EEEB44DF4BFE2EB1B7A7592EA1DF5BF93F44B4  IP.WS      CN=remote.company.com
42F146B12BEF918A6A8FC730F5AA87AC4ACB1CEB  IP..S      CN=remote.company.com
817F1311CB72FB70F962EC0FAD2D8FA857F114A4  ….S      CN=sbssrv01.company.local
4BAAC7906689AFF0129767CF492AAE058B5DF494  ….S      CN=Sites
8F1D9C5FEB6EF0C39F25175AFBDEA54FE9668EF9  …..      CN=xxxxxx-xxxxxxxx-CA
8E4F33523325500F38ECF41FCDFBBE684AFC6145  …..      CN=WMSvc-WIN-K7KGUV5MQ40
 
Now we should create a new certificate that we will use for SMTP connectors by using cmdlet:
 
New-ExchangeCertificate -domainname mail.company.com -PrivateKeyExportable:1
 
Warning! When you are asked if you want to overwrite certificates chose No!
  
Confirm
Overwrite existing default SMTP certificate,
’45EEEB44DF4BFE2EB1B7A7592EA1DF5BF93F44B4′ (expires 14.1.2012 22:37:04), with
certificate ’59D62E7850EE4093AFF1EC73E2623D52058C2B35′ (expires 27.1.2015
17:09:02)?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is “Y”): N
 
so we get output:
Thumbprint                                Services   Subject
———-                                ——–   ——-
59D62E7850EE4093AFF1EC73E2623D52058C2B35  …..      CN=mail.company.com
 
Great!  If we want to be shure that everything is working correctly and that Exchange SMTP service is using our new certificate we can use cmdlet:

[PS] C:\Windows\System32>Get-ExchangeCertificate 

[PS] C:\Windows\System32>

Thumbprint                                Services   Subject
———-                                ——–   ——-
59D62E7850EE4093AFF1EC73E2623D52058C2B35  ….S      CN=mail.company.com
45EEEB44DF4BFE2EB1B7A7592EA1DF5BF93F44B4  IP.WS      CN=remote.company.com
42F146B12BEF918A6A8FC730F5AA87AC4ACB1CEB  IP..S      CN=remote.company.com
817F1311CB72FB70F962EC0FAD2D8FA857F114A4  ….S      CN=sbssrv01.company.local
4BAAC7906689AFF0129767CF492AAE058B5DF494  ….S      CN=Sites
8F1D9C5FEB6EF0C39F25175AFBDEA54FE9668EF9  …..      CN=xxxxxxxxxxx-xxxxxxxxxxxx01-CA
8E4F33523325500F38ECF41FCDFBBE684AFC6145  …..      CN=WMSvc-WIN-K7KGUV5MQ40
We can now see that SMTP connectors are using all certificates (S defnies SMTP service).
Ok… How can you test that TLS works?
You can try it by using telnet client and connect to your server:
telnet mail.company.com 25
 
Exchange should respond something like:
220 mail.company.com Microsoft ESMTP MAIL Service ready at Wed, 27 Jan 2010 17:
12:09 +0100
 
then you can write:
helo test.blablabla.com
 
220 mail.company.com Microsoft ESMTP MAIL Service ready at Wed, 27 Jan 2010 17:
13:07 +0100
helo test.blablabla.si
250 mail.xxxxxxxxxxxxxxxx.si Hello [xxx.xxx.xxxx.xxx]
after that enter command:
starttls

 

server should respond:
220 2.0.0 SMTP server ready
 
Server ready? Super! :)
 
PS.
If you did miss something you will receive error from server saying:
 
starttls
500 5.3.3 Unrecognized command
 
If you get that? Read this tutorial again :)
PS. PS. You do not need to restart anything when you apply this commands… No need for restarting Exchange services…
Special thanks to Saso Erdeljanov for some hints about this issue…

Powershell with task scheduler… This is the way to automate your IT! – single machine – p1

Thursday, June 17th, 2010

Well using Powershell interactively is something that we see all the time when Microsoft want to show us what and how we can automate our daily taks… But administrators want to know how can we schedule our brand new fantastic powershell scripts…

Ok, this guide will tell you how to do it… How to run separate commands from powershell and how to run a complete scripts so you can realy start to automate your stuff by using Powershell…

Example: I would like to schedule script that lists all processes running on a specific server
1. on my server I will first create a txt file (extension should be renamed to ps1 – as we are writing powershell script) called listproces.ps1
2. into the file I will put my scipt:

get-process | out-file c:\processes.txt

3. start task scheduler on server and Create Basic Task
Name: Powershell list processes
Triger: Chose when you want your script to run
Action: Start a program
Program / script: powershell.exe
Add arguments: -ExecutionPolicy RemoteSigned –Noninteractive –Noprofile –File C:\listproces.ps1

Important! You should set your task to run whether user is logged into a session or not… To do that do the folowing:


Manage Hyper-V Virtual machines using WMI and VBS scripts

Monday, May 24th, 2010

Today I was working on how to manage Hyper-V virtual machines using WMI.
This VBS scripts can be modified to suit your needs…
Each script takes one argument “machine name”:

listvm.vbs – display all virtual machines on Hyper-V - this script will create a TXT file (you should edit path and filename inside the script) with all virtual machines that are on Hyper-V host. It will print names of the machines and current state (Running, Off, Saved)

sortvm.vbs - this script alphabeticaly sorts list of virtual machines (you should edit path and filename inside the script)

startvm.vbs – usage: startvm.vbs “Name of your virtual machine” – this script will start the virtual machine

stopvm.vbs – usage: stopvm.vbs “Name of your virtual machine” – this script will turn of (dirty!) your virtual machine

shutdownvm.vbs – usage: shutdownvm.vbs “Name of your virtual machine” – this script will shut down your virtual machine if it is Integration Services aware – it will signal/notify guest operating system to initialize shutdown procedure. It works only on machines that support Hyper-V Integration services.

hardresetvm.vbs – usage: hardresertvm.vbs “Name of your virtual machine” – this script will reset (dirty!) your virtual machine

savestatevm.vbs – usage: savestatevm.vbs “Name of your virtual machine” – this script will save and turn off your virtual machine

I have compiled this scripts using resources regarding Hyper-V and WMI
http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx
http://blogs.msdn.com/virtual_pc_guy/

Enjoy, WMI power!

SBS 2008 (AD server) virtualized on Hyper-V – what about time synchronization?

Sunday, April 11th, 2010

Hi!

This blog post is about time synchronization with Hyper-V Integration services when you virtualize SBS 2008 server. You should never leave Hyper-V host to “force” time on servers that you virtualize and that are Active Directory servers (at least not PDC that is the root time server for a domain).

By default Hyper-V enables all Integration services components on your virtual machine but it’s better to configure your virtual machine in my case SBS 2008 server that is Active Directory server too with external NTP time source. Becouse if something goes wrong or you have wrong time on your Hyper-V host you can get in troubles when Hyper-V host will push this “bad time” into your virtual machine.

You should also know that by default on boot virtual machine get’s time from your Hyper-V host becouse of that I have writen two articles. First is about configuring your Hyper-V host that is not joined into a domain (so it does not get the right time from AD server) so it can receive the right time from NTP time source.
And the second one about setting correct values on SBS 2008 server and disabling Hyper-V integration services feature Time Synchronization.

Hope it helps…

Time sync in SBS 2008 virtualized on Hyper – part 1.docx
Time sync in SBS 2008 virtualized on Hyper – part 1.pdf

Time sync in SBS 2008 virtualized on Hyper – part 2.docx
Time sync in SBS 2008 virtualized on Hyper – part 2.pdf

Luka