PowerShell for Windows Admins


July 28, 2012  3:02 AM

UK PowerShell Group session–31 July 2012 *** CANCELLED

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Next weeks session

http://msmvps.com/blogs/richardsiddaway/archive/2012/07/11/uk-powershell-group-session-31-july-2012.aspx

is CANCELLED due to illness.

I’ll reschedule for late August / early September

July 12, 2012  12:21 PM

PowerShell in Depth Offer

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Would you like a copy of PowerShell in Depth signed by the authors plus a DVD narrated by the authors demoing many of the concepts in the booK? Oh and the book is signed by all three authors and is parted of a limited edition?

You would?

Then visit

http://store.concentratedtech.com/indepth.php

 

Soon.

Its a limited one off offer & when they’re gone – they’re gone


July 11, 2012  12:28 PM

UK PowerShell Group session–31 July 2012

Richard Siddaway Richard Siddaway Profile: Richard Siddaway


When: Tuesday, Jul 31, 2012 7:30 PM (BST)


Where: Virtual

*~*~*~*~*~*~*~*~*~*

Workflow is one of the big new features in PowerShell v3. This session introduces how it works and some of the quirks associated with this new technology

Notes


Richard Siddaway has invited you to attend an online meeting using Live Meeting.
Join the meeting.
Audio Information
Computer Audio
To use computer audio, you need speakers and microphone, or a headset.
First Time Users:
To save time before the meeting, check your system to make sure it is ready to use Microsoft Office Live Meeting.
Troubleshooting
Unable to join the meeting? Follow these steps:

  1. Copy this address and paste it into your web browser:
    https://www.livemeeting.com/cc/usergroups/join
  2. Copy and paste the required information:
    Meeting ID: 25FWNB
    Entry Code: m#@)”)~3M
    Location: https://www.livemeeting.com/cc/usergroups

If you still cannot enter the meeting, contact support

Notice
Microsoft Office Live Meeting can be used to record meetings. By participating in this meeting, you agree that your communications may be monitored or recorded at any time during the meeting.


July 5, 2012  1:08 PM

PowerShell and XenDesktop recording

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

The recording from last nights PowerShell group session – PowerShell and XenDesktop is available from

https://skydrive.live.com/?sc=documents&cid=43cfa46a74cf3e96#cid=43CFA46A74CF3E96&id=43CFA46A74CF3E96%212968&sc=documents

 

The slides and demo are available from

http://www.jonathanmedd.net/2012/07/slides-from-powershell-and-xendesktop-5-session-at-the-uk-powershell-usergroup.html

 

Enjoy


July 3, 2012  11:37 AM

PowerShell and XenDesktop

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

 

Jonathan Medd will be presenting tomorrow @ 8.30 BST on PowerShell and XenDesktop

 

Details from

http://msmvps.com/blogs/richardsiddaway/archive/2012/06/24/reminder-uk-powershell-group-july-2012-meeting.aspx


July 2, 2012  1:40 PM

Free books 27 June 2012

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Want some free ebooks?

Check out

http://social.technet.microsoft.com/wiki/contents/articles/11608.e-book-gallery-for-microsoft-technologies-en-us.aspx#Configure%20Kerberos%20Authentication%20for%20SharePoint%202010%20Products


July 2, 2012  1:34 PM

OMI

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

You may have noticed that I mention WMI from time to time

 

Up to now WMI has been a Windows technology. Powerful but limited to Windows.  WMI has taken a giant step into the big bad world with the creation of OMI – Open Management Infrastructure thats WMI for non-Windows systems

Details are here

http://blogs.technet.com/b/windowsserver/archive/2012/06/28/open-management-infrastructure.aspx

and

https://collaboration.opengroup.org/omi/

Expect more on this in the months to come


June 26, 2012  1:50 PM

Write-Host Wrong!

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Many scripting languages require you explicitly write out to screen – VBScript was an example.

This leads to PowerShell that looks like this

Get-Service |
foreach {
  Write-Host $_.Name, $_.Status
}

This is bad on so many levels.

Firstly you are doing too much work. Secondly you are emitting text not objects. Thirdly you are doing too much work.

Get-Service |
Format-Table Name, Status –AutoSize

gives a much better result and if you are working at the prompt can be aliased to

gsv | ft Name, Status –a

The last act of the pipeline is to pass the data to Out-Default which performs the screen writing.  Write-Host also passes data to Out-Default which effectively terminates the pipeline.

You should always format the data for display as far into the processing as you possibly can. Once you have called a format cmdlet or Write-Host you have terminated the pipeline.

The best you will get is the text representation that would have been displayed on screen. The worst is garbage output.

So if you want to create a HTML report then

Get-Service |
Select Name, Status |
ConvertTo-Html |
Out-File test.htm

Invoke-Item test.htm

Stick with objects and let the pipeline do the work


June 24, 2012  12:58 PM

Reminder–UK PowerShell Group–July 2012 meeting

Richard Siddaway Richard Siddaway Profile: Richard Siddaway


When: Wednesday, Jul 4, 2012 8:30 PM (BST)


Where: Virtual

*~*~*~*~*~*~*~*~*~*

Jonathan Medd will be talking about using PowerShell to administer a XenDesktop environment

Notes


Richard Siddaway has invited you to attend an online meeting using Live Meeting.
Join the meeting.
Audio Information
Computer Audio
To use computer audio, you need speakers and microphone, or a headset.
First Time Users:
To save time before the meeting, check your system to make sure it is ready to use Microsoft Office Live Meeting.
Troubleshooting
Unable to join the meeting? Follow these steps:

  1. Copy this address and paste it into your web browser:
    https://www.livemeeting.com/cc/usergroups/join
  2. Copy and paste the required information:
    Meeting ID: R2TT4R
    Entry Code: Jc-’8JM;W
    Location: https://www.livemeeting.com/cc/usergroups

If you still cannot enter the meeting, contact support

Notice
Microsoft Office Live Meeting can be used to record meetings. By participating in this meeting, you agree that your communications may be monitored or recorded at any time during the meeting.


June 24, 2012  9:05 AM

WMI property names

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A question brought it home to me that WMI property names don’t always mean what you might think they mean – this is also true of other objects but I tripped over this one with WMI so we’ll stick with that.

PS> Get-CimInstance -ClassName Win32_Desktop -Filter "Name LIKE ‘%Richard’" |
>> Format-List ScreenSaver*
>>

ScreenSaverActive     : True
ScreenSaverExecutable : C:\Windows\system32\PhotoScreensaver.scr
ScreenSaverSecure     : True
ScreenSaverTimeout    : 600

 

The ScreenSaverActive property doesn’t mean that the screen saver is currently active – it means that one has been set!   This is doubly confusing because the documentation states

ScreenSaverActive

Data type: boolean
Access type: Read-only

Screen saver is active.

Which would lead you to think that is was actually running!

The ScreenSaverSecure means that a password has been set to unlock the system once the screen saver kicks in & ScreenSaverTimeout is the idle time in seconds before the screen saver kicks in. The executable is the screen saver that will be used.

If you want to get the information with the WMI cmdlets use

PS> Get-WmiObject Win32_Desktop -Filter "Name LIKE ‘%Richard’" |
>> Format-List ScreenSaver*
>>

ScreenSaverActive     : True
ScreenSaverExecutable : C:\Windows\system32\PhotoScreensaver.scr
ScreenSaverSecure     : True
ScreenSaverTimeout    : 600


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: