Tuesday, June 26, 2012
Create new self signed cet for exchange 2010
From exchange powershell:
New-ExchangeCertificate -FriendlyName "SelfSigned Cert" -SubjectName "cn=mail OR remote.domain.com" -DomainName SERVERNAME,SERVERNAME.domain.local,mail OR remote.domain.com,autodiscover.domain.com-PrivateKeyExportable $True
Chose to overwrite the existing cert.
Next enable the cert:
enable-exchangecertificate -donotrequiressl
service type: pop, imap, iis, smtp
enter the thumbprint for the new certificate.
From exchange consoole you can export the cert to be installed on machines.
Tuesday, June 12, 2012
Recover deleted exchange messages/folders
So you have a user who deleted a message or a folder from Exchange 2010 and you can't find it in the dumpster, here is how to setup a recovery database and restore the file.
First restore the database file and logs to a recovery folder. I will be restoring the files to an external drive since we do image based backups hourly, I don't need another backup of my backup file. My external drive is E and my exchange data is located at: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database 2011072209
Make sure you restore the DB and all the log files, basically restore the entire folder!
From here check to see if the database is in a dirty shutdown state so from the powershell run:
eseutil /mh “E:\Recovery\mailbox database 2011072209.edb”
Notice the name of the mailbox DB, yours may be different.
After running the command look for a line that says "State: Dirty Shutdown"
If it reports this we need to check the status of the logs, again from powershell:
eseutil /ml E:\Recovery\E00
(E00 is the prefix to the log files located in the database folder)
The command should respond with "No Damaged log files were found)
If so, we can attempt to brind the database into a clean shutdown: (powershell)
eseutil /r E00 /i /l E:\Recovery\ /d 'E:\Recovery\Mailbox Database 2011072209.edb'
The first section, E:\recovery is location of the log files, the second location is the database name.
The operation will complete reletively quick, however it doesn't mean it fixed the database, so we run a command to check the status:
eseutil /mh 'E:\Recovery\mailbox database 2011072209.edb' | findstr "State:"
If you get good news and it reports "State: Clean Shutdown" great, if not, we repair!
eseutil /p 'E:\Recovery\mailbox database 2011072209.edb'
This baby will take a long time, when you thing its hung, its not! After the process completes, rerun the findstr command again:
eseutil /mh 'E:\Recovery\mailbox database 2011072209.edb' | findstr "State:"
If it reports clean, mount the recovery database!!
First, create a log folder in the subfolder of your recovery folder. Next we run a command to create the database:
New-MailboxDatabase RecoveryDB -Server Servername -Recovery:$true -EdbFilePath 'E:\Recovery\mailbox database 2011072209.edb' -LogFolderPath 'E:\Recovery\rec'
The first section we enter the exchange server name, next the database file name, lastly the location for the logfiles to go. This needs to be an empty folder and created ahead of time.
Next, mount the DB:
Mount-Database RecoveryDB
Next we can list the contents of the database to ensure our users data is there:
Get-MailboxStatistics -Database RecoveryDB
Once the database is mounted, recover the mailbox. For this example the mailbox will be recovered to the original users mailbox. It will appear as a subfolder in the root of his mailbox:
Restore-Mailbox -Identity "User Name" -RecoveryDatabase RecoveryDB -RecoveryMailbox "User Name" -TargetFolder Restore
Now, this is going to restore the users mailbox to the original user, we can however restore it to someone elses mailbox. Also for the user name quotations are not needed if there is no space in the user name. We are restoring the mail to a folder named "Restore" however this folder can be named anything you want.
Wednesday, April 18, 2012
Clean up the SSEE folder on sbs 2008
Microsoft has a fix it to change the logging of Sharepoint.
http://support.microsoft.com/kb/2000544
http://support.microsoft.com/kb/2000544
Clean up the Winsxs folder
The folder grows quickly on Server 2008 and 2008R2, here is how to cleanup the old isntaller files.
On 2008 non R2 servers navigate to c:\windows\system32 and run vsp1cln.exe for sp1 cleanup, on SP2 run compcln.exe from the same location.
To clean up a 2008 R2 box do this:
DISM.exe /online /Cleanup-Image /spsuperseded this can also be used on Windows 7 with SP1.
On 2008 non R2 servers navigate to c:\windows\system32 and run vsp1cln.exe for sp1 cleanup, on SP2 run compcln.exe from the same location.
To clean up a 2008 R2 box do this:
DISM.exe /online /Cleanup-Image /spsuperseded this can also be used on Windows 7 with SP1.
Monday, March 5, 2012
Turn network Discovery on for WIndows 7 GPO
1. In the Group Policy editor on a Win7 or Windows Server 2008 R2 computer, open the GPO that you want to use in the Group Policy Editor.
2. Expand "Computer Configuration", "Windows Settings", "Security Settings", "Windows Firewall with Advanced Security", and then "Windows Firewall with Advanced Security - {policy you have open}".
3 Right-click "Inbound Rules", and then click "New Rule".
4 In the Rule Wizard, on the Rule Type page, select"Predefined", and then select Network Discovery from the list. Click Next.
5 On the Predefined Rules page, ensure that the check box is on each rule that is part of the Network Discovery group, and then click Next.
6 On the Action page, select "Allow the Connection", and then click Finish.
2. Expand "Computer Configuration", "Windows Settings", "Security Settings", "Windows Firewall with Advanced Security", and then "Windows Firewall with Advanced Security - {policy you have open}".
3 Right-click "Inbound Rules", and then click "New Rule".
4 In the Rule Wizard, on the Rule Type page, select"Predefined", and then select Network Discovery from the list. Click Next.
5 On the Predefined Rules page, ensure that the check box is on each rule that is part of the Network Discovery group, and then click Next.
6 On the Action page, select "Allow the Connection", and then click Finish.
Wednesday, December 14, 2011
Limit microsoft##ssee memory use in sbs 2011
Open SQL management studio as and administratror. This is the 2008R2 managemange studio, you must right click and run as admin. Once at the login screen type this in as the server:
\\.\pipe\mssql$microsoft##ssee\sql\query
and connect.
Once connected right click on the sql server DB, the very top thing and select properties.
Select the memory tab and adjust the max server memory.
\\.\pipe\mssql$microsoft##ssee\sql\query
and connect.
Once connected right click on the sql server DB, the very top thing and select properties.
Select the memory tab and adjust the max server memory.
Tuesday, December 13, 2011
GPO for WIndows Screen savers
If its a XP only enviroment you can do this from a 2003 server, if you have 2008 or Windows 7 machines you will either need to do it from a Windows 2008 server, or you will need to install the remote admin tools on a windows 7 machine so you have access to the admx files. The admx files need copied to the Windows 2003 server, they will go to the sysvol\your domain\PolicyDefinitions. The definitions should be under C:\Windows\PolicyDefinitions on your Windows 2008/7 machine.
From a 2008 server you can create your new GPO, the settings to change are:
User Config-Policies-Admin Templates-Control Panel-Personalization.
Enable Screen saver
Force Specific Screen Saver
C:\Windows\system32\scrnsave.scr (this is the one I use as its on all machines)
Password Protect (this locks the machine)
Prevent Changing
Screen saver timeout (in seconds)
If you are on a server 2003 machine with no Windows 7 machines:
User Config-Admin Templates-Control Panel-Display
The settings remain the same.
From a 2008 server you can create your new GPO, the settings to change are:
User Config-Policies-Admin Templates-Control Panel-Personalization.
Enable Screen saver
Force Specific Screen Saver
C:\Windows\system32\scrnsave.scr (this is the one I use as its on all machines)
Password Protect (this locks the machine)
Prevent Changing
Screen saver timeout (in seconds)
If you are on a server 2003 machine with no Windows 7 machines:
User Config-Admin Templates-Control Panel-Display
The settings remain the same.
Subscribe to:
Posts (Atom)