Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBook
Script Library
Twitter Grid
Featured Posts
Directory
Dreaming in PowerShell
Code MarkUp Tool
December 2008 - Thomas Lee's PowerShell Scripts
Share
|
Recent Posts
Test-FileOpen
New-SpanishCulture.ps1
Show-ChineeseParentCulture.ps1
Show-MessageBox.ps1
Get-PortAndProtocolFromUrl.ps1
Archives
February 2012 (1)
January 2012 (2)
December 2011 (3)
November 2011 (12)
October 2011 (6)
September 2011 (9)
June 2011 (1)
March 2011 (1)
February 2011 (1)
January 2011 (1)
December 2010 (3)
October 2010 (5)
September 2010 (11)
August 2010 (14)
July 2010 (9)
June 2010 (9)
May 2010 (9)
April 2010 (1)
March 2010 (10)
February 2010 (2)
January 2010 (1)
December 2009 (3)
November 2009 (1)
October 2009 (7)
September 2009 (2)
August 2009 (7)
July 2009 (4)
June 2009 (6)
May 2009 (7)
April 2009 (3)
March 2009 (6)
February 2009 (6)
January 2009 (24)
December 2008 (23)
November 2008 (14)
Tags
ADSI
Code
COM
formatting
HNetCfg.FwMgr
Power
PowerShell
PowerShell script
PowerShell Scripts
PowerShell V2
Script
scripts
StdRegProv
System.DateTime
System.Diagnostics.FileVersionInfo
System.Globalization
System.Globalization.CultureInfo
system.net.ipaddress
System.Numerics
System.Security.Cryptography
System.TimeZoneInfo
System.XML.XMLDocument
win32_computersystem
wmi
xml
View more
Sort by:
Most Recent
|
Most Viewed
|
Most Commented
Get-TypeAccelerator.ps1
< # .SYNOPSIS Gets a list of Type Accelerators in PowerShell and displays them nicely .DESCRIPTION This script is based on Osin's blog article and uses the TypeAccelerator class to return the type accelerators contained in PowerShell .NOTES Additional Notes, eg ...
Published
Wed, Dec 31 2008 8:45 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
PowerShell V2
,
Type accelerator
,
System.Management.Automation
Get-StockQuote.ps1
< # .SYNOPSIS Gets stock quotes using a web servoice .DESCRIPTION This function uses the New-WebServiceProxy cmdlet to create a web service proxy. Then it calls that proxy to get stock information. .NOTES File Name : get-stockquote.ps1 ...
Published
Tue, Dec 30 2008 8:37 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
PowerShell V2
,
web service
,
new-webserviceproxy
Validate-EmailAddress.ps1
< # .SYNOPSIS Validates an email address .DESCRIPTION This script uses the New-WebServiceProxy cmdlet to create a web service proxy. Then it calls that proxy to Validate an email address. .NOTES File Name : validate-emailaddress.ps1 ...
Published
Mon, Dec 29 2008 8:27 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
scripts
,
PowerShell V2
,
Script
,
email
,
web service
Get-AutoHelp.ps1
< # .SYNOPSIS A summary of what this script does In this case, this script documents the auto-help text in PowerShell CTP 3 Appears in all basic, -detailed, -full, -examples .DESCRIPTION A more in depth description of the script Should give...
Published
Sun, Dec 28 2008 5:26 AM
by
PowerShell Scripts
Get-Win32Share.ps1
< # .SYNOPSIS Demonstrates WMI and Win32_Share .DESCRIPTION This script looks at objects retured from Get-WMIObject, and [WMICLASS] and demonstrates the use of a static method (create) and a dynamic or object method (delete). .NOTES File Name : Get-Win32Share.ps1 ...
Published
Sat, Dec 27 2008 9:04 AM
by
PowerShell Scripts
Filed under:
wmi
,
win32_share
,
[wmiclass]
Get-Formatstring2.ps1
<# .SYNOPSIS Demonstrates string formatting using Powershell .DESCRIPTION This script formats 2 numbers in a variety of ways, also formats an enum . An adaptation of the C# sample in the MSDN Library. However, this script uses a built- in enum , and displays...
Published
Fri, Dec 26 2008 8:19 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
PowerShell V2
,
Code
,
system.string.format
,
formatting
Get-Format1.ps1
< # .SYNOPSIS Demonstrates simple string formatting using Powershell .DESCRIPTION This script formats 5 numbers in Decimal, Hex and Currency and is an adaptation of the C # sample in the MSDN Library .NOTES Author : Thomas Lee - tfl @psp .co.uk .INPUTTYPE ...
Published
Thu, Dec 25 2008 8:28 AM
by
PowerShell Scripts
Get-EvenNumber.ps1
# Requires –Version:2.0 # Get-EvenNumber.ps1 # Gets an even number # Demonstrates Version 2 functionality # Updates Andget-=y Schneider's example at # http://get-powershell.com/2008/12/23/industrial-strength-functions-in-powershell-v2-ctp-3/ function Get-EvenNumber { #.Synopsis # Detects and reports on even numbers...
Published
Wed, Dec 24 2008 6:55 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
PowerShell V2
,
PowerShell Version 2
,
CTP3. PowerShell
,
Advanced Function
Get-FileCount.ps1
# Get-FileCount.ps1 # Uses shell.application to get a count of files in a folder # Thomas Lee - tfl@psp.co.uk # First get shell object $Shell = new-object -com Shell.Application # Now get folder details and item counts for a folder $foldername = "D:\Foo" $folder = $shell .namespace( $foldername ) if (! $folder ) { "Folder...
Published
Tue, Dec 23 2008 11:26 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
COM
,
shell.application
Get-ParsedString.ps1
# Get-ParsedString.ps1 # MSDN Sample recoded using PowerShell # See: http://msdn.microsoft.com/en-us/library/system.globalization.numberstyles(VS.85).aspx # Thomas Lee - tfl@psp.co.uk # Parse the string as a hex value and display the value as a decimal. $num = "A" $val = [system.int32]::Parse( $num , [System.Globalization.NumberStyles]::HexNumber...
Published
Mon, Dec 22 2008 6:44 AM
by
PowerShell Scripts
Get-RegexTest.ps1
# Get-RegexTest.ps1 # Sample Using PowerShell # Thomas Lee - tfl@psp.co.uk # Define a regular expression for currency values. $rx = New-Object system.text.RegularExpressions.Regex "^-?\d+(\.\d{2})?$" # Define tests $tests = "-42" , "19.99" , "0.001" , "100 USD" , ".34" , "0.34"...
Published
Sun, Dec 21 2008 1:57 PM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
scripts
,
System.Test.RegularExpressisons
,
Reged
Get-FirewallDetails.ps1
# Get-FirewallDetails.ps1 # Gets details of Windows Firewall (on Vista and Server 2008 or later) # Runs on the local machine # Thomas Lee - tfl@psp.co.uk # First create COM object for policy profile and get host name $profile = (new-object -com HNetCfg.FwMgr).LocalPolicy.CurrentProfile $Hostname =hostname # Is firewall enabled? if...
Published
Sat, Dec 20 2008 10:39 AM
by
PowerShell Scripts
Filed under:
Windows Firewall
,
HNetCfg.FwMgr
,
COM
Get-DomainModeEnumValues.ps1
# Get-DomainModeEnumValues.ps1 # Prints out the values of the DomainMode Enum # Thomas Lee - tfl@psp.co.uk # Enumerate System.DirectoryServices.ActiveDirectory.DomainMode $enums =[enum]::GetValues([System.DirectoryServices.ActiveDirectory.DomainMode]) # Display values "System.Net.DirectoryServices.ActiveDirectory.DomainMode enum...
Published
Fri, Dec 19 2008 10:30 AM
by
PowerShell Scripts
Filed under:
System.DirectoryServices.ActiveDireectory
,
Active Directory
,
enum
,
enumeration
,
System.DirectoryServices.ActiveDirectory
,
PowerShell Scripts
,
PowerShell
,
DomainMode
Get-ForestModeEnumValues.ps1
# Get-ForestModeEnumValues.ps1 # Prints out the values of the ForestMode Enum # Thomas Lee - tfl@psp.co.uk # Enumerate System.DirectoryServices.ActiveDirectory.forestmode $enums =[enum]::GetValues([System.DirectoryServices.ActiveDirectory.ForestMode]) # Display values "System.Net.DirectoryServices.ActiveDirectory.Forest mode...
Published
Thu, Dec 18 2008 10:21 AM
by
PowerShell Scripts
Filed under:
enum
,
enumeration
,
System.DirectoryServices.ActiveDirectory
,
PowerShell Scripts
,
PowerShell
,
ForestMode
Get-FSMOHolders.ps1
# Get-FSMOHolders.ps1 # Gets the names of the systems holding the 5 FSMO holders # Runs on a domain-joined machine # Thomas Lee - tfl@psp.co.uk # Get host,forest and domain details $Hostname = hostname $forest = [DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() $domain = [DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain...
Published
Wed, Dec 17 2008 3:41 AM
by
PowerShell Scripts
Filed under:
PowerShell Scripts
,
PowerShell
,
scripts
,
system.directoryservices.activedirectory.domain
,
system.directoryservices.activedirectory.forest
,
ADSI
1
2
Next >
Copyright 2011 PowerShell.com. All rights reserved.