Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PowerShell for the home user

17 views
Skip to first unread message

Larry__Weiss

unread,
Nov 2, 2009, 6:22:54 PM11/2/09
to
I'm trying to put together a presentation oriented around PowerShell as it
relates to the home user.

I know this goes against the grain of what PowerShell is primarily designed for,
but I do know a lot of home users who use the cmd.exe based command line, and
would feel motivated in learning PowerShell as a better command line than
cmd.exe provides. I'm one myself.

I did some Google searches and can't find anything with that audience in mind.

Scripts like this one to list all installed applications would seem to be of
interest to everyone, not just admins.

Get-WMIObject Win32_product | sort-object InstallDate | format-table
InstallDate, name -autosize

(I just wonder why that one takes so long to execute).

- Larry

Martin Zugec

unread,
Nov 3, 2009, 3:27:26 AM11/3/09
to
Hi Larry,

based on my experiences, home users are not really good audience for
scripting :(

Most time when I saw home users running script was in case where they
found some scripts on internet ("if you have problems with icon cache
corruption, just run attached file and it should be fixed").

Maybe you should focus on AutoIt examples - this is as far as I
remember most common scripting language among users. Also, you could
have a look at troubleshooting platform in Windows 7 - end users are
the ones that will use it pretty often, so having article about
extensions would be really useful and you could end up with categories
like World of Warcraft ;)

Regarding Win32_Product, it's slow by nature :( You can even see it
from WIndows GUI, where it is queried using separate thread and
results are loaded one by one.

Martin

01MDM

unread,
Nov 3, 2009, 5:29:42 AM11/3/09
to
>    Get-WMIObject Win32_product | sort-object InstallDate | format-table
>       InstallDate, name -autosize
>
> (I just wonder why that one takes so long to execute).

This example too not too fast:

wmic path Win32_product get name, InstallDate

Matter is not in PoSh, and in WMI


Larry__Weiss

unread,
Nov 3, 2009, 10:15:52 AM11/3/09
to
Here's another script that a home user would find handy to get a list of
processes and their main window titles

get-process | where {$_.MainWindowTitle} | Select ID,Name,MainWindowTitle
,StartTime,@{Name="Age";Expression={(get-date) - $_.StartTime }}

It is from the newsletter
http://hosted.verticalresponse.com/172892/1bce65ba62/176000220/7d25da414b/

I need to think more about how PowerShell can be used to manage Windows
applications, and associated file system.

- Larry


Larry__Weiss wrote:
> I'm trying to put together a presentation oriented around PowerShell as
> it relates to the home user.

Thomas Lee

unread,
Nov 3, 2009, 1:49:21 PM11/3/09
to
In message <etxYpNB...@TK2MSFTNGP06.phx.gbl>, Larry__Weiss
<l...@airmail.net> writes

>I'm trying to put together a presentation oriented around PowerShell as
>it relates to the home user.
>
>I know this goes against the grain of what PowerShell is primarily
>designed for, but I do know a lot of home users who use the cmd.exe
>based command line, and would feel motivated in learning PowerShell as
>a better command line than cmd.exe provides. I'm one myself.

There is a clear spectrum of people that you can call home users. My
father in law is in his 80's and if he wanted/needed to, he could learn
PSH in a couple of days.

I am quite sure you are right that some of the computer literate
population could well be motivated to learn PowerShell. But I'd broaden
the scope just a bit. I am sure there are what MS call Information
Workers that might share that motivation.

>I did some Google searches and can't find anything with that audience in mind.

True. Most of the coverage by MVPs and the Product Team, and the other
PowerShell addicts out there have been enterprise admin and dev focused.

Now that I have a bit of time on my hands, I have been considering
finishing up on a blog posts set that I started years ago but never
finished. It's "The Ten Things You have to Know About PowerShell" and
aimed at the beginner.

But there is some background knowledge that is required before
leveraging PowerShell in any meaningful way.

>Scripts like this one to list all installed applications would seem to
>be of interest to everyone, not just admins.
>
> Get-WMIObject Win32_product | sort-object InstallDate | format-table
> InstallDate, name -autosize
>
>(I just wonder why that one takes so long to execute).

In order to actually understand that script, the target learner would
need to know what a Win32_product is. And preferably what WMI is. Some
background in Windows, etc is really needed before PowerShell would make
much sense.

But assuming they have that background, then they need what I call the
holy trinity: cmdlets, objects, and the pipeline. They'd first need to
understand what the Get-WMIObject cmdlet is, and what the parameter
means. Then they have to understand that this cmdlet produces objects
which PowerShell sends, via the pipeline, two more cmdlets which they
also would need to understand.

I think you can do a lot to teach these concepts using animation - I
just wish I was a bit better with PowerPoint.

Oh - and I agree - getting win32_product is slow.

Thomas


--
Thomas Lee
doct...@gmail.com

Larry__Weiss

unread,
Nov 3, 2009, 2:12:44 PM11/3/09
to

Please remember to let us know when new installments of your blog series are
available.

I enjoyed your reactions to my idea to bring PowerShell to a wider audience.
I like the way this might work out. That Microsoft will keep enthusiasm for
PowerShell because of the enormous customer acceptance because of the
huge advances in productivity among corporate customers, and that since
PowerShell is built-in for Win 7, everyone else will have it on hand to gain
access to the inside-story of Windows API's.

- Larry

bluefin

unread,
Nov 3, 2009, 6:13:08 PM11/3/09
to
Hi Larry,

Thomas wrote: '...I did some Google searches and can't find anything
with that audience in mind. True. Most of the coverage by MVPs and the


Product Team, and the other PowerShell addicts out there have been

enterprise admin and dev focused...'

Well, there are 120 scripts which geared towards beginner that
performs basic admins tasks at home or work. You might want to take a
good look at this web site, to use it as a script base for reference.

http://powershell-pudding.blogspot.com/search/label/PowerShell

Cheers!

Larry__Weiss

unread,
Nov 3, 2009, 6:32:50 PM11/3/09
to
Thomas, I just tried your script at
http://pshscripts.blogspot.com/2009/10/get-foldersizeps1.html

and I wonder if line 31 is intact?

It contains
# n] $Size = 0;

- Larry

Larry__Weiss

unread,
Nov 3, 2009, 7:07:15 PM11/3/09
to
A fine collection of PowerShell ideas there. Thanks.

- Larry


bluefin wrote:
> Hi Larry,


> '...I did some Google searches and can't find anything

> with that audience in mind.'

RichS [MVP]

unread,
Nov 5, 2009, 4:54:01 PM11/5/09
to
You can test different scripts for speed using measure-command

Measure-Command -Expression {Get-WmiObject -Class Win32_product | sort
installdate | format-table installdate, name -AutoSize}

in this case the sort won't occur until all the data is returned
--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Larry__Weiss" wrote:

> .
>

Thomas Lee

unread,
Nov 6, 2009, 4:47:47 AM11/6/09
to

In message
<68a56eb8-9728-4a77...@i12g2000prg.googlegroups.com>,
bluefin <desertca...@gmail.com> writes

>Hi Larry,
>
>Thomas wrote: '...I did some Google searches and can't find anything
>with that audience in mind. True. Most of the coverage by MVPs and the
>Product Team, and the other PowerShell addicts out there have been
>enterprise admin and dev focused...'
>
>Well, there are 120 scripts which geared towards beginner that
>performs basic admins tasks at home or work. You might want to take a
>good look at this web site, to use it as a script base for reference.
>
>http://powershell-pudding.blogspot.com/search/label/PowerShell

OK - I missed this site.

:-)
-
as Lee
doct...@gmail.com

Larry__Weiss

unread,
Nov 15, 2009, 9:51:02 PM11/15/09
to
Jeffrey Snover just posted at

http://blogs.msdn.com/powershell/archive/2009/11/15/i-can-do-that-with-1-line-of-powershell-installed-software.aspx

a faster way to get an inventory of installed software.

- Larry

no chance

unread,
Dec 9, 2009, 7:38:07 PM12/9/09
to
I don't know if you're interested in this, but I wrote a (rather
inefficient, I guess) karaoke/jukebox player for my local pub. I'm pleased
with the result, because I was given a very simple criteria to work with,
and built upon it as I taught myself PSH from scratch. My search engine
returns results on 39000 tracks within 1 second (usually).

Please mail me if interested in the scripts and I'll pass them over.


"Larry__Weiss" <l...@airmail.net> wrote in message
news:etxYpNB...@TK2MSFTNGP06.phx.gbl...

0 new messages