Showing results for August 2012 - Page 9 of 13 - Scripting Blog [archived]

Aug 11, 2012
Post comments count0
Post likes count0

PowerTip: Displaying Only the Current Year in PowerShell

Doctor Scripto
Doctor Scripto

Summary: Learn how to display only the current year. How can I use Windows PowerShell to display only the current year?

Scripting Guy!Windows PowerShellPowerTip
Aug 11, 2012
Post comments count1
Post likes count0

Weekend Scripter: Use the Windows Task Scheduler to Run a Windows PowerShell Script

Doctor Scripto
Doctor Scripto

Summary: Create a scheduled job to run a Windows PowerShell script that creates an HTML Server uptime report Microsoft Scripting Guy, Ed Wilson, is here. The amount of emails that are generated when attempting to organize and to arrange an event such as PowerShell Saturday is amazing. Every day, it seems, there are nearly a dozen email messages abo...

Scripting Guy!Windows PowerShellWeekend Scripter
Aug 10, 2012
Post comments count0
Post likes count0

PowerTip: Specifying PowerShell Error Actions

Doctor Scripto
Doctor Scripto

Summary: Specify Windows PowerShell error actions. Question: Which command when typed at the beginning of a script will cause Windows PowerShell to ignore errors and continue executing the code? Answer: $erroractionpreference=SilentlyContinue Question: How can I ignore errors for a single command instead of for the entire script? Answer: Use t...

Scripting Guy!Windows PowerShellPowerTip
Aug 10, 2012
Post comments count0
Post likes count0

Use Background Jobs to Run a PowerShell Server Uptime Report

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to use background jobs to run a Windows PowerShell script that produces a server uptime report.  Hey, Scripting Guy! I like your script to get uptime and to get free disk space, but I cannot be responsible for running it on a regular basis. In addition, keep in mind we have a very large ne...

Scripting Guy!Windows PowerShellscripting techniques
Aug 9, 2012
Post comments count0
Post likes count0

PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet

Doctor Scripto
Doctor Scripto

Summary: Use parameters with the Get-WmiObject cmdlet Question: Which parameter of the Get-WMIObject cmdlet takes the place of a WQL where clause? Answer: The filter parameter takes the place of the WQL where clause as shown here: Get-wmiobject win32_logicaldisk –filter “drivetype  =  3” Que...

Scripting Guy!Windows PowerShellPowerTip