New User Mailbox is Created in Wrong Mailbox Store or Storage Group

Posted on April 28th, 2009 in Active Directory, Excahnge 2003, Microsoft by Gil Kreslavsky

The issue occurs when you are trying to create mailbox for new user using ADUC in Exchange 2003
By Microsoft the reason for the issue is : After upgrade of the forest to a 2003 native mode functional level, the Recipient Update Service may overwrite the value of the homeMDB attribute for new Microsoft Exchange Server 2003 users.

To fix the issue:

  1. Open ADSI Edit.
  2. Double-click the Configuration container
  3. Expand CN=Services
  4. Expand CN=Microsoft Exchange,
  5. Expand CN=<Your ExchangeOrganizationName>.
  6. Click CN=System Policies.
  7. In the right pane, right-click CN=Mailbox Enable User, and then click Properties.
  8. Scroll down to select the purportedSearch attribute, and then click Edit.
  9. Clear the attribute, and then use the following filter to configure the attribute:
    (&(objectCategory=person)(objectClass=user)(mailnickname=*)(homeMdb=*))
  10. Click OK .

Solution was been created with the help of the following article:http://technet.microsoft.com/en-us/library/aa998426.aspx

note:You must enter the attribute without any spaces, exactly as it is.

Upload Outlook contacts to Gmail

Posted on April 27th, 2009 in Google, Microsoft, Outlook 2002 XP, Outlook 2003, Outlook 2007 by Gil Kreslavsky

Copy you contact list from Microsoft Outlook (2003 or 2007) to Gmail Account:

  1. Open Outlook
  2. Go to File>Import and Export.
  3. Select “Export to a file” and click “Next”.
    image
  4. Choose “Comma-separated values” and click on Next
  5. Locate your contacts folder and click “Next”.
    image
  6. Save the file in .csv extension.
  7. Now go to you Gmail account.
  8. Click the “Contacts” on the left pane and subsequently select “Import” at the top right corner.

8. Click browse to locate the .csv file that you saved earlier.

9. You can click “Import” to start importing your contact. Of course you can add these imported contacts to a new group and you can name the group as well.

Windows 2008 shares unavailable

Posted on April 27th, 2009 in Antivirus, Microsoft, Server 2008, Symantec by Gil Kreslavsky

If you can’t access your shared folders on windows 2008 check the thinks bellow.

The issue can happen if you have certain versions of Symantec Endpoint Protection or Antivirus installed

To resolve the issue update

To resolve this issue, upgrade the Symantec Endpoint Protection software to Symantec Endpoint Protection 11.0 MR3.

you can find more information on the issue Here http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2008091611042748 or http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2008091611042748)

http://www.symantec.com/business/support/index.jsp

How to Change and set Default Windows Installation Path

Posted on April 19th, 2009 in Microsoft, Vista, Windows 7, Windows XP by Gil Kreslavsky

Unusually Operating System is installed on C drive and whenever you install new program it goes to C:\Program Files\program name

I is because the default suggested installation path is C:\Program Files.
It can cause a problem when C drive is been wrong partitioned and the size of C drive is small
You can use registry to change the default application installation path to for example install in D:\Programs,
To set different default installation path, follow the steps bellow:

  1. Pres on start
  2. Type in run regedit
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion.
  4. At the right panel, loacate ProgramFilesDir.
    image
  5. Double click on it to change the value to your desired path. For example, change the value from C:\Program Files to D:\Programs.
    image

Useful AD PowerShell Commands

Posted on April 8th, 2009 in Active Directory, Microsoft, Scripts, Server 2008 by Gil Kreslavsky

Finding Disabled Users:

get-qaduser –disabled

Create a new Active Directory user:

new-QADUser -name '<User CN>' -parentContainer '<Parent DN>' -UserPassword
'<Password>' -FirstName '<User First Name>' -LastName '<User Last Name>'
-UserPrincipalName '<User UPN>'

Create multiple users in Active Directory:

$parentDN = “<ParentDN>" $strPass = “userPaswd” For ($i = 1; $i -le 1000; $i++) { $strUserName = “User” + $i New-QADUser -name $strUserName -parentContainer $parentDN -UserPassword $strPass }

Modify Attributes for several users:

$strfileServer = "\\Servername\"
$objOU = [ADSI] "LDAP://<OU DN>"
$objOU.psbase.Children |% {
    $uac = [int](($_.userAccountControl).ToString())
    if (($_.objectClass -eq "user") -and (($uac -band 2) -eq 0))
    {
        $_.put("homeDirectory", $strFileServer + $_.sAMAccountName)
        $_.SetInfo()
    }
}

Delete user in Active Directory

remove-QADObject -identity <User DN>

Set user profile in Active Directory

get-QADUser -identity "<User DN>" |
set-QADUser -HomeDirectory '\\Servername\Katrin' -HomeDrive
'H:' -ProfilePath '\\server1\profiles\jsmith'
-scriptpath '\\dcname\netlogon\logonscript.vbs'

Move User to other OU

move-QADObject -Identity <UserDN> -NewParentContainerName <New OU DN>

Find Locked User Accounts

Get-QADuser -locked

Unlock User Account

Unlock-QADUser -Identity <UserDN>

Retrieve Password lockout policy

Get-QADObject domainname.com | format-list Name, *password*, *lockout*

Move Domain Controller to other site – PowerShell

Posted on April 6th, 2009 in Active Directory, Microsoft, Scripts, Server 2008 by Gil Kreslavsky

$dcname = <DomainDNSName>
$newSite = "NewSite Name"
$context = New-Object
System.DirectoryServices.ActiveDirectory.DirectoryContext(‘DirectoryServer’, $dcname)
$dc =
[System.DirectoryServices.ActiveDirectory.DomainController]::getDomainController ($context)
$dc.MoveToAnotherSite($newSite)

 

Where DomainDNSName – Enter your DNS domain name

PowerShell Script To Create Snapshot of All VMs – Hyper-V

Posted on April 5th, 2009 in Microsoft, Scripts, Server 2008 by Gil Kreslavsky
$VSMgtSvc=Get-WmiObject -ComputerName localhost
-NameSpace "root\virtualization"
-Class "MsVM_virtualSystemManagementService"
get-wmiobject -computername localhost -Namespace root\Virtualization
-query "Select * from MSVM_Computersystem where Description like
'%Virtual%' " | foreach-object {$VSMgtSvc.psbase.invokeMethod
("CreateVirtualSystemSnapshot",@($_,$Null,$null)) }

Moving a Group to Another Domain – Using ADMT

Posted on April 1st, 2009 in Active Directory, Microsoft, Server 2003, Server 2008 by Gil Kreslavsky

To move windows group to other domain download ADMT Tool

  1. Install Active Directory Migration Tool
  2. Open the ADMT MMC snap-in it is located in Administrative Tools.
  3. Chose source and destination domains and click Next.
  4. On the Group Selection screen, chose the group that you want to migrate and click Next.
  5. On the next screen, select Browse and locate the desired OU.
  6. On the Group Options screen, select one or more of the following and click Next:
    Update user rights: Copies any user rights that are assigned in the source domain to the target domain.

    Copy group members:Specifies whether the user objects that belong to the group should be migrated along with the group.

    Adds the security identifiers (SIDs) of the migrated group accounts in the source domain to the SID history of the new group in the target domain.

  • On the Naming Conflicts screen, select whether you want to migrate group objects that conflict with objects in the target domain and click Next.
  • Follow the remainder of the wizard to complete the migration.