|
|
Browse by Tags
All Tags » PowerShell
-
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 ...
-
ooh ooh ooh ... nice
Source: http://www.microsoft.com/downloads/details.aspx?familyid=d87daf50-e487-4b0b-995c-f36a2855016e&displaylang=en
A new utility that writes Windows PowerShell scripts that harness the power of WMI (Windows Instrumentation Management) for use in system management and administration. This tool was created by ...
-
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 am updating my Get-ExchangeServerPlus.ps1 and I wanted to check for a hotfix in the registry. But I wanted the ability to add more checks by adding a value to an array.
So my code is enumerating the registry using WMI and I wanted to check a registry key against my array. I was thinking about for loops and then found this .. damm ...
-
In my past life I used to program dBase and Foxpro. I am the sort of programmer that is kind of lazy, and I like looking for samples of code and then working by code around it, or using the sample to get an Idea how to do stuff.
Typically I use msdn and a number of blogs as my main source of stuff. That was until I found the Windows ...
-
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 ...
-
So I have been ''play'' with PowerShell again today, and I have trying to work out how to write an Event to the Eventlog.
Richard gave me some code to do it with vbs, but I found this while surfing (it has taken an age to find!) http://winpowershell.blogspot.com/2006_07_01_archive.html
Anyway, not I have found it the world is my oyster! So ...
-
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
-
Ben you are the dogs whatits. This is just an awesome post on how to 1) Make ad admin simpler and 2) How to create your own pseudo-cmdlets.http://blogs.technet.com/benp/archive/2007/04/10/creating-an-ad-shell.aspxNow tie that in with some of Dmitry’s PowerBlog and you can fully manage an AD using Windows ...
-
If you play with Windows PowerShell the this is a MUST. It's a PPT with some .ps scripts and it's really quite interesting. Source: http://blogs.msdn.com/powershell/archive/2007/03/28/mms2007-managing-systems-using-powershell.aspx
Jeffrey presented this talk at (''SW08 Managing Systems with PowerShell'') at MMS2007 in San Diego March ...
-
Now this could be an issue that the PowerShell guys have shared .... its good to talk! Source: http://blogs.msdn.com/powershell/archive/2007/03/19/windows-server-2003-sp2-upgrade.aspx
Because of the nature of the Windows Service pack (SP) releases, all the windows updates are consumed by SP upgrade. So once you upgrade to a new SP all the ...
-
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 ...
-
Yeah yeah I hear you say I can use Scriptomatic so what is new .. Well Marc aka MOW aka the PowerShell Guy has just blogged a WMI Explorer written in Windows PowerShell.
How Damm cool is this!
Source: http://thepowershellguy.com/blogs/posh/archive/2007/03/22/powershell-wmi-explorer-part-1.aspx
You dont get the script samples like ...
-
If you love Windows PowerShell then you must already read Marc Blog. BUT this is just the dogs whatits!
Source: http://thepowershellguy.com/blogs/posh/archive/2007/02/09/ad-infrastructure-management-with-powershell.aspx
Being able to query the AD with just a few PowerShell commands if just awesome. Check it out and try it now .. ...
-
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 ...
-
You have to check this out, it just ROCKS! and shows the power of Windows PowerShell!
Source: http://ps1.soapyfrog.com/blog/files/space_invaders.html
-
I have updated my tube gadget for Windows Vista Sidebar.
Check it out here: http://files.flaphead.dns2go.com/tube.gadget.zip download it and remove the .zip and double click
Enjoy and let me know if you find any bugs or have any suggestions
-
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 ...
-
If like me your a VBScript coder and are having a few issues with Windows PowerShell, then this should help
http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx
or go to here http://www.microsoft.com/downloads/details.aspx?familyid=264CE487-1D36-4466-BD8B-23A7F1FA967E&displaylang=en and download the 65 page ...
-
Saw this at IT Forum in Barcelona a few weeks back. It just rocks!
Download the trial and see for yourself! http://www.powergadgets.com/
Once you have it try these:
get-process | out-chart -refresh 0:0:1
get-wmiobject win32_PerfRawData_PerfOS_Memory | out-gauge
Also n/software have an addin, but I have not played with it yet. You ...
-
Want to move all mailboxes on your server to one database?
get-mailbox | Move-Mailbox -targetdatabase ''first storage group\mailbox database''
-
Myself and Brett played with some coding last week and I wanted to share with you what we done.
Brett’s original script is to deploy an Exchange 2007 server. It basically runs setup, installs exchange and then imports data from a number of CSVs and creates StorageGroups, Databases and address lists.
So I was also thinking that it ...
-
What a month this is turning out to be. So today Windows PowerShell RTMed and is available for download. If you script, you NEED to check this out, it ROCKS!
Source: http://blogs.msdn.com/powershell/archive/2006/11/14/windows-powershell-1-0-released.aspx
You can get the English version from here: ...
-
Check it out http://www.microsoft.com/downloads/details.aspx?familyid=9fb32b6c-e847-4488-a242-d76bee92a21b&displaylang=en
-
http://www.microsoft.com/downloads/details.aspx?FamilyID=1dc0f61b-d30f-44a2-882e-12ddd4ee09d2&DisplayLang=en
This download contains an introduction to key Exchange Management Shell features.
Microsoft® Exchange Server 2007 introduces a new management platform called the Exchange Management Shell, based on Microsoft Windows® ...
-
Looks like a weeks worth of Windows PowerShell Webcasts. The times for the rest of the world are a bit pants - 1930 - 2100 UK time!
They are only level 200, but a good place to start
6 Nov 2006
TechNet Webcast: And Now for Something Completely Different: Introducing Windows PowerShell (Level ...
-
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] ...
-
This took me a while to work out, and was quite easy once I found how. So I basically wanted to like out events from the security event where the message equalled something and the event had a pairticular id.
I searched the web and found nowt (as expected) so here is my command:
Get-eventlog security | where {($_.Message –ilike ...
-
Check it out now funk soul brother
Source: http://www.leeholmes.com/blog/PermaLink,guid,52ee0531-c24c-4fd5-8eed-d05c6ec48ca0.aspx
Lee has created a downloadble PowerShell Quick Reference Guide. Just forked out $12.99 and it looks good.
115 pages of pdf. Not had a chance to give it a good look yet but I will
-
This is quite good! check it out
Source: http://www.leeholmes.com/blog/PermaLink,guid,25ff56a2-9e8e-4778-b319-4122ad7154ea.aspx
The PowerShell range operator allows you to generate lists of numbers out of more compact expressions
-
Nice bit of code and uses WMI!
Source: http://jtruher.spaces.live.com/Blog/cns!7143DA6E51A2628D!138.entry
Some of you might know that I've spent a lot of time on UNIX systems. One of the scripts that I used a bunch was /etc/dfspace. If you don't know what dfspace is, it's a simple wrapper for df that provides disk usage info in ...
-
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
-
My buddy Brett asked me about this a few weeks ago and I never managed to get to him .. sorry buddy! So I decided to come back to everyone.
After playing with powershell a bit you get an idea of the power you have. So something that really makes it rock is the ability to pipe the output from a command to another command.
So I have a few to ...
-
This is a good script from Ben
Source: http://winzenz.blogspot.com/2006/08/creating-new-mailbox-using-powershell.html
Check the blog for more details, but the script is here:
$password = Read-Host ''Enter password'' -AsSecureString
New-mailbox -UserPrincipalName chris@contoso.com -alias chris -database ''Storage Group 1\Mailbox Database ...
-
Not many people pay any attention to what I do, but it’s good when you start getting credit from people that do.
I posted Exchange 2007 Powershell: Get-Tip a while back and Mr Exchange PowerShell himself picked it up … Thanks Vivek
http://www.viveksharma.com/techlog/2006/08/20/blog-hiatus-or-how-to-really-enjoy-your-summer/
-
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 ...
-
Okay as a beginner this took a bit of time to perfect so here goes. For some of you hardened programmers this might be a bit basic, but I had to start somewhere. My background is cmd and vbs files with some html chucked in, so this syntax is new to me
Simple IF, Else$a = ''Powershell''
IF ($a -eq ''PowerShell'')
{
''Statement is ...
-
Found this and thought it worthy of sharing. http://www.sapien.com/download.aspx?file=pshhelp
You will download PowerShellHelpSetup.exe. Once installed it will plonk itself under C:\Program Files\SAPIEN Technologies, Inc\PowerShellHelp you will find PowerShellHelp.exe
Enjoy
-
Okay so I am joining the craze and I wanted to start with a list of resources I have discovered so far:
Blog of Windows PowerShell team: http://blogs.msdn.com/powershell/
Windows PowerShell ScriptCenter: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Vivek Sharma: http://www.viveksharma.com/techlog
Glen's Exchange Dev ...
-
Doh
Source: http://vil.nai.com/vil/content/v_140292.htm
MSH/Cibyz!p2p is a proof of concept worm written in Windows Powershell script. It attempts to spread via the popular peer to peer application KaZaa by dropping a copy of itself in its shared folders.
Note: Windows Powershell is a command line shell and ...
-
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.
-
Free eBooklet, you just need to register. You get 28 pages of PDF
Source: http://nexus.realtimepublishers.com/EBMPS.htm
Forget batch files and set your VBScripts aside: There’s a new scripting and automation kid on the block and its name is Microsoft® PowerShell™. Designed from the ground up to be powerful, flexible, ...
-
Well spotted Rui!
Source: http://msmvps.com/blogs/ehlo/archive/2006/06/16/101664.aspx
Microsoft published recently new documents about PowerShell (ex-Monad) and Outlook Voice Access
|
|
|