Author Archives: admin

Exchange 2010 Database size

  1. Review the Purge items from the Recoverable Items folder. For details, see Clean Up the Recoverable Items Folder.
  2. Yes ESEutil /D is the command
  3. Safe?  Yes relatively, however, that said
    1. before you ever run any type of utility against an Exchange database you should back it up just in case something goes sideways.
    2. you will need 110% of the EDB size to perform the defrag and
    3. during the time its being defragged ALL users for that database will be unable to connect.
  4. Time, well this depends upon many factors, i.e. CPU, Disk Speed, Memory, other processes etc.  Basically I would plan to spend at least a full day on it.  But whatever you do you need to be patient because it does take time to complete.
  5. Personally I think you would be better off to create a NEW database and use the New-MoveRequest so check out these two articles  http://technet.microsoft.com/en-us/library/bb124495.aspx and http://technet.microsoft.com/en-us/library/bb124797.aspx since these will allow you to keep the system up and running while the data is being moved, however it does require more disk space until the process is done and then you can drop the old DB to gain all the space back.

http://social.technet.microsoft.com

Export to CSV all your Exchange 2007/2010 Email Addresses

If you want to export all your users email addresses to a CSV so you can see who has which alias you can do this with this Power Shell Command


Get-Mailbox -ResultSize Unlimited
|Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses
|Where-Object {$_.PrefixString -ceq “smtp”}
| ForEach-Object {$_.SmtpAddress}}}
| Export-CSV c:\smtp.csv -NoTypeInformation

I have wrapped it here so just paste it in to Power Shell to run and this will show the Primary Email address and then all the alias addresses.

PowerShell Get-Mailbox display SMTP addresses


http://cscmblog.blogspot.pt/2012/02/export-to-csv-all-your-exchange.html

Concatenate data fields as binding expression

Concatenate data fields as binding expression:

<asp:label id="Label1" runat="server" 
     text='<%# String.Format("{0}, {1}", Eval("ContactLastName"), Eval("ContactFirstName")) %>'>
</asp:label> 

how to implemented mailto in Hyperlink asp control inside the gridview:

<asp:HyperLink id="hl1" runat="server" 
   NavigateUrl='<%# Eval("Email" , "mailto:{0}") %>'
   Text='<%# Eval("Email") %>'>
</asp:HyperLink>

Redirect Domain

php

 <?php
  header('HTTP/1.1 301 Moved Permanently');
  header('Location: http://www.sitedeexemplo.com');
?>

.htaccess

Redirect 301 / http://www.sitedeexemplo.com 

HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Redireccionamento</title>
<meta http-equiv="refresh" content="1; url=http://www.sitedeexemplo.com" />
</head>
<body>
</body>
</html> 

Javascript

<script type="text/javascript">
<!--
window.location = "http://www.sitesample.pt/dir"
//-->
</script>

Bulk Rename Utility

Bulk Rename Utility is an easy to use file rename program (a.k.a. file renamer). Renaming multiple files has never been easier! It has a small memory footprint so it can be left running all the time without consuming all your memory. It started as a freeware Visual Basic tool, but as its popularity has grown it has been completely rewritten in C++ to be robust and lightweight – and very, very fast! It can easily handle folders/discs containing well over 100,000 entries… and it can batch rename 1,000s of files in seconds.

The software is freeware and gets downloaded very frequently. It has a large base of regular users. Most of the features have originated from other users’ suggestions. As such, it is continually being enhanced and improved.

As well as being “recommended” by a number of web sites, Bulk Rename Utility has also appeared on many magazine cover-discs, from Brazil to Sweden.

If you have a suggestion for a new feature, get in touch and it could appear in a future release of the software!

http://www.bulkrenameutility.co.uk/Download.php

Programmatically set the selected menu item in the Menu control

Mnu1.Items(1).Selected = True
Mnu1.FindItem("Nutrients").Selected = True
mnu1.Items(indexToSelect).Selected = True
MenuItem mi = this.Menu1.FindItem("Home");
 mi.Selected = true;
this.Menu1.Items[0].Selected = true;

Get First and last word from sentence

        Dim Nome As String = "Carlos Galhano"
        Dim firstword As String = Nome.Substring(0, Nome.IndexOf(" "))
        Dim lastWord As String = Nome.Substring(Nome.LastIndexOf(" "c) + 1)
        Response.Write("first: " & firstword & " Last: " & lastWord)

Break lines at specific character in Notepad ++

  1. In Notepad++, click Search > Find.
  2. Click the Replace tab.
  3. Under the Search Mode group, select Regular expression.
  4. In the Find what text field, type ],\s*
  5. In the Replace with text field, type ],\n
  6. Click Replace All.

read more »

Enable auth login on smtp server exchange 2010

2 errors can happen:

a) “504 5.7.4 Unrecognized authentication type”
And, after was resolved, (b) happened:
b) “550 5.7.1 Client does not have permission to send as this sender”

read more »

Using “Cache” in ASP.Net

 Data can be stored on the client – using the view state of the page, or on the server in a variable session state or application, or using the server cache.
ASP.NET implements System.Web.Caching.Cache class to store objects that require a large amount of server resources to be created, so that they do not have to be recreated each time it is needed.
You can access via code information about a class instance cache through the property cache, the object of the HttpContext or Page object.
Expiration policy for items in cache:
  • Specific time:  absolute expiration
  • May also expire if not accessed for a period of time:  sliding expiration

read more »