Powershell v2 tips–All the Job commands (quick reference)
I’m a red fish, so I wrote the Powershell’s Job commands here so I’ll have a repository.An other way to list the Job commands is to type get-command *-job or get-command –Noun job Start-Job : Start-Job -ScriptBlock {dir –path c:windows –rec}Start-Job -Filepath c:scriptssample.ps1Invoke-Command -computername s1 `-scriptblock {get-eventlog system} –asjob Get-Job Receive Job [-keep] Wait-Job Stop-Job...
Aide-Mémoire - trouver dans quel site AD on se trouve
nltest /DSGetsite
How to use a list of servers in a file to process operations on multiple servers
Example : I’d like to ping several servers listed in a servers.txt file :- use get-content <filename> in between brackets after a named parameted :Test-Connection -ComputerName (get-content servers.txt) -Count 1You can also do the same without the parameter name if it’s a positional parameter :Test-Connection (get-content servers.txt) -Count 1More examples to come later…
Exchange Server 2010 SP2 is available !
Here is an awesome news about Exchange 2010 : SP2 is out !Exchange 2010 SP2 is now available for download: http://www.microsoft.com/download/en/details.aspx?id=28190The new features include (with some graphical interface improvements):§ Outlook Web App (OWA) Mini A browse-only version of OWA designed for low bandwidth and resolution devices. Based on the existing Exchange 2010 SP1 OWA infrastructure,...
Exchange 2010 - Retention Policy Tag not available immediately after definition in EMC
> From my buddy Brian Day on this post: After adding personal tags you may need to wait until the managed folder assistant processes the mailbox again before they'll show up. You can force it by runningStart-ManagedFolderAssistant <MailboxIdentity>.As he tested on his Lab, and so did I, we used a retention policy with one folder...
How-to use Powershell to change the Network location type (to Private or Public)
Here is how to change the Network type of a specific network (or networks) to Private or Public, to help you better master Firewall policies.This is especially useful if you have a bunch of Windows 2008 servers on a DMZ as it’s more and more the case, which are not controlled by GPOs then.Credits goes...
/Hosted mode or not /Hosted mode, that is the question … since Exchange 2010 SP2, recomended not !
“If you haven’t yet deployed Exchange 2010, our recommendation is to avoid /hosting mode and go directly to Exchange 2010 SP2 using the on-premises configuration. This will allow you to offer the features customers are looking for, and avoid a cross forest migration down the road.”Source : Future of /Hosting Modehttp://blogs.technet.com/b/exchange/archive/2011/10/13/future-of-hosting-mode.aspx
Bulk populate an AD using a CSV file and New-ADUser, including Passwords
Problem : New-ADUser is not working as expected to populate a password coming from a CSV file (the account stays disabled) here is the example and the reason: Prerequisites: Import the Active Directory module on your powershell session using Import-Module ActiveDirectory Here is my BulkAddADUsers.csv file sample : GivenNAme,Surname,Name,SamAccountNAme,Description,Department,EmployeeID,Path,Enabled,Password,PasswordNeverExpiresUser,Test1,UserTest1,UserTest1,UserTest1,IT,189478,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test2,UserTest2,UserTest2,UserTest2,IT,187516,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test3,UserTest3,UserTest3,UserTest3,IT,134530,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test4,UserTest4,UserTest4,UserTest4,IT,162455,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test5,UserTest5,UserTest5,UserTest5,IT,121901,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test6,UserTest6,UserTest6,UserTest6,IT,170221,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test7,UserTest7,UserTest7,UserTest7,IT,128669,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test8,UserTest8,UserTest8,UserTest8,IT,108705,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test9,UserTest9,UserTest9,UserTest9,IT,106381,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test10,UserTest10,UserTest10,UserTest10,IT,193922,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test11,UserTest11,UserTest11,UserTest11,IT,174066,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test12,UserTest12,UserTest12,UserTest12,IT,105871,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test13,UserTest13,UserTest13,UserTest13,IT,126670,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test14,UserTest14,UserTest14,UserTest14,IT,124671,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test15,UserTest15,UserTest15,UserTest15,IT,118935,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test16,UserTest16,UserTest16,UserTest16,IT,183367,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test17,UserTest17,UserTest17,UserTest17,IT,185662,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test18,UserTest18,UserTest18,UserTest18,IT,118972,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test19,UserTest19,UserTest19,UserTest19,IT,187421,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$TrueUser,Test20,UserTest20,UserTest20,UserTest20,IT,167020,"OU=Test,DC=CONTOSO,DC=CA",$True,P@ssw0rd,$True The following command...
Exchange 2003 to Exchange 2010 Intra-Organization migration
Exchange 2003 to Exchange 2010 migration path Step Step Title Details (migration from Exchange 2003) Step 1 Certificate Acquire new commercial certificate for external client coexistence with CAS 2010 (legacy.contoso.ca namespace required for former CAS2007 for silent redirect). It will neet at minimum 3 SAN values : - mail.contoso.ca (primary OWA/EAS/OA URL) - autodiscover.contoso.ca -...
Active Directory Schema upgrade procedure - with back-out plan
The aim of the procedure in this post is to avoid you to dig around the technet to rebuild it. It’s written for Exchange 2010 SP1 here, but can easily be adapted for any product schema updates by replacing the Exchange 2010 SP1 values and links ! AD Schema upgrade procedure with verifications (can be adapted...