Showing results for functions - Scripting Blog [archived]

Aug 10, 2010
1
0

How to Reuse Windows PowerShell Functions in Scripts

ScriptingGuy1
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 function into my new script. Is this the best...

Scripting Guy!Windows PowerShellscripting techniques
Aug 9, 2010
0
0

How Do I Use a Windows PowerShell Script Containing Functions?

ScriptingGuy1
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 it, it did not work. I know that scripts in...

Scripting Guy!Windows PowerShellscripting techniques
Mar 7, 2010
0
0

Hey, Scripting Guy! Weekend Scripter: Fibonnaci Sequence This!

ScriptingGuy1
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 of the golden rules in box design is the so-cal...

Scripting Guy!Windows PowerShellscripting techniques
Mar 6, 2010
0
0

Hey, Scripting Guy! Weekend Scripter: How Much Wood?

ScriptingGuy1
ScriptingGuy1

 Microsoft Scripting Guy Ed Wilson here. I am out in my woodworking shop today, and I am laying out an arch that I will use to create a curved top for a box. I need to know how much wood will be required to make that arch—the radius of the arch. Another use might be to measure for drywall when creating an arch over a door. How do I do th...

Scripting Guy!Windows PowerShellscripting techniques
Feb 27, 2010
0
0

Hey, Scripting Guy! Weekend Scripter: A Function to Calculate Fuel Cost

ScriptingGuy1
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. Bad mistake on her part! I got into the smo...

Scripting Guy!Windows PowerShellscripting techniques