Get Network Connections

I love that part of my job is helping people out in the forums as ScriptingAnswers.com. A recent post asked about finding out what network drives were mapped on a remote computer using PowerShell. The task sounded familiar so I poked around my script pile and found an old VBScript that used WMI and the Win32_NetworkConnection class. Great. Get-WMIObject to the rescue:

Get-WMIObject win32_networkconnection -computername Desk23

You even get a nicely formatted summary. But you me, I can’t resist tinkering so I wrote a function that enhances this basic command I call Get-NetConnection

Read More

Show-CSpace

My latest Prof. PowerShell column has a function that takes a computername as pipelined input. It then returns a custom object showing free space on drive C:\. The point of the column was to demonstrate how to make a function behave like a cmdlet and take pipelined input so it’s not necessarily the most glamorous function I’ve ever written.

Anyway, the function got mangled in formatting for the web. This is what it should be…

Read More

Create A Remote File Share

This topic came up recently in the PowerShell forum at ScriptingAnswers.com and I thought you might find it helpful. The issue was creating a file share remotely. In the “olden days”, this would have meant using a command line tool like RMTSHARE, which is really just fine. But if you have a larger workflow, doing it natively in PowerShell may be more desirable.

Let me show you how easy it is to create a file share using Windows Management Instrumentation (WMI). I wrote a function called New-FileShare.

Read More

Special Forces Training coming to Boston

Our Special Forces PowerShell Training Camp will be coming to Boston, April 28-30. We’ll be bivouacking at the Hyatt Harborside Hotel and Resort. It is conveniently near the airport with complementary shuttle so you don’t even need to rent a car. Getting to downtown Boston is a quick water taxi across the harbor. The is […]

Read More

Folder Usage Function

A few days ago I went over the PowerShell oneliner from SAPIEN’s March ’09 newsletter. I suggested using it in a scriptblock to save typing. Another possibility is to turn it into a function. Even better would be a function that accepts pipelined input. This would permit me to pipe in a list of folder names and get a usage object for each one. Here’s how it works.

Read More

iPowerShell brings PowerShell Help to iPhone

SAPIEN Technologies released today the first ever iPhone application for Windows PowerShell users: iPowerShell. The first version of iPowerShell is an easy to use reference tool for users of Microsoft’s PowerShell scripting language. It contains full descriptions of each and every core PowerShell Version 1 cmdlet, their syntax, parameters and examples of proper usage as […]

Read More

March PowerShell Oneliner

In this month’s SAPIEN newsletter I offered a PowerShell oneliner to returns usage information for a specified folder. I don’t have room in the newsletter to go into detail so here is more in-depth coverage of this oneliner. I’ll also have a downlink link at the end.

Read More

Parse HOSTS file with PowerShell

In a recent discussion in the PowerShell forum at ScriptingAnswers.com, a member was trying to parse the HOSTS file on a number of desktops. This is a thankless but probably useful task that seems perfectly suited to a scripted solution. What we came up with was a way to turn entries in the HOSTS file to objects in PowerShell. Once we have an object then we can do all sorts of fun things with it. Here is an enhanced version of the original solution.

Read More

PrimalForms – File Dialog Hangs on Windows Vista SP1 with .Net 3.0 /3.5

Some of our PrimalForms users may have encountered issues with the OpenFileDialog or SaveFileDialog running under Windows Vista. The bad news is that scripts which include OpenFileDialogs or SaveFileDialogs and that previously worked on Windows XP may encounter freezing issues on Vista SP1 systems with .Net 3.0/3.5. The affected scripts will hang when PowerShell executes […]

Read More

Updated Out-Twitter PowerShell Script

Thanks to Christian Glessner for letting me know of a change to the Twitter API.  This necessitated a change in my Out-Twitter script. There’s been a lot of movement in the PowerShell world with Twitter these days.  Be sure to check out the PowerShell tags at TweeterTags and a growing list of PowerShell Twitterers. Even […]

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