|
|
Browse by Tags
All Tags » PowerShell » MsExchange
-
So inlight of RU5 I thought I would share this with you. So we know the issue with the .net framework and the Certicate Revokation List.
This script updates the Exchange 2007 .config files inline with 944752: Exchange Server 2007 managed code services do not start after you install an update rollup for Exchange Server 2007
It will add the ...
-
The whole universe knows by now that RU5 for Exchange 2007 SP1 has hit the streets.
You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=652ed33a-11a1-459c-8ffe-90b9cbfe7903&DisplayLang=en
Ninob over at the Exchange team blog says that it will be out via Microsoft Update in the next few weeks. He also ...
-
v3.0 6 August 2008 : Removed the GUI form the original scriptv3.1 22 August 2008 : Updated to ''autofind'' a hub server if -server is not specifiedv3.2 7 November 2008 : Some minor tweeks. Added event logging.Added Error Event loggingThis script uses .net (System.Net.Mail.MailMessage) to send an ...
-
Okay I have updates as follows:
v1.0 27 October 2008 : A Script is bornv1.1 28 October 2008 : Add ability to expose Server Modelv1.2 31 october 2008 : Added email and commandline v1.3 4 November 2008 : Added option to check recent changesv1.4 6 November 2008 : Days commandline ...
-
Wow is all I have to say, this is a damm excellent article and script .. check it out:
http://technet.microsoft.com/en-us/library/bb124359.aspx
Basically, it's a script that will recreate your owa virtual directories from a previous xml export! ..I just added a comment .. to create the export run:Get-ClientAccessServer | Get-OwaVirtualDirectory ...
-
Just ignore this, I wanted to store this code snippet somewhere and this was the best place. But if you are interested this will create a csv file from Get-MailboxStatistics, but with the TotalItemSize in MB
''DisplayName,TotalItemSize(MB),ItemCount,StorageLimitSize,Database,LegacyDN'' | out-file GMS.csv; get-mailbox -resultsize unlimited | ...
-
Another thing I wanted to share. If you want to say Get-MailboxServer but only want a subset of server you could try this:
Get-MailboxServer | Where {$_.Name -LIKE ''*Serv01'' -OR $_.Name -LIKE ''Ex*NYC*''}
Enjoy
-
Just wanted to share this with you all.
So I have a number of scripts that I schedule to run either every 10 min, once a day or once a week. It's simple really, I create .cmd file that I then use the task scheduler or schtasks to create.
Inside the .cmd file I have this:
powershell c:\ps\Test-ExchangeServers.ps1 -localhost -testsmtp ...
-
So I have been creating a few scripts to automate the configuration of exchange, and wanted to use the -WhatIf switch so you can see what would or would not change.
-WhatIf [<SwitchParameter>]The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can vi ew what ...
-
This script uses Get-ExchangeServer to generate a list of servers and will enumerate the Exchange Patch information and list the windows updates installed on the server.
This update changes the way the server list is generated and added the ability to check cluster nodes
COMMANDLINE OPTIONS-EMAIL .......... Send an Email-Localhost ...
-
I mentioned this before as a way to script adding tasks to a server. So I came across an issue the other day, where I ran it once, but then it failed on the second time:
ERROR: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the ...
-
A while back I posted this , but to have something more ''in your face'' I put a GUI around it, and this is the latest version.
The script enumerates all messaging queue and displays it in a GUI. The GUI then refreshes every 10 seconds.THE GUI has four tabs:
QueueDisplay the current queue
MessageDisplays messages in the queue
Top 5 Q’sThis ...
-
I needed to get a quick list of the hotfixes installed on my Exchange 2007 servers.
So I “knocked” this up .. enjoy
-
At last I think I have cracked it so I can download these TechNet Webcasts as a video podcast to my Zune!Will post more as I get round to it, but here is the first one! .. Enjoy .. the RSS is: ...
-
WHAT! I hear you say, you can't do that! .. Very true, but you can automate it ;-) using the wonders of Powershell
Exchange 200x
First you will need to use adsiedit.msc and get the groups distinguishedName. Once you have that, using an account that has access to over the users AD objects you run this code:
$mygroup = ...
-
So I needed a way to check what has changed in the Exchange Configuration container … basically if something stopped worked ;-)
So I came up with this. I run it once a week, and it checks for changes in the last 7 days.
It has one command line option and that is –email to email the results ...
-
This is kinda interesting .. honest .. Did you know there are 394 Powershell command with Exchange 2007 SP1. But thats not intersting, the table below is!
So the AD and Server build boys said … no mate, you can’t have local admin rights to your exchange server? Kewl I said you guys can manage it then, as with out it we can’t do ...
-
Everyday is indeed a School Day and I had never come across this command util today!
The .NET service channel is introduced in Microsoft Exchange Server 2007 Service Pack 1 (SP1). This channel enables Exchange Server 2007 to store information that it will later forward to applications or devices that are not permanently connected to the ...
-
This is a handy little check. If you want to see what scheduled tasks are running on your Exchange 2007 servers try this:
Get-ExchangeServer | foreach-object{$srv=$_.Name.ToString(); write-host ''`n`n$srv''; schtasks /s \\$srv /query}
Enjoy
-
Has a problem today where I couldn't RDP to an Exchange 2007 server ... so knocked this up ;-)
Get-ExchangeServer | foreach-Object {write-host $_.name; quser /server:$_}
-
I am sure you all know there is a new Storage Calculator out in the wild not, ver 15.6
I have downloaded and read the article and found a need to pass this script on to you all. Basically about half way down is a link to Collectlogs VBS script
Come on! a VBS .. must be able to do that in PowerShell ;-) .. Well you sure can, and here is ...
-
So been automating some global configuration in Exchange 2007 today and wanted to share this. I need to enable web distribution of the oab and couldn't find the Powershell ''check box''. But cracked it. You need to just populate the VirtualDirectories entry and it ''checks'' the Enable Web-bases distribution.
The cheat was ...
-
Update to this script too, basically a change from using Get-ExchangeServer in places to Get-TransportServer. Also add a size column to the message tab.
It will also log data to c:\ps\logs\<datefolder>
Let me know what you think ;-)
-
So another script .. This is actually a one liner but this is an easy wrapper.
The one liner is:
Get-TransportServer | Get-Queue
-
Recreation of an old script. Basically this will run get-help for all commands and output it to c:\ps\help .. I like it ;-)
######################################################################################### $AppName = ''Dump-Help.ps1'' $AppVer = ''v1.0 [7 August 2008]'' #v1.0 6 August 2008 : A script is Born # #This script ...
-
Damm, has this script grown up recently.
In a nut shell, this is the daddy of all scripts and gathers chunks of information from the Exchange Organisation and each Exchange Server by using a mixture of WMI, .Net and Exchange 2007 Powershell commands.
The script can be run for just one server, by appending an server name to the command or with no ...
-
So Anderson posted this, and my initial thought was huh? The KB didn't really explain either, so it was time for a test.
So the KB will allow you to remove the circled text below:
And it's a nice simple PowerShell Command:
Set-TransportConfig WritingBrandingInDSNEnabled $false
But you do need to have Exchange 2007 SP1 with RU3
-
I just have to share this with you, as I was quite impressed by how quick I knocked this script up. Basically I wanted to see how much email was queued up on my Exchange 2003 servers. I had a feeling that a WMI object existed so I ran scriptomatic on a server a behold under root\MicrosoftExchangeV2 was Exchange_SMTPQueue.
So the rest ...
-
Do you know how sometimes you write a script and the output looks lovely, but for some stupid reason a yellow warning message ruins it.
Well my school day learning from today is that you can turn them off!
So lets say I run this
[PS] C:\PS>get-mailboxdatabase -server ...
-
The king of exchange powershell scripting .. so here is v5 of the awesome mailbox size gui script by Glen.
This time he has added mailbox growth history. Check it out and download it!
http://gsexdev.blogspot.com/2008/05/version-5-of-mailbox-size-gui-script.html
-
I wrote this a while back, and just blew the dust off it.
Meet get-PerfCounters.ps1 Basically you feed the script a csv file that has ''ServerName'' on the first line the first.
The script will then loop the servers and get the following perf counters
System\System Up TimeMemory\% Committed Bytes In UseMemory\Committed BytesMemory\Commit ...
-
Off the back of Eileen's post, I just couldn't resist a new ebook.
So Exchange Management Shell: TFM is a 386 page secured! PDF document, with the last 8 being adverts for Sapien Press!. The secured bit is a a major pain in the butt as you can't copy from the PDF doc. So a PDF ebook, that has code snippets becomes kind like a paper ...
-
This is an interesting one I found. We set Message Tracking on out Hub Role servers so it would purge the logs after 30 days .. nice and simple. MessageTrackingLogEnabled : ...
-
I saw Andy posted this (http://telnetport25.wordpress.com/2008/03/16/quick-ish-tip-exchange-2007-setting-oof-for-users-via-powershell-2/) today and wanted to share my script.
It uses the same dll from Glen(EWSOofUtil.dll) to open the specified users mailbox and Enable/Disable a users Out Off Office Setting. This in theory fixes an Issue with ...
-
So this is a script I knocked up to make sure Exchange is being backed up. It does it by querying the LastFullBackup attribute of an Exchange Database.
It groups servers by AD site, and I have this run as a scheduled task every day. It also send and email.
As a scheduled task I created a .cmd file with the following in ...
-
I just have to share this with you. So for those of us who have Installed Exchange 2007 RTM, you may have noticed that the queue viewer is a bit pants.
Now I have not seen Exchange 2007 Service Pack 1, so maybe this is fixed, but when I look at queues I want to see ALL the queues and not just the one server (like the Queue Viewer)
A while ...
-
Can remember if I posted this or not, but I forgot who handy it is.
basically if just runs get-queue, but for all you Exchange 2007 Hub Transport Servers
Ah, but what is really cool is this .. You can do ''stuff'' with the output
So you could run
[PS] C:\ps>.\get-allqueues.ps1
[PS] C:\ps>.\get-allqueues.ps1 | WHERE ...
-
So after the release of Rollup Update 5, wouldn't it be nice if you could run a simple PowerShell script to check all your exchange servers and see what Rollup they have applied
Well now you can ;-) get-exchangeserverplus.ps1
It runs get-exchangeserver and enumerates a servers registry for the installation key and lists it out. ...
-
So I have been having some fun this setup switch and wanted to share some stuff with you .... so if your Exchange 2007 organization contains many Exchange servers, it is possible that more than one person will be installing Exchange 2007. As a result, you might not want every person who will install Exchange 2007 to have the permissions assigned ...
-
Okay so we all know that Test-SystemHealth is basically ExBPAcmd with a nice wrapper.What I find interesting is that when I run it, it always ''Mailbox Role Checks'' even if it's run on a CAS or Hub Transport server.
Well Test-SystemHealth does have a -roles but the help file says it's Reserved for internal use.
However, you can use the ...
-
Sorry Evan, but just to correct you a little bit. ;-) but you need <ServerName>\<SG> in get-mailboxdatabase and –organizationalUnit in New-DynamicDistributionGroup
To create a DDL for each DB in an SG
get-mailboxdatabase -StorageGroup <ServerName>\<SG> | % { New-DynamicDistributionGroup ''DDG-$($_.Name)'' ...
-
So might have guessed with my previous transport post that now I wanted to automated the moving of the logs and database to another drive.
It is nice and simple, you can create a folder on the new drive and change the paths in the EdgeTransport.exe.config and by using Set-TransportServer.
BUT I discovered that some of the folders have specific ...
-
So as you may know, MessageTracking in Exchange 2007 is pants.
Out of the box you can only track a message from one server and have to manually track messages from one server until the next. The default MessageTracking doesn't even let you do this.
So, this is one I made earlier ;-) A little PowerShell Script that requires a ...
-
I wanted to see what was queued up on my Hub Transport servers and the Queue viewer didn't fit the bill, but this line of code did ;-)
[PS] C:\ps>Get-ExchangeServer | where {$_.ServerRole -eq ''HubTransport''} | get-queue
-
So as you have read I have been playing with the two Update Rollups (1, 2)and the one things that gets me is that you have no way of knowing what patches are applied on what servers.
Until now ;-) So I have written some PowerShell that will get a list of all your Exchange 2007 with the exception of Edge servers. It then uses WMI to ...
-
Time to blow the dust off my coding shoes and give this ago!... In Exchange 2007 one of the new features is resource mailboxes out of the box you have two types of these mailboxes Room mailbox and Equipment mailbox.http://gsexdev.blogspot.com/2007/04/webservice-to-find-room-and-equipment.html
-
I am playing virtual tennis with Shawn today and he scored his first point with this (the game is at 15-40)
In the past I have used ScriptomaticV2 or wbemtest to test WMI or get vbscript to dump WMI data. Shawn showed me WMIC and I am very impressed. It's not as good as using Windows PowerShell, but it is good.
So if you using a ...
-
I blogged this before with a Beta version of Exchange 2007. Here is a dump of Get-Tip from Exchange 2007 RTM. It turns out that we have 76 of them!
[PS] C:\ps>1..76 | foreach { get-tip $_ }
Tip of the day #1:To return all scripts that are found in your path, type:Get-Command -Type ExternalScript And for a useful shortcut, assign ...
-
Okay here it is. Yes yet another send mail powershell script, but this is different!
Oh yeah, it has loads of options and yet this a GUI! yeah a GUI! Also you can send email to members listed on a CSV file and send more than one. I suppose its actually more like a mailstorm program
So copy it down, start up powershell and run ...
-
Thank you Brett, I have been having heart ache trying to work out to send emai to my test server.
Check it out (http://blogs.technet.com/brettjo/archive/2006/10/13/testing-with-the-ex2007-default-receiveconnector.aspx) .. its easy really
[PS] ...
-
Brett touched on this a while back, and I just wanted to pad things out a bit.
So as brett mentioned, you can access the registry like a file system in powershell.
So start up powershell and type:
PS C:\> sl HKLM:
PS HKLM:\>
Now you can sl, cd and chdir are all an alias for Set-Location, so you can use either. You can see the ...
-
Been looking for some stuff on creating public folders and stumbled across this.
Source: http://h71019.www7.hp.com/ActiveAnswers/cache/70499-0-0-225-121.html?jumpid=reg_R1002_USEN
It’s damm good, and has source code. Check out the E2KWatch script in H)Part 2: Scripts for Managing Exch2K with WSH
-
You know if you start the Exchange Management Shell, it gives you a “tip”. Well it would seem that it has 80 of them! So I thought it would be good to list them all out
You can just type get-tip in the Exchange Management Shell, but if you want a specific one type get-tip 8 and you wil get #8. Anyway here is ...
-
Exchange Server 2003 SDK Documentation and Samples July 2006
http://www.microsoft.com/downloads/details.aspx?FamilyID=32774e09-4984-458e-bdb7-ed2bb356bd27&DisplayLang=en
The Exchange Server 2003 SDK Documentation and Samples assist developers building applications for Exchange Server 2003. This release of the SDK provides new and updated ...
-
Ohh you get a word doc and some code!
Source: http://www.microsoft.com/downloads/details.aspx?FamilyID=0cd7f344-cad6-416e-9bc1-0d7c214e1d0b&DisplayLang=en
This technical article and sample event sinks assist developers in creating SMTP and Transport event sinks using Microsoft Visual Stuidio .NET and the .NET Framework.
|
|
|