Sign in
Browse by Tags
TechNet Blogs
»
Hey, Scripting Guy! Blog
»
All Tags
»
functions
Server & Tools Blogs
>
Server & Management Blogs
>
Hey, Scripting Guy! Blog
All About Windows Server
Windows Server
Windows Server Essentials Blog
Partner & Customer Solutions
Ask The
Performance Team
Ask Premier Field Engineering
Ask the Core Team
Cloud OS Blogs
Brad Anderson - In the Cloud
Building Clouds
Server & Cloud
Datacenter Management
The System Center Team Blog
System Center Virtual Machine Manager
System Center Service Manager
System Center Operations Manager
System Center Data Protection Manager
System Center Orchestrator
Partner & Customer Solutions
Client Management
System Center Configuration Manager
System Center Service Manager
MDOP
Malware Protection Center
Windows Intune
SUS
Partner and Customer Solutions
Virtualization, VDI & Remote Desktop
Virtualization Team Blog
Ben Armstrong’s Virtualization Blog
Jose Barreto Blog on Hyper-V
Partner & Customer Solutions
Remote Desktop Services
Windows Multipoint Server
Ask the Core Team on Hyper-V
File & Storage & High Availability
File & Storage
Jose Barreto
Partner & Customer Solutions
Ask the Core Team on Failover Cluster
Clustering & High Availability
Windows Server Management
PowerShell
Hey Scripting Guy (PowerShell)
Server Manager
Group Policy
Networking
Identity & Access
Ask Directory Services
Active Directory Team Blog
Hey, Scripting Guy! Blog
Learn about Windows PowerShell
Live Now on Server & Tools Blogs
Subscribe
Comments
Contact
Menu
Home
Atom
Translate this page
Powered by
Microsoft® Translator
Twitter Feed
Recent Posts
‘Twas the Night of Before Scripting: Part 1
Posted
6 hours ago
by
The Scripting Guys
The Scripting Guys
PowerTip: Debug a Workflow with PowerShell 4.0
Posted
18 hours ago
by
The Scripting Guys
The Scripting Guys
1
Comment
Security Series: Using PowerShell to Enable BYOD–Part 2
Posted
1 day ago
by
The Scripting Guys
The Scripting Guys
PowerTip: Use PowerShell to Discover Console Colors
Posted
1 day ago
by
The Scripting Guys
The Scripting Guys
Tags
2011 Scripting Games
Advanced
Best Practices
Doug Finke
Event 10
files
getting started
Guest Blogger
Modules
retrieving input
running
Scripting Guy!
scripting techniques
Sean Kearney
Shay Levy
string manipulation
Weekend Scripter
Windows PowerShell
WMI
wrap up
Writing
Related Resources
Script Center Home
Scripting Library
Learn to Script
Script Repository
Scripting Forum
2012 Scripting Games
Archives
Archives
December 2013
(46)
November 2013
(60)
October 2013
(65)
September 2013
(61)
August 2013
(63)
July 2013
(63)
June 2013
(69)
May 2013
(68)
April 2013
(61)
March 2013
(62)
February 2013
(56)
January 2013
(62)
December 2012
(62)
November 2012
(68)
October 2012
(62)
September 2012
(62)
August 2012
(63)
July 2012
(32)
June 2012
(39)
May 2012
(33)
April 2012
(97)
March 2012
(44)
February 2012
(31)
January 2012
(31)
December 2011
(31)
November 2011
(30)
October 2011
(31)
September 2011
(30)
August 2011
(31)
July 2011
(31)
June 2011
(30)
May 2011
(31)
April 2011
(97)
March 2011
(41)
February 2011
(28)
January 2011
(31)
December 2010
(31)
November 2010
(30)
October 2010
(31)
September 2010
(30)
August 2010
(33)
July 2010
(31)
June 2010
(30)
May 2010
(67)
April 2010
(65)
March 2010
(34)
February 2010
(29)
January 2010
(23)
December 2009
(23)
November 2009
(22)
October 2009
(23)
September 2009
(22)
August 2009
(25)
July 2009
(24)
June 2009
(38)
May 2009
(22)
April 2009
(22)
March 2009
(22)
February 2009
(20)
January 2009
(22)
December 2008
(8)
November 2008
(17)
October 2008
(9)
September 2008
(8)
August 2008
(6)
July 2008
(5)
June 2008
(21)
May 2008
(21)
April 2008
(22)
March 2008
(21)
February 2008
(21)
January 2008
(22)
December 2007
(10)
November 2007
(20)
October 2007
(23)
September 2007
(19)
August 2007
(23)
July 2007
(21)
June 2007
(21)
May 2007
(22)
April 2007
(21)
March 2007
(22)
February 2007
(21)
January 2007
(21)
December 2006
(11)
November 2006
(20)
October 2006
(22)
September 2006
(20)
August 2006
(23)
July 2006
(20)
June 2006
(22)
May 2006
(22)
April 2006
(20)
March 2006
(23)
February 2006
(20)
January 2006
(21)
December 2005
(16)
November 2005
(20)
October 2005
(21)
September 2005
(21)
August 2005
(23)
July 2005
(20)
June 2005
(22)
May 2005
(21)
April 2005
(21)
March 2005
(22)
February 2005
(20)
January 2005
(21)
December 2004
(16)
November 2004
(20)
October 2004
(21)
September 2004
(21)
August 2004
(22)
More
▼
Less
▲
Tagged Content List
Blog Post:
A PowerShell Function to Count String Length
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, talks about creating a Windows PowerShell function that counts a string length and copies it to the clipboard. Microsoft Scripting Guy, Ed Wilson, is here. It is hot and humid outside—89 degrees Fahrenheit (32 degrees Celsius) and 75% humidity. That...
on
10 Jul 2013
Blog Post:
I Found This Module—What Do I Do?
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, talks about how to use a Windows PowerShell module. Hey, Scripting Guy! I found this module in the Scripting Guys Script Repository. Now what do I do? —SH Hello SH, Microsoft Scripting Guy, Ed Wilson, is here. This morning I have been busy...
on
15 May 2013
Blog Post:
I Found this PowerShell Function—Now What Do I Do? Part 3
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, talks about combining functions into a single function file, and using them in scripts. Microsoft Scripting Guy, Ed Wilson, is here. This morning is sort of mellow. It seems as if the clouds are touching the ground, and all sound is suppressed by a thick...
on
14 May 2013
Blog Post:
I Found this PowerShell Function—Now What Do I Do? Part 2
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, continues his discussion about what to do with a Windows PowerShell function. Microsoft Scripting Guy, Ed Wilson, is here. Last week I did not get a chance to finish answering a question from JB about how to use a Windows PowerShell function. Note This...
on
13 May 2013
Blog Post:
I Found this PowerShell Function—Now What Do I Do? Part 1
The Scripting Guys
Summary : A reader found needed code, but it is contained in a function. Microsoft Scripting Guy, Ed Wilson, provides the scoop about how to use functions. Hey, Scripting Guy! I have some experience with scripting—primarily VBScript script. I also have written a lot of batch files. But recently...
on
8 May 2013
Blog Post:
Named Arguments for PowerShell Functions: Best Practices
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, talks about using named arguments in Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. If I go to the trouble of writing a Windows PowerShell script, I generally do not use unnamed arguments (such as $args as I illustrated yesterday...
on
11 Apr 2013
Blog Post:
Using PowerShell Functions: Best Practices
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, talks about some best practices for using Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. Windows PowerShell functions are really powerful, and at the same time, they are incredibly simple to create. This makes Windows PowerShell...
on
9 Apr 2013
Blog Post:
Weekend Scripter: Cmdletbinding Attribute Simplifies PowerShell Functions
The Scripting Guys
Summary : Microsoft Scripting Guy, Ed Wilson, talks about using the cmdletbinding attribute to simplify Windows PowerShell functions. Microsoft Scripting Guy, Ed Wilson, is here. This morning I was sitting around playing with Windows PowerShell, and I realized that I had not written much about...
on
7 Jul 2012
Blog Post:
PowerShell Pie for Pi Day
The Scripting Guys
S ummary : Use the built in pi value in an impromptu function to get the circumference of a circle by using Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. The Scripting Wife and I are still pretty geeked out from the first ever Windows PowerShell Saturday that was held in Columbus...
on
14 Mar 2012
Blog Post:
Use a PowerShell Function to Find Specific WMI Classes
The Scripting Guys
Summary: Use a Windows PowerShell function to find WMI classes with specific qualifiers. Microsoft Scripting Guy Ed Wilson here. In Thursday’s article , I talked about using the Set-WmiInstance cmdlet to work with WMI classes. One of the parameters, the class parameter, works with WMI singleton...
on
22 Oct 2011
Blog Post:
Use PowerShell Parameter Attributes to Avoid Errors
The Scripting Guys
Summary: Use Windows PowerShell parameter attributes to avoid input errors in a function. Microsoft Scripting Guy Ed Wilson here. This week is great. The Scripting Wife and I are enjoying meeting Windows PowerShell luminaries. I am working with a group of IT pros to help them to learn Windows PowerShell...
on
11 Oct 2011
Blog Post:
Naming and Designing Advanced PowerShell Functions
ScriptingGuy1
Summary : Microsoft Scripting Guy Ed Wilson discusses naming and designing advanced Windows PowerShell functions in relation to his Local User Management Module. Microsoft Scripting Guy Ed Wilson here. The cool thing about today is that it is Canada Day . This means that my boss back in Redmond is...
on
1 Jul 2011
Blog Post:
Create a Truly Advanced PowerShell Function
The Scripting Guys
Summary : Learn how to create a true advanced function that interacts with the Windows PowerShell pipeline. Microsoft Scripting Guy Ed Wilson here. Sean Kearney, Microsoft Windows PowerShell MVP, has been burning up the keyboard lately with ideas for guest blog posts. I hate to disappoint him by not...
on
23 Jun 2011
Blog Post:
Learn How to Use Description Attributes in PowerShell Functions
ScriptingGuy1
Summary : Microsoft Scripting Guy, Ed Wilson, teaches you how to use description attributes to enable a quick retrieval of Windows PowerShell functions. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. Well, the 2011 Scripting Games are nearly completely over. “What?” you...
on
28 May 2011
Blog Post:
Handle Formatted Output in PowerShell
ScriptingGuy1
Summary : Microsoft Windows PowerShell MVP, Doug Finke, illustrates how to handle formatted output in a Windows PowerShell script. Microsoft Scripting Guy, Ed Wilson, is here. Doug Finke is our guest blogger. Doug Finke is a Microsoft PowerShell MVP working for Lab49, a company that builds...
on
13 May 2011
Blog Post:
Best Practice for Using Aliases in PowerShell Scripts
ScriptingGuy1
Summary : Microsoft Scripting Guy, Ed Wilson, discusses the use of aliases in Windows PowerShell scripts. He covers the pros and cons in this blog. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. “You can have my aliases when you pry my cold dead fingers from my keyboard,”...
on
1 May 2011
Blog Post:
Reusing PowerShell Code—What is Best?
ScriptingGuy1
Summary : In this Weekend Scripter blog, Microsoft Scripting Guy, Ed Wilson, discusses considerations for code reuse. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. It has been really fun these past few weeks reviewing all of the scripts that were submitted for the 2011 Scripting...
on
30 Apr 2011
Blog Post:
Expert Solution for 2011 Scripting Games Advanced Event 10: Use a PowerShell Proxy Function to Create Temporary Files
ScriptingGuy1
Summary : Microsoft PowerShell MVP Shay Levy shows how to use a proxy function to easily create temporary files and solve Advanced Event 10 in the 2011 Scripting Games. Microsoft Scripting Guy, Ed Wilson, here. As we wrap up the 2011 Scripting Games today, we have Shay Levy as our expert commentator...
on
29 Apr 2011
Blog Post:
The 2011 Scripting Games Advanced Event 10: Use PowerShell to Create a Function to Create Temp Files
ScriptingGuy1
Summary : Advanced Event 10 in the 2011 Scripting Games uses Windows PowerShell to create an advanced function to create temporary files. About this event Division Advanced Date of Event 4/15/2011 12:15 AM Due Date 4/22/2011 12...
on
15 Apr 2011
Blog Post:
The Function of PowerShell Functions
ScriptingGuy1
Summary: In this how to article, Microsoft Scripting Guy Ed Wilson discusses design considerations for Windows PowerShell functions. Hey, Scripting Guy! I am trying to decide how to configure my Windows PowerShell function. I have heard that functions should return objects, but I am thinking that...
on
29 Dec 2010
Blog Post:
How to Reuse Windows PowerShell Functions in Scripts
ScriptingGuy1
Summary : When writing a Windows PowerShell script, code reuse can speed up the process. Ed Wilson discusses best practices for reusing code. Hey, Scripting Guy! I often write Windows PowerShell scripts, and when I need to use a function that I wrote for a different script, I copy and paste the...
on
10 Aug 2010
Blog Post:
How Do I Use a Windows PowerShell Script Containing Functions?
ScriptingGuy1
Summary : Using a script containing Windows PowerShell functions can be as simple as dot-sourcing the script. Hey, Scripting Guy! I was looking in the Script Center Script Repository for Windows PowerShell scripts, and I found one that was really cool. Unfortunately, when I attempted to use...
on
9 Aug 2010
Blog Post:
Hey, Scripting Guy! Weekend Scripter: Fibonnaci Sequence This!
ScriptingGuy1
Microsoft Scripting Guy Ed Wilson here, it is warming up a bit down here in Charlotte, North Carolina in the United States, and therefore I tend to gravitate outside on weekends. At least, far enough outside to make it to my woodworking shop. Today, I was thinking about building a series of boxes. One...
on
7 Mar 2010
Blog Post:
Hey, Scripting Guy! Weekend Scripter: A Function to Calculate Fuel Cost
ScriptingGuy1
Microsoft Scripting Guy Ed Wilson here. The cool thing about scripting on the weekend is you can take two hours for breakfast, hang out with friends on Facebook and Twitter, and not feel bad about it all. The Scripting Wife headed out with her friend to a rodeo and left me in the kitchen unattended....
on
27 Feb 2010
Blog Post:
Hey, Scripting Guy! How Can I Reuse Functions?
ScriptingGuy1
Hey, Scripting Guy! I have a bunch of functions I wrote in PowerShell that I would like to use in other scripts. I am getting tired of cutting and pasting these things into various scripts over and over again. Surely there has got to be an easier way to do this! Have any ideas? - JB Hi JB, Of course...
on
2 Oct 2008