February 2010 - Posts

[Powershell] network module

I have grouped all previous network related function into a Powershell module.
The use of modules has several advantages, as auto completion and detailed help is available for the functions.

Get-Ping
Get-Nicinfo
Get-Subnet

you can easily import the module (if the .psm1 file is not located in your powershell profile folder, you need to specify the full path):

   1: import-module network

and retrieve some more information:

   1: get-module network

Posted by scallebaut | with no comments
Filed under: ,

[Powershell] Get-Subnet

The Get-subnet function retrieves the IP and subnet mask from the active network interface.
Using the IP and Subnet mask it will calculate the Subnet for the given computer name.
This function makes use of the Get-Nicinfo function.

   1: function Get-Subnet{
   2:     [CmdletBinding()] 
   3:     PARAM 
   4:     ( 
   5:         [Parameter(Position=1,
   6:                     Mandatory=$false,
   7:                     ValueFromPipeline = $true,
   8:                     Helpmessage="The computer name")] 
   9:         [string]
  10:         $computername="."
  11:     )
  12:     BEGIN
  13:     {
  14:         #set the erroractionpreference to SilentlyContinue. 
  15:         #(We're not concerned about offline machines)
  16:         $erroractionpreference = "SilentlyContinue"
  17:         $result = @()
  18:     }
  19:     PROCESS
  20:     {
  21:         $object = new-object Object
  22:         $object| add-member Noteproperty Name -Value $computername
  23:         #makes use of the Get-Nicinfo function
  24:         $info = Get-Nicinfo -Computername $computername 
  25:         $ip =  $info.IPAddress[0]
  26:         $subnetmask = $info.Subnet[0]
  27:         $object| add-member Noteproperty IP -Value $ip
  28:         $object| add-member Noteproperty subnetMask -Value $subnetmask
  29:     
  30:         $ips = $ip.split(".")   
  31:         $subnetmasks = $subnetmask.split(".")   
  32:         $boundary = $null  
  33:         
  34:         for ($i=0; $i -lt 4; $i++ )   
  35:         {  
  36:             $boundary += [string]($ips[$i] -band $subnetmasks[$i])  
  37:             if($i -lt 3)  
  38:             {  
  39:                 $boundary += "."  
  40:             }  
  41:         } 
  42:         $object| add-member Noteproperty subnet -Value $boundary
  43:         $result +=$object
  44:     }
  45:     END
  46:     {
  47:         $result
  48:     }
  49: }
Posted by scallebaut | with no comments
Filed under: ,

[Powershell] Get-Nicinfo

This function retrieves all available information for a network interface card. The NIC can have multiple adapters.

   1: function Get-NicInfo {
   2:     [Cmdletbinding()]
   3:     PARAM
   4:     (
   5:          [Parameter(Position=1,
   6:                     Mandatory=$false,
   7:                     ValueFromPipeline = $true,
   8:                     Helpmessage="The computer name")] 
   9:         [string]$computername = "localhost",
  10:         [Parameter(Position=2,
  11:                     Mandatory=$false,
  12:                     Helpmessage="Only active adapter information")]
  13:         [boolean]$active = $true            
  14:     )
  15:     BEGIN
  16:     {
  17:         $results = @()
  18:         #set the erroractionpreference to SilentlyContinue. 
  19:         #(We're not concerned about offline machines)
  20:         $erroractionpreference = "SilentlyContinue"
  21:     }
  22:     PROCESS
  23:     {
  24:         $AllAdapters = @("")
  25:         #Check if $Active = $true
  26:         if (-not $active) {
  27:             $Adapters = Get-Wmiobject Win32_NetworkAdapterConfiguration `
  28:             -Computername $computername 
  29:         } 
  30:         else {
  31:             $Adapters = Get-Wmiobject Win32_NetworkAdapterConfiguration `
  32:             -Computername $computername |`
  33:             Where-Object{$_.IPEnabled -eq $True}
  34:         }
  35:         
  36:         #Loop thru all adapters
  37:         ForEach($Adapter In $Adapters)
  38:         {
  39:             [String]$DNSServers = ""
  40:             $Adapters2 = Get-Wmiobject Win32_NetworkAdapter -Computername $pc `
  41:             | Where-Object{$_.Caption -eq $Adapter.Caption}
  42:             [String]$NetID = $Adapters2.NetConnectionID
  43:             If($Adapter.DNSServerSearchOrder -ne $Null)
  44:             {
  45:                 ForEach($Address In $Adapter.DNSServerSearchOrder)
  46:                 {
  47:                     $DNSServers += "[" + $Address + "]"
  48:                 }
  49:             }
  50:             
  51:             $result = new-object object
  52:             $result | add-member Noteproperty PC $pc.ToUpper()
  53:             $result | add-member Noteproperty NETID `
  54:             $NETID
  55:             $result | add-member Noteproperty Description `
  56:             $Adapter.Description
  57:             $result | add-member Noteproperty MACAddress `
  58:             $Adapter.MACAddress
  59:             $result | add-member Noteproperty IPAddress `
  60:             $Adapter.IPAddress
  61:             $result | add-member Noteproperty Subnet `
  62:             $Adapter.IPSubnet
  63:             $result | add-member Noteproperty DHCPEnabled `
  64:             $Adapter.DHCPEnabled
  65:             $result | add-member Noteproperty DHCPServer `
  66:             $Adapter.DHCPServer
  67:             $result | add-member Noteproperty DNSServers `
  68:             $DNSServers
  69:             $result | add-member Noteproperty WINSPrimaryServer `
  70:             $Adapter.WINSPrimaryServer
  71:             $result | add-member Noteproperty WINSSecondaryServer `
  72:             $Adapter.WINSSecondaryServer
  73:             $result | add-member Noteproperty DomainDNSRegistrationEnabled `
  74:             $Adapter.DomainDNSRegistrationEnabled
  75:             $result | add-member Noteproperty FullDNSRegistrationEnabled `
  76:             $Adapter.FullDNSRegistrationEnabled
  77:             $result | add-member Noteproperty WINSEnableLMHostsLookup `
  78:             $Adapter.WINSEnableLMHostsLookup
  79:             
  80:             $results += $result
  81:         }
  82:     }
  83:     END
  84:     {
  85:         return $results
  86:     }
  87: }
Posted by scallebaut | with no comments

[Beta] System Center Configuration Manager Reporting Dashboard

As found on the System Center Team Blog:

The System Center Configuration Manager 2007 Dashboard lets customers utilize a browser based graphically rich reporting experience that showcases the robust reporting capabilities of the world’s leading system management product.  The dashboard will help you stay informed of application and operating system deployments, security updates, system health status and more; whether on the plasma screen in your operations center, or your administrative desktop.

clip_image001_2

Some key benefits of the Dashboard are:

  • Provides dependable, timely access to key information: The dashboard lets you easily stay on top of deployments, security updates, client health, and compliance status. 
  • Easy to install and configure:  The dashboard allows customers to quickly integrate your data in just minutes.  Utilize either the base set of datasets “out of the box” or choose your own.
  • Easy to customize: The dashboard can easily be customized to meet the needs of your different departments.  Any dataset in the Configuration Manager database can be presented on the dashboard, in chart, gauge, and table formats.
  • Flexible & interactive: Administrators can easily filter data and create ad hoc, custom views. Filters allow users to quickly drill down from high-level to more specific data.
  • System Center Configuration Manager Dashboard website link
  • Direct link to the Connect site for the Dashboard beta program
  • Link to send feedback
  • System Center Configuration Manager website
  • [update]

    What does it really look like

    Posted by scallebaut | with no comments

    [Blog] Out of Band Management Support Team Blog

    you've probably already seen a couple posts on AMT and OOB but due to the increasing popularity of this subject we've decided to branch off and start a new blog dedicated solely to using OOB/AMT in SCCM 2007 SP1 and later.  Look for a lot of new stuff on AMT and OOB right here very soon.

    Check the OOB Management Blog!

    Posted by scallebaut | with no comments

    [Beta] Security Compliance Manager version 1.0

    As found on The System Center Team blog:

    Security Compliance Manager version 1.0 provides centralized security baseline management features, a baseline portfolio, customization capabilities, and security baseline export flexibility to accelerate your organization's ability to efficiently manage the security and compliance process for the most widely used Microsoft technologies. Join the beta review program for Security Compliance Manager version 1.0, and get the tools and guidance you need to better balance your organization's needs for security and functionality.

    Direct link: Microsoft Connect
    Complete listing of Solution Accelerators

    Posted by scallebaut | with no comments

    Greening IT

    The IT industry contributes to climate change through consumption of fossil fuels. At the same time however, the IT industry can become green and provide the 'technological fixes' we need to reduce greenhouse gas emissions and thus form a solid base for the Low-Carbon Society.

     

    Today Western economies are largely characterized by service-based economies, sustained by Information and Communication Technologies (ICT). Our economies evolves around ICT: Our public sector is based on it, the financial sector is based on it, the energy sector, the transport system, the education system, the health system - all are largely dependent on Information Technology.

     

    Our societies developed this way, because IT was able to make daily routines easier, quicker and more efficient. IT has optimized a number of processes and has helped society progress.

    Globally IT is responsible for around 2 pct. of the world's emission of greenhouse gases. The IT sector itself contributes, through its massive consumption of energy, to greenhouse gas emissions – and thereby continuously adds to the cause of the problem. At the same time, however, the IT industry can provide the ‘technological fixes’ we need to reduce emissions and form a solid base for the Low-Carbon society. We call this Green IT.

     

    Find the book release on Greening IT

    Posted by scallebaut | with no comments

    [Config Mgr] Configuration Manager 2007 SuperFlows

    As found on Microsoft Technet:

    The SuperFlow interactive content model provides a structured and interactive interface for viewing documentation. Each SuperFlow includes comprehensive information about a specific Configuration Manager 2007 dataflow, workflow, or process. Depending on the focus of the SuperFlow, you will find overview information, steps that include detailed information, procedures, sample log entries, best practices, real-world scenarios, troubleshooting information, security information, animations, or other information. Each SuperFlow also includes links to relevant resources, such as Web sites or local files that are copied to your computer when you install the SuperFlow.

    The following table lists the Configuration Manager 2007 SuperFlows that are available for download.

     

    SuperFlow for Creating SQL Server Reporting Services Report Models in Configuration Manager 2007
    Provides detailed steps that you can use to create a SQL Server Reporting Services report model in Configuration Manager 2007.

    SuperFlow for Configuring Software Updates

    Provides detailed steps that help you to plan for and configure software updates at a site. This SuperFlow also includes troubleshooting information and additional resources that you can use to learn more about configuring software updates in Configuration Manager 2007.

    Software Update Deployment SuperFlow
    Provides information that helps you to prepare for and deploy software updates after you configure the software updates infrastructure and synchronize software updates.

    Software Updates Synchronization SuperFlow
    Provides the detailed dataflow for the software updates synchronization process, additional resources related to software updates synchronization, and troubleshooting information.

    Posted by scallebaut | with no comments

    [Powershell] Windows PowerShell Quick Reference

    Quick reference guide to commonly-used Windows PowerShell commands.
    For best results, open the file in Microsoft Word, print the contents to legal-sized paper (8 inches by 14 inches),
    and fold the resulting printout in half, making a four-page booklet.

    Download the Quick Reference

    Posted by scallebaut | with no comments

    [Powershell] Get-ping

    This is a function that gets the ping result for a certain client.
    The function does only check if the client replies or not. if it replies, the current IP gets displayed.
    Otherwise a “Offline” text will be displayed. This means the Hostname is offline or faulty.

    The function takes a hostname as parameter and makes use of the System.Net.NetworkInformation to get the “ping” information.

       1: function Get-ping {
       2:     [CmdletBinding()] 
       3:     PARAM 
       4:     ( 
       5:         [Parameter(Position=1,
       6:                     Mandatory=$false,
       7:                     ValueFromPipeline = $true,
       8:                     Helpmessage="The computer name")] 
       9:         [string]
      10:         $computername="."
      11:     )
      12:     BEGIN
      13:     {
      14:         $result = @()
      15:         #set the erroractionpreference to SilentlyContinue. 
      16:         #(We're not concerned about offline machines)
      17:         $erroractionpreference = "SilentlyContinue"
      18:     }
      19:     PROCESS
      20:     {
      21:         $object = new-object Object
      22:         $object| add-member Noteproperty PC $computername.ToUpper()    
      23:         $ping = new-object System.Net.NetworkInformation.Ping
      24:         $Reply = $ping.send("$computername")
      25:         if ($Reply.status –eq “Success”) 
      26:         {
      27:                 $object| add-member Noteproperty Status `
      28:                         -Value $reply.Address.IPAddressToString
      29:         }
      30:         else 
      31:         {    
      32:             $object| add-member Noteproperty Status Offline
      33:         }
      34:         #Add the result to the array
      35:         $result += $object
      36:         $object = $null
      37:         
      38:     }
      39:     END
      40:     {
      41:         $result
      42:     }
      43: }

     Get-ping.ps1 (1.65 kb)

    Posted by scallebaut | with no comments

    [Config Mgr] Query to show all clients that do not have a certain package installed

       1: select 
       2: SMS_R_SYSTEM.ResourceID,
       3: SMS_R_SYSTEM.ResourceType,
       4: SMS_R_SYSTEM.Name,
       5: SMS_R_SYSTEM.SMSUniqueIdentifier,
       6: SMS_R_SYSTEM.ResourceDomainORWorkgroup,
       7: SMS_R_SYSTEM.Client 
       8: from SMS_R_System 
       9: where SMS_R_System.ResourceId not in 
      10: (select ResourceId 
      11:  from SMS_FullCollectionMembership 
      12:  where CollectionID = "CollectionID"
      13: )

    Where “CollectionID” is the ID of the collection created in the previous post.
    Posted by scallebaut | with no comments

    [Config Mgr] Query to show all clients that have a certain package installed

     
       1: select 
       2: SMS_R_SYSTEM.ResourceID,
       3: SMS_R_SYSTEM.ResourceType,
       4: SMS_R_SYSTEM.Name,
       5: SMS_R_SYSTEM.SMSUniqueIdentifier,
       6: SMS_R_SYSTEM.ResourceDomainORWorkgroup,
       7: SMS_R_SYSTEM.Client 
       8: from SMS_R_System 
       9: where SMS_R_System.ResourceId in 
      10: (select ResourceID 
      11:  from SMS_G_System_PACKAGESINSTALLED 
      12:  where SMS_G_System_PACKAGESINSTALLED.Application = "PackageName"
      13: )
    Replace the “PackageName” with the actual package name you want to query the reported clients for.

    [ConfigMgr] Hotfix: the memory allocation of Wmiprvse.exe keeps increasing when updating members

    hotfix_iconThe memory allocation for the Wmiprvse.exe process keeps increasing when you update the membership rules of a collection frequently on a computer that is running System Center Configuration Manager 2007 SP1

    Consider the following scenario:

    • You create some collections on a computer that is running Microsoft System Center Configuration Manager 2007 Service Pack 1 (SP1). These collections contain many membership rules.
    • You frequently update these rules by using scripts or by using the Configuration Manager console.
    In this scenario, memory allocation of a Wmiprvse.exe process keeps increasing every time that you update these rules. Additionally, the memory is not released until the Windows Management Instrumentation service is restarted.

    more info on Microsoft support

    [SMS] Compatibility Pack for SMS 2003 SP3 that adds Windows 7 and Windows Server 2008 R2 as supported clients

    hotfixWe recognize that Windows 7 is an opportunity for organizations to reduce their costs, improve security, and improve productivity. Windows 7 helps achieve these goals. However, organizations do not maximize the return on investment of Windows 7 without modern infrastructure to support it.
    We want organizations to benefit from the latest platform's features. To achieve these goals, we want to help organizations migrate to our latest management platform. To do this, we have released a compatibility pack that adds Windows 7 and Windows Server 2008 R2 as supported clients in Microsoft Systems Management Server (SMS) 2003 Service Pack 3 (SP3). This compatibility pack helps SMS 2003 SP3 users migrate their software to Configuration Manager 2007 while realizing immediate benefits from their Windows 7 investment.


    Note This compatibility pack is a one-time offer. We have no plans to offer future compatibility packs to support future versions of Windows on SMS 2003 SP3.
    This compatibility pack does not provide support for the administrator console, for any site server roles, for any SMS 2003 feature pack, or for any SMS 2003 add-in. An example of a feature pack is the Operating System Deployment Feature Pack for Windows 7 or for Windows Server 2008 R2.
    The SMS 2003 Inventory Tool for Microsoft Updates Revision 3 supports software-update deployments to Windows 7 and to Windows Server 2008 R2.

    General information about ITMU Revision 3 (http://technet.microsoft.com/en-us/sms/bb676783.aspx)

    We are releasing this compatibility pack to the general public at no cost. The support life cycle for SMS 2003 ended the Mainstream Support phase on January 12, 2010. SMS 2003 nonsecurity hotfixes that are released after January 12, 2010, follow the Microsoft Lifecycle Support policy and require Extended Hotfix Support.

    General information about the Extended Hotfix Support program

    sms2003

    Microsoft support

    Posted by scallebaut | with no comments

    [Config Mgr] Documentation Library Update for January 2010

    From the Configuration Manager Team Blog:

    The Configuration Manager documentation library (http://technet.microsoft.com/en-us/library/bb680651.aspx) has been updated on the Web and the latest content on the Web has Updated: January 1, 2010 at the top of the topic.

    This month's updates contain an updated support statement that in-band provisioning for AMT-based computers is now supported on client computers running Windows 7.  We have also updated topics to incorporate customer feedback.  We do value customer feedback and try to incorporate it when possible.  Although we can't promise to make the docs perfect for everybody, we are committed to continual improvement.  So, keep that feedback coming, and feel free to contact us about anything related to the documentation by using our usual address of SMSDocs@Microsoft.com

    What's New in the Configuration Manager Documentation Library for January 2010

    The following information lists the topics that contain significant changes since the December 2009 update.

    Configuration Manager 2007 SP2 Supported Configurations

    - Removal of the statement that in-band provisioning is not supported on Windows 7.  This topic also has an updated section about BranchCache, to clarify its integration with Configuration Manager 2007 SP2.

    Certificate Requirements for Native Mode

    - Updated for the client authentication certificate that might be used with an operating system deployment in native mode. This certificate must have a unique value for the Subject Name and unlike the client authentication certificate that is used by native mode clients, it does not support a certificate SAN value.

    Troubleshooting Management Point Communication

    - Updated for clarity and with a warning that before running the MPCERT and MPLIST tests in a native mode site, a certificate must be imported into the browser.

    Overview of Configuration Manager Client Deployment

    - Updated the upgrade installation information with the clarification that you cannot use task sequences to upgrade the Configuration Manager client.

    Configuration Manager 2007 SP2 Upgrade Checklist

    - Updated with the clarification that clients do not automatically upgrade when the site is upgraded, and you must take manual steps to ensure that clients are upgraded. This checklist also has a new step to back up a customized SMS_def.mof prior to the upgrade because this file is overwritten by Setup.

    How to Export Certificates For Use With Operating System Deployment

    - Updated to correct a step out of sequence.

    How to Set a Maintenance Window

    - Updated to clarify how the Maximum allowed run time value is evaluated by maintenance windows.  This clarification is also added to Program Name Properties: Requirements Tab.

    How to Re-run an Advertisement

    - Updated to clarify the differences between original advertisement schedules and those created by the Re-Run Advertisement action.  This clarification is also added to How to Assign a Mandatory Advertisement and the Troubleshooting section "Advertisements Created by Using Rerun Advertisement Might Run at the Wrong Time" in Troubleshooting Software Distribution Issues.

    Modifying the Default Configuration Manager SMS_def.mof File Before Upgrading

    - Updated to clarify that service pack upgrades to the Configuration Manager site removes any custom edits to the SMS_def.mof file. This information is incorporated into the upgrade checklist topics as an additional step to back up a customized SMS_def.mof file for reference before the upgrade, and then edit the SMS_def.mof on the site server after verifying the site upgrade.

    Deployment Package Name Properties: Data Access Tab

    - Updated with the important information that specifying a share distribution folder that is already in use can result in data loss.  This information is also added to the following topics:  Download Updates Wizard: Data Access Page, Boot Image Properties - Data Access Tab, Operating System Images - Data Access Tab, and Operating System Install Packages - Data Access Tab.

    Remove Package Page

    - Updated with the information that the Select Group button is not used in Configuration Manager 2007.

    Troubleshooting Configuration Manager Console Issues

    - Updated the Troubleshooting issue "Error Message: This Function Is Not Supported on This Site System" with a second solution to verify that the account has read and execute permissions on the Configuration Manager installation folder on the site server.

    Configuration Manager Client General Issues

    - Updated for the new Troubleshooting issue "Available Cache Space and Location is Displayed Incorrectly on 64-Bit Configuration Manager Clients".

    Operating System Deployment Task Sequence Variables

    - Updated with the new task sequence variable _SMSTSTimezone.

    Ports Used by Configuration Manager

    - Updated with the clarification that the ports used by the software update point do not have to be the same throughout the hierarchy.

    -- The Configuration Manager Writing Team

    Posted by scallebaut | with no comments
    More Posts Next page »