More CLI and PowerShell

You don’t have to choose between the traditional command line interface (CLI) and PowerShell. You can easily run a PowerShell command or even a PowerShell script directly from a command prompt. This means you can integrate some PowerShell functionality into your older batch files. It also means that you can create a scheduled task to execute a PowerShell script!

Read More

Weather Report

If you’ve been following along in our blogs, you’ve hopefully read my posts about using the SAPI.SPVoice COM object. I’ve been trying to come up with some practical applications. I’ve developed one that gets a weather report for your zip code and delivers the weather to you. The script uses a .NET weblclient object to retrieve an XML page from Yahoo! weather.

Read More

Convert VBScript to PowerShell!

Here’s an AWESOME resource: http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx, the Scripting Guys’ complete guide to VBScript functions… or, more specifically, how to do each VBScript function in Windows PowerShell! It’s available online, or you can download the whole thing as a Word document. For each VBScript function or statement, you’ll see a Windows PowerShell version along with a brief explanation. Not that there’s …

Read More

UPDATED: Happy Holidays – Here’s Our Free Scripting Gift To You!

Happy Holidays from SAPIEN Technologies! In celebration of the season, we’d like to offer you a special gift: A free sampler pack of Snippets to add into PrimalScript (or use independently, if you prefer – they’re just text files)! This 47-Snippet sampler pack includes snippets for VBScript, Windows PowerShell, KiXtart, and even HTAs, and normally retails for $50.00. But if …

Read More

Remote Event Log Filtering

Recently I showed how to use Get-EventLog to filter for recent eventlogs. I like this cmdlet because the output is easy to read. One drawback is that you can’t use the cmdlet to query a remote system. Right now, Get-Wmiobject is one of the few cmdlets that allows you to connect to a remote system. Which is great because we can use WMI to query for Win32_NTLogEvents. One primary challenge here is converting date time into a WMI recognized format.

Read More

PowerShell Event Log Filtering

I recently helped a fellow scripting admin with a PowerShell problem in the ScriptingAnswers.com PowerShell forum. He wanted to get Errors and Warnings that had happened in the last 30 minutes. Using the Get-EventLog cmdlet would seem like the write solution but it takes a little wrangling to get the information you want.

Read More

The Subtle Function

Time for my big epiphany of the week: Why PowerShell functions are so gosh-darned weird. Here?s the deal: Normally, in most programming languages, in order to return a value form a function you have to use a special value. Like, ?Return.? Consider the following example: Function MyFunction() {  $f = 1  Return $f} In fact, this is […]

Read More

Search

Enter any query and press enter
Advanced search operators:
+ ⟶ Term must appear
- ⟶ Term must not appear
"" ⟶ Exact string must appear
How do I use these?

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

Dashboard