Browsed by
Month: February 2012

Exchange 2007 console tips and tricks

Exchange 2007 console tips and tricks

roualin banniere5 Exchange 2007 console tips and tricksExchange Server 2007 introduced a new GUI management console (Exchange Management Console) to replace the Exchange System Manager (ESM) of previous versions. This earlier blog post The new Exchange 2007 Management Console overview gives an overview of the console. In this blog post I’ll show some tips and tricks of the console.

Exchange Server 2007 Deployment: 10 Tips When Installing

Exchange Server 2007 Deployment: 10 Tips When Installing

(From : http://technet.microsoft.com/en-us/library/aa996011(v=exchg.65).aspx)

roualin banniere5 Exchange Server 2007 Deployment: 10 Tips When InstallingTopic Last Modified: 2006-10-20

With Microsoft Exchange Server 2007, deployment is easier than it’s ever been. Take a look at some of the major improvements to Exchange 2007 Setup:

  • The Setup wizard has a new look! It is easy to use and effortlessly guides you through the installation.
Validate an email address

Validate an email address

roualin ex-mgmt-shell1 Validate an email addressValidating an e-mail address could be really usefull. Here is a really good thing to do before sending that address to a creation/modification script :

Function ValidMail ([string]$Mail ) {
$regexp=”^([a-zA-Z0-9_-.]+)@(([[0-9]{1,3}” +
“.[0-9]{1,3}.[0-9]{1,3}.)|(([a-zA-Z0-9-]+” +
“.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$”

if ($Mail -match $regexp) {
$return=$True
}
Else {
$return=$False
}
Return $return
}

Exploring WMI

Exploring WMI

roualin powershell_2 Exploring WMIWMI is an acronym for Windows Management Instrumentation. WMI is the Microsoft’s implementation of Web-Based Enterprise Management (WBEM) – a new management technology that allows software to monitor and control managed resources throughout the network. Such managed resources include hard drives, file systems, settings of operating system, processes, services, shares, registry settings, networking components, event logs, users, groups, etc.
WMI allows monitoring of performance counters as well. Microsoft applications such as Exchange and SQL Server have WMI built-in. Many non-Microsoft applications utilize WMI and thus they could be monitored using Advanced Host Monitor as well.

Import CSV file that contains accents

Import CSV file that contains accents

roualin powershell_2 Import CSV file that contains accentsIf you want to import some csv file that contain accents like “é” or special characters etc.. !

Here is  a way to do that !:

Get-content $File |

Out-File $File -Encoding Unicode

Where $File is the full path of your csv file 🙂

Active Directory – Get a Free Domain Controller

Active Directory – Get a Free Domain Controller

roualin powershell_2 Active Directory - Get a Free Domain ControllerIt could be really usefull to use the -DomainController parameter with many Powershell commands… But How to be sure to find an available DC ?

A little function will help you to do that :

Function Get_Domain_Controller {
$site = [System.DirectoryServices.ActiveDirectory.ActiveDirectorysite]::GetComputerSite()

$back = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().FindDomainController($site).Name
return $back
}

Sending mail using Powershell

Sending mail using Powershell

roualin powershell_2 Sending mail using PowershellSending an email in powershell can be done, once more, using .Net Frameword 🙂

Function SendMail([string]$file,[string]$sender,[string]$recipients,[string]$server){

$message = new-object System.Net.Mail.MailMessage

$message.from = $sender

$message.subject = “My first mail in Powershell”

$message.body = “Hello,” + “`r`n” +”This mail was sent automatically by the script” + “`r`n” +”You will find in attachement all information  you asked.” + “`r`n” +”Regards”
foreach ($rec in $recipients){$message.TO.add($rec)}

(french) Tutoriel Powershell – 3

(french) Tutoriel Powershell – 3

 

roualin powershell_2 (french) Tutoriel Powershell - 3Passez à la vitesse supérieure avec les objets

Maintenant que vous savez tout sur les objets, ce paragraphe va vous permettre d’optimiser l’utilisation de vos objets, car même s’il est intéressant de disposer d’un petit script, sans aucun doute très pratique, il est encore plus intéressant de transformer ce script en une ligne de commande et pourquoi pas d’en faire un alias.

(french) Tutoriel Powershell – 2

(french) Tutoriel Powershell – 2

 

roualin powershell_2 (french) Tutoriel Powershell - 2Constitution des commandes PowerShell

Les commandes de PowerShell sont appelées « cmdlets »  (pour command-applets). Elles sont pour la plupart d’entre elles constituées de la manière suivante : un verbe et un nom séparés par un tiret (-), exemple : « Get-Command » (commande qui liste les commandes disponibles).

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site