Tuesday, January 17, 2012

Powershell ScriptCop

I am a fan of Perl Critic the perl tool which gies feedback on your Perl scripts to see if they follow standard conventions, when I read about ScriptCop for PowerShell I downloaded it and tested it out. Seems like a great start to have Perl Critic functions for PowerShell.

Downloaded and copied the files here:

C:\Users\FunkyUser\Documents\WindowsPowerShell\Modules\ScriptCop

Folder Tree
C:\Users\FunkyUser\Documents\WindowsPowerShell\Modules>tree
Folder PATH listing
Volume serial number is 803E-1130
C:.
└───ScriptCop
├───en-us
├───Fixers
├───Patrols
└───Rules

I was then able to use Import-Module ScriptCop.
Finally I used Test-Command Scriptname.ps1 and got some feedback on my code.

I was hoping that I would be able to run a fix and get the indenting corrected, however I didn’t find that function in the existing download.

The Scripting Guy had wrote about ScriptCop, also to note I leared about ScriptCop while looking at Powershell notes on Stack OverFlow.
http://stackoverflow.com/

http://blogs.technet.com/b/heyscriptingguy/archive/2011/07/30/use-scriptcop-to-help-write-better-powershell-scripts.aspx

Tuesday, November 08, 2011

Experts Exchange v .10 is coming!!

I have been an Expert at Experts-Exchange for years. I find answering questions helps me stay up to date. Also asking questions there can help my cut down on time needed to research issues.


Large Experts Exchange VIP Badge

Wednesday, October 26, 2011

Exchange 2010 - Mailbox Repair Request

Good link with details:
http://blogs.technet.com/b/nawar/archive/2010/08/19/exchange-2010-sp1-new-mailboxrepairrequest.aspx

No more ISINTEG. You can run this while online - that enough is reason to upgrade!

Here is the syntax for the mailbox I ran a repair on today.
New-MailboxRepairRequest -mailbox UserName -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview

The link above gives the detailed event ID numbers to search for to see the results.
You need to check the server which has the mailbox database active to see the results, not the machine the cmdlet was run from.

Monday, October 17, 2011

Windows Batch - Gett Variable with formatted Date

Have just spent some time searching for a way to get my preferred date format into a file name.

Year
Month
Date

http://blog.g-ball.com/2010/08/26/year-month-day-date-batch-script/

Wednesday, September 28, 2011

Burn ISO files via command line !!

My favorite cd burner application also support command line use.
This will help me with a script I am working on.

CD Burner XP

Example, takes folder and burns to iso file:
"C:\Program Files\CDBurnerXP\cdbxpcmd.exe" --burn-data -folder:e:\AVDefs\20111024 -iso:E:\AVDefISO20111024.iso

http://cdburnerxp.se/help/Appendices/commandlinearguments

Tuesday, September 27, 2011

Testing TCP Ports with Powershell

Send-MailMessage is a great addition with Powershell version 2.0, it greatly reduces the complexity of send a test SMTP message, including allowing attachments.

Just found a good script to allow testing TCP ports.
http://www.leeholmes.com/blog/2009/10/28/scripting-network-tcp-connections-in-powershell/
Send-TcpRequest.ps1

I was able ot use that script/ example along with
the notes on this page to test access to a proxy.
http://tuxbaby.blogspot.com/2009/04/testing-squid-proxy-via-telnet.html

Exchange 2010 SP1 - Help File

Microsoft released Exchange 2010 Service Pack 1 Help File


Download Link:
http://www.microsoft.com/download/en/details.aspx?id=1573

Exchange 2010 Visio Stencils

Here is the download link for the Exchange 2010 Stencils
http://www.microsoft.com/download/en/confirmation.aspx?id=6977

Wednesday, December 22, 2010

Exchange 2010 and requirement to export csv multivalue properties

EmailAddresses is a multivalue property.


I found the following page to be a great help in getting the fields I wanted exported to csv file.

https://exchangeshare.wordpress.com/2008/12/10/powershell-export-multivalued-properties/



powershell