Search

You searched for the word(s): userid:3367
Page 1 of 143 (1430 items) 1 2 3 4 5 Next > ... Last »
  • WMI against remote machines

    WMI is a great tool for managing your Windows machines – I’d argue that PowerShell wouldn’t be as powerful as it is without WMI. If you question that remember that 60% of the additional cmdlets in Windows Server 2012 & 2012 R2 are CDXML based i.e. publish a WMI class as  a PowerShell module. PowerShell 2.0 introduced a suite of WMI cmdlets: Get-WmiObject Invoke-WmiMethod Register-WmiEvent Remove-WmiObject Set-WmiInstance PowerShell 3.0 introduced the CIM cmdlets: Get-CimAssociatedInstance
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Wed, Apr 16 2014
    Filed under: PowerShell and WMI, PowerShell V3, PowerShell v4, CIM
  • PowerShell versions

    I’ve been using the CIM cmdlets for a number of posts recently and had a comment that a reader got a message that Get-CimInstance didn’t exist on their Windows 7 machine.  Windows 7 ships with PowerShell 2.0; Windows 8 with PowerShell 3.0 and Windows 8.1 with PowerShell 4.0. You need PowerShell 3.0 or 4.0 to have the CIM cmdlets. You can install PowerShell 3.0 or 4.0 on Windows 7.  You need to go to the Microsoft  download site,  download and install the appropriate version of
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Tue, Apr 15 2014
    Filed under: PowerShell V3, PowerShell v4
  • Status of Office software

    You can also use the SoftwareLicensingProduct CIM class to test the status of your Office products. Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "Name LIKE 'Office%'" | where PartialProductKey | select Name, ApplicationId, LicenseStatus You need to be careful with Office as you might find a lot more options than you expected. On my machine I found this: Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "Name LIKE 'Office%'" | select Name
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Mon, Apr 14 2014
    Filed under: PowerShell and WMI, Office 2010, PowerShell V3, Office 2013, PowerShell v4, CIM
  • Checking license activation

    I’m building some virtual machines for my demo’s at the upcoming PowerShell summit.  To make the demo’s, and setup, more interesting(?) I decided to use some Server Core instances. The usual setup activities become a bit more interesting with Server Core – particular Windows activation.  Windows 2012 R2 will activate itself if the new machine has an Internet connection when it is created. With the GUI version of Windows you can check that Windows is activated using the System applet in
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Sun, Apr 13 2014
    Filed under: PowerShell and WMI, PowerShell V3, Windows Server 2012, PowerShell v4, Windows Server 2012 R2, CIM
  • PowerShell Deep Dive and Save the Children

    I co-edited PowerShell Deep Dives - http://www.manning.com/hicks/ – alongside Jeff Hicks and other PowerShell MVPs.  The book is collection of chapters from  PowerShell experts from around the world. The list of authors includes: Jeffery Hicks, Richard Siddaway, Oisín Grehan, Aleksandar Nikolić, Chris Bellée, Bartek Bielawski, Robert C. Cain, Jim Christopher, Adam Driscoll, Josh Gavant, Jason Helmick, Don Jones, Ashley McGlone, Jonathan Medd, Ben Miller, James O'Neill, Arnaud Petitjean
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Fri, Apr 11 2014
    Filed under: Powershell, Books
  • Requires statement

    A comment was left on my last post stating that the requires keyword could be used to test for modules. Requires is a keyword that can be put at the top of scripts and modules. It will prevent the script or module running if the requirement isn’t met.  You can test for a number of items. This list is for  PowerShell 4.0.  earlier versions of PowerShell have fewer options. PowerShell version: #Requires –version 3 This means that the code will only run on PowerShell version 3 or later
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Thu, Apr 10 2014
    Filed under: PowerShell Basics, PowerShell v4
  • Testing module existence

    I had a comment left on an old post stating that Get-ADuser errored stating it wasn’t a cmdlet.  This is because the module wasn’t loaded or on PowerShell 3 and above available to be auto-imported.  That got me thinking about testing for a modules existence. function test-module { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$name, [Parameter(ParameterSetName='Installed')] [switch]$installed, [Parameter(ParameterSetName='Loaded'
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Wed, Apr 9 2014
    Filed under: Modules, PowerShell V3, PowerShell v4
  • Getting mailbox data and stats per database

    Way back in the day - http://richardspowershellblog.wordpress.com/2007/12/20/list-mailboxes-by-mailbox-database/ - I showed how to list mailboxes by the database in which they were stored.  I had a comment left asking if its possible to list only a specific mailbox and to give the mailbox size as well. To recap: Get-Mailbox will return the list of mailboxes This will quickly show the number of mailboxes per database Get-Mailbox | group Database –NoElement This shows the mailboxes in a particular
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Tue, Apr 8 2014
    Filed under: PowerShell V2, Exchange 2010
  • Finding the class key

    Time to extend our module for investigating CIM.  This time I want to show you how to find the key to the class. You need to know the key property of a CIM class when you perform a number of actions – most particularly when you create an instance of the class. Its just a matter of iterating through the properties of the class to find any that have a qualifier called KEY. function Get-ClassKey { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [Alias("Class")] [ValidateNotNullOrEmpty
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Mon, Apr 7 2014
    Filed under: PowerShell and WMI, PowerShell V3, PowerShell v4, CIM
  • Discovering namespaces part 2

    I recently showed how to use Get-CimInstance to discover the namespaces present in a particular CIM namespace.  I’m going to try to use CIM instaed of WMI but expect the old terminology to creep in occasionally. The function I showed last time will only find the first level of namespaces in a namespace – what if those namespaces contain namespaces. This is where you get to meet the concept of recursion.  In this case all it means is that we’re going to call our function from within the
    Posted to Richard Siddaway's Blog (Weblog) by RichardSiddaway on Fri, Apr 4 2014
    Filed under: PowerShell and WMI, PowerShell V3, PowerShell v4, CIM
Page 1 of 143 (1430 items) 1 2 3 4 5 Next > ... Last »