PowerShell for Windows Admins:

January, 2012


January 28, 2012  2:51 PM

Naming Contexts



Posted by: Richard Siddaway
Active Directory, PowerShell, WMI

Continuing our quick look at The ActiveDirectory name space lets have a look at the MSAD_NamingContext  class

Get-WmiObject -Namespace root\MicrosoftActiveDirectory -Class MSAD_NamingContext |

Format-Table DistinguishedName, IsFullReplica –AutoSize

 

...

January 28, 2012  10:20 AM

Active Directory and WMI



Posted by: Richard Siddaway
Active Directory, PowerShell v2, WMI

A lot of the Active Directory related functionality has been removed from WMI but  there is a little bit left in the root\MicrosoftActiveDirectory namespace.

This is on a Windows 2008 R2 domain controller – I don’t know if this is available on down level versions of Windows.

...


January 27, 2012  2:10 PM

PowerShell Deep Dive 2012



Posted by: Richard Siddaway
Deep dive, PowerShell

The 2012 PowerShell Deep Dive has been announced  - April 29 – May 2 in San Diego.

Bookmark and Share     0 Comments     RSS Feed     Email a friend


January 26, 2012  4:09 PM

Integer sizes



Posted by: Richard Siddaway
PowerShell

 

If you’ve used PowerShell for any time you will be away of [int] meaning integer. One common use is in functions to define a parameter’s data type

function test1 {
param (
  [int]$a,
  [int]$b
)
$a * $b


January 24, 2012  4:34 PM

Remoting between PowerShell v3 CTP 2 and PowerShell v2



Posted by: Richard Siddaway
PowerShell 3, PowerShell v2, Windows 2008 R2, Windows 7

One of the questions on tonight’s Live Meeting concerned the compatibility between remoting on PowerShell v2 and PowerShell v3 CTP 2

The difference is that v3 uses a WSMAN 3.0 stack but v2 uses 2.0

I used two machines:

  • Windows 2008 R2 SP 1 with PowerShell...


January 24, 2012  4:07 PM

Recording–UK PowerShell group January 2012



Posted by: Richard Siddaway
PowerShell 3, User Group

The recording of tonight’s meeting together with the slides and demo scripts are available from

Bookmark and Share     0 Comments     RSS Feed     Email a friend


January 23, 2012  1:24 PM

Get-CimClass



Posted by: Richard Siddaway
PowerShell 3, WMI

Get-CimClass is used to dig into the information available within a WMI class.

At its most basic level we get a set of information like this

PS> Get-CimClass -ClassName Win32_OperatingSystem | fl *


  Bookmark and Share     0 Comments     RSS Feed     Email a friend


January 22, 2012  7:58 AM

January meeting reminder



Posted by: Richard Siddaway
PowerShell 3, User Group

Just a quick reminder that on Tuesday 24 January the UK PowerShell Group presents a Live Meeting looking at PowerShell v3 CTP2

 

Details from here

Bookmark and Share     0 Comments     RSS Feed     Email a friend


January 21, 2012  7:28 AM

SMART disk failure data



Posted by: Richard Siddaway
Disks, PowerShell, WMI

We can access the SMART disk failure data using

Get-WmiObject -Namespace root\wmi -Class MSStorageDriver_FailurePredictData

 

The important properties are:

Active           : True


January 20, 2012  2:58 PM

SMART disks



Posted by: Richard Siddaway
Disks, PowerShell, WMI

A question on the forum about using WMI to work with SMART disks got my digging into the subject.  SMART disks - http://en.wikipedia.org/wiki/S.M.A.R.T – detect and report on disk problems...


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: