| Topic |
 |
RE: Error Retrieving Total Number of Mailboxes in Exchange This script does much more than calculating the number of mailboxes in the env. Instead you just try running below command to get number of mailboxes in your env. or let us know what is your exact requirement. (Get-mailbox -resultsize Unlimite ... by Vishal Ramnani in Exchange Server on 07 Jun 2010 02:40 AM
|
 |
RE: Piping values to a filter parameter Try adding one more variable before the filtering command as below. $Filter = "*" + $YourVariable get-mailcontact -filter {displayname -like $Filter}| ` set-mailcontact -customattribute1 "$data" Hope this helps. Thanks by Vishal Ramnani in Exchange Server on 07 Jun 2010 02:09 AM
|
 |
RE: get-qaduser executable file? Just prefix the below codes to the script... #-------------------- #Script Starts Param ($user) #Put this variable in the query... Get-QADUser -id $user ..... #rest of it goes the same. #To Run command. QueryUserAttributes.ps1 -u ... by Vishal Ramnani in Active Directory on 26 Apr 2010 01:29 AM
|
 |
RE: Powershell script to delete secondary smtp domains from mailbox below script will do... Get-Mailbox -resultsize Unlimited | Foreach { $MBx = $_ $MBx.emailaddresses | foreach { if ($_.smtpaddress -like "*@xyz.com" -and $_.isPrimaryAddress -eq $false) {$_.remove($_.smtpaddress)} } Set-Mailbox -id $MB ... by Vishal Ramnani in Exchange Server on 26 Apr 2010 12:58 AM
|
 |
RE: Enable-Mailbox Yes It is possible. Try this... $user = "Book, Mac" $identity = "Domain.com/Users/" + $user $alias = "Mac.Book" Thanks. by Vishal Ramnani in Exchange Server on 13 Apr 2010 03:24 AM
|
 |
RE: You cannot call a method on a null-valued expression Just remove Get-Mailboxstatistics from Expression in Select-Object because the value is already carried to this cmdlet from pipeline. so it will be like this. Get-MailboxStatistics -server $target | sort-object -Property totalitemsize -des | sele ... by Vishal Ramnani in Exchange Server on 08 Feb 2010 04:38 AM
|
 |
RE: Modifying additional or etentded attributes of AD How about if you add "-includeAllProperties" in Get-QADUser here? Get-QADUser -Title "student" -SizeLimit 0 -IncludeAllProperties | WHere.... Thanks. by Vishal Ramnani in Active Directory on 25 Jan 2010 05:54 AM
|
 |
RE: User cannot change password You may not be able to set this properties directly as this is a permission on AD Object. Refer below articles to have more understanding and methods. http://msdn.microsoft.com/en-us/library/aa746398%28VS.85%29.aspx http://support.microsoft.com/ ... by Vishal Ramnani in Active Directory on 22 Jan 2010 05:40 AM
|
 |
RE: Exporting Users with Uppercase UPN's First of all -cne is not correct operation. i think it should be -ne (Not Equal) however it will return the result as -ne operation will not match with lower or upper case. instead of exporting you directly change them to lower as below. Get- ... by Vishal Ramnani in Active Directory on 16 Feb 2010 01:46 AM
|
 |
RE: Remove Spaces In Various Attributes removing space is fine but as far as the these are attribute are concerned, i dont thing you will be able to set it up by Set-QADuser cmdlet. Just type "Get-Help Set-QADUser -detail" and you will be given a list of parameters you can use to set A ... by Vishal Ramnani in Active Directory on 11 Jan 2010 10:55 PM
|
 |
RE: Remove Spaces In Various Attributes Hey, This was throwing error because you were using a variable which you didn't define. but again that may give you an error because few parameters used by you are not in Set-QADUser cmdlet. Try below... #Add-PSSnapin Quest.ActiveRoles.ADM ... by Vishal Ramnani in Active Directory on 11 Jan 2010 04:56 AM
|
 |
RE: Setting password at next logon fails Hi Again, This is because the New and Set-Mailbox cmdlets might be making changes in other DC than DC2 to which Set-User is modifying the objects and there is some replication involved btwn DCs which is normal. Either remove -DomainController ... by Vishal Ramnani in Exchange Server on 08 Jan 2010 03:30 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Hey Try this... Added a small line. :) Add-PSSnapin Quest.ActiveRoles.ADManagement #Listing all OUs under DomainName/Schools OU and saving them in Variable $AllOUs = Get-QADObject -Type organizationalUnit -SearchRoot "DOMAINNAME/Schools" - ... by Vishal Ramnani in Exchange Server on 08 Jan 2010 02:37 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address no problem. I will post it next day once i am back. by Vishal Ramnani in Exchange Server on 06 Jan 2010 06:47 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Ohh!! That's because we are using the same $user variable even after modifying that in AD. My Bad. Please replace "$MBxAlias = $user.samaccountname" with "$MBxAlias = (Get-qaduser -Identity $MBxID).samaccountname" and make sure that all OUs hav ... by Vishal Ramnani in Exchange Server on 06 Jan 2010 06:06 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Check this out. You only need to change the domain name in the script and arrange a CSV file with School name (taken by OU names) and respective databasebase, storage Group and Server.PS1 Attached.Thanks. by Vishal Ramnani in Exchange Server on 06 Jan 2010 05:11 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Yes! in that case i would suggest to use each OU to pass through this script and search for IDs on filter and enable the mailbox. You said earlier that have multiple OUs under Schools OU name as school names. So i think it is possible to get those ... by Vishal Ramnani in Exchange Server on 06 Jan 2010 04:03 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Yes! You need to get the school name from OU structure (Under "Schools" OU and which is above "Users" OU) and provide it to the variable in the beginning before executing. you can also replace ( $schoolname = "Calegreen" ) with ( $schoolname = read- ... by Vishal Ramnani in Exchange Server on 06 Jan 2010 03:13 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Try to attach PS1 if above text does not work. not sure how to paste a script block here. by Vishal Ramnani in Exchange Server on 06 Jan 2010 12:30 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Perfect! So try below... #Start Add-PSSnapin Quest.ActiveRoles.ADManagement #Define the School name here itself at only one place. this can be prompted as well from the prompt with read-host cmdlet. $schoolname = "Calegreen" #importing t ... by Vishal Ramnani in Exchange Server on 06 Jan 2010 12:19 AM
|
 |
RE: Trouble reading csv file with new-qaduser Or use forward Slashes ("/") in OU Name :) by Vishal Ramnani in Active Directory on 05 Jan 2010 11:50 PM
|
 |
RE: Find Non Mail Enabled Users Hi Again James, Mail Enabled users are users without mailbox in local exchange organization and have an external email address where the mails would be forwarded. Mailbox Users are users with the mailbox in local exchange organization servers. ... by Vishal Ramnani in Exchange Server on 05 Jan 2010 07:00 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Ok. i think i got the point. Let me frame it and comment if you dont want the same. You have a CSV file which is with the list of Schools. Each School has a designated server and database. The IDs in a particular school should be created the desi ... by Vishal Ramnani in Exchange Server on 05 Jan 2010 01:20 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Couldn't understand what exactly you want to do. there are two parts in the script itself. For qad error make sure that you have Quest AD mgmt Powershell cmdlets installed on the machine. download from below link and install. http://www.quest.co ... by Vishal Ramnani in Exchange Server on 04 Jan 2010 06:50 AM
|
 |
RE: Remove Spaces in SamAccountName and create E-Mail Address Hey James, Assuming that you have all IDs updates with the titles of Teachers and Staff. Try below. #Find ID with title teacher or staff and where sam account name contain Space. $Users = Get-QADUser -sizelimit 0 | where {$_.title -match "^Te ... by Vishal Ramnani in Exchange Server on 04 Jan 2010 02:49 AM
|
 |
RE: How to work with the Ping command in the Powershell? ohh!! Apologies. Please remove "(" also from if condition. Try below. i tested it. #start $Srvname = Read-Host "enter server name or IP address" $ping = new-object System.Net.NetworkInformation.Ping $shell = New-Object -ComObject wscript. ... by Vishal Ramnani in General PowerShell on 28 Dec 2009 11:53 PM
|
 |
RE: How to work with the Ping command in the Powershell? Sorry! the variable should $Srvname instead of $server. ... $test = $ping.send($Srvname) ... The condition in first if statement will verify if the above command is successfull or not. The Condition says, if the above command is NOT succes ... by Vishal Ramnani in General PowerShell on 28 Dec 2009 06:58 AM
|
 |
RE: How to work with the Ping command in the Powershell? The correct script would be as below.. Slight change $Srvname = "server.com" $ping = new-object System.Net.NetworkInformation.Ping $test = $ping.send($server) if ( (!$?) { Write-host "Couldn't find the ... by Vishal Ramnani in General PowerShell on 28 Dec 2009 01:41 AM
|
 |
RE: PowerShell Bangalore User Group, PS-Bug Hey Ravi, I am glad with your initiative. I worked in bangalore and in Hyderabad as of now. Please let me know how do I do that? by Vishal Ramnani in User Groups on 27 Dec 2009 11:25 PM
|
 |
RE: get-mailboxdataabse question Get-MailboxDatabase | Ft Server, Identity, Name, ProhibitSendQuota, Check server and identity on which Server it is. Thanks. by Vishal Ramnani in Exchange Server on 16 Dec 2009 12:55 AM
|