Tag Archives: Windows Management Framework

IndyPoSh Meeting #18 – Windows PowerShell Basics


Description:

Windows PowerShell is becoming one of the more in-demand skills now that it is built into everything Windows. PowerShell is going to continue growing and it is your time to start learning it! Join us for an evening of Windows PowerShell Basics, we will wrap up for many useful resources that are available to help you continue learning!

Speakers:

Matt Griffin (MCT, MCSA, MCITP, MCTS, MCP) is a Technical Team Lead at Apparatus in Indianapolis, IN. Matt participates in multiple Technology based User Groups including the Indianapolis PowerShell User Group where he is the President. Over the last 6 years while Matt has worked in IT he has touched many technologies ranging from Windows Server, SharePoint, Office 365 and his latest dive into Exchange Hybrid deployments. Matt is also an Author for Pearson Education where he has published a Windows PowerShell Fundamentals LiveLesson. Matt’s primary focus in his IT career is automating every task possible to make management of hundreds if not thousands of systems easier.

Agenda:

6:00 – 6:30 Food | Networking
6:30 – 6:45 Introduction | Announcements | Speaker Introduction
6:45 – 7:45 Presentation
7:45 – 8:00 Giveaways

The current and future state of the Windows Management Framework


At the 2nd of October, Lee Holmes gave a presentation about the current and future state of the Windows Management Framework (WMF) during the Dutch PowerShell User Group (DuPSUG) at the Microsoft headquarters in The Netherlands.

The slide decks and recorded videos will be made available soon, but this is what was discussed:

The release cycle of the Windows Management Framework (WMF)

Faster incremental releases of preview versions are being released. This rapid development means that companies that need specific new functionalities to tackle current problems they’re having, don’t have to wait as long as they had to in the past.

Everyone should keep in mind that documentation for preview versions can be more limited, but should still read the release notes carefully. They contain descriptions of some of the improvements that are discussed in this blog post, but also cover other things that aren’t discussed here. Also be sure to take a look at What’s New in Windows PowerShell at TechNet.

A request from the audience was to include more helpful real-life examples until documentation is fully up-to-date.

 

Desired State Configuration (DSC) partial/split configurations

With DSC partial/split configuration it is possible to combine multiple separate DSC configurations to a single desired state. This could be useful when a company has different people or departments that are responsible for a specific part of the configuration (by example Windows, database, applications).

 

OneGet

OneGet is a Package Manager Manager (it manages package managers). It enables companies to find, get, install and uninstall packages from both internal and public sources. Public repositories can contain harmful files and should be treated accordingly.

Besides the OneGet module included in the Windows Management Framework Preview, updated versions are continuously being uploaded to https://github.com/OneGet/oneget by Microsoft. These can include bug fixes and new functionality like support for more provider types.

While in the past it seemed that Nuget was required, during the PowerShell Summit it was demonstrated that a file share can be used as well.

From the audience a question was raised whether BITS (Background Intelligent Transfer Service) could be used. This is currently not the case and there were also no plans yet to implement it.

 

PowerShellGet

PowerShellGet is a module manager which should make it easier to find the many great modules that are already available, but are not very discoverable because they’re fragmented on numerous websites across the Internet.

Microsoft is currently hosting a gallery of modules. The modules that are available in there are currently being controlled by Microsoft, but this might change in the future.

It is possible to create an internal module source and the save location for modules can be specified as well.

 

PSReadLine

PSReadLine is a bash inspired readline implementation for PowerShell to improve the command line editing experience in the PowerShell.exe console. It includes syntax coloring and CTRL+C and CTRL+V support, for more information about other improvements, view their website.

PSReadLine is one of the modules that can be installed using PowerShellGet:
Find-Module PsReadLine | Install-Module

 

Security

  • Always be careful when running scripts that include Invoke-Expression or its alias iex because it might run harmful code.
    • For a non harmful example, take a look at this blog post by Lee Holmes.
  • Many people in the security community are adopting PowerShell.
  • PowerShell is done in memory and is therefore volatile. To improve security the following enhancements were introduced:
    • Transcript improvements
      • Transcript support was added to the engine so it can used everywhere, also in the Integrated Scripting Environment (ISE).
      • A transcript file name automatically includes the computer name.
      • Transcript logging can be enforced to be redirected to another system.
      • Transcription can be enforced by default.
  • Group Policy
    • An ADMX file is currently not available to configure it on all platforms, but it can be found in the technical preview versions of Windows 10 and Windows Server under: Administrative Templates -> Windows Components -> Windows PowerShell
  • More advanced Scriptblock logging
    • Enable ScriptBlockLogging through GPO (in later Windows versions) or by registry by setting EnableScriptBlockLogging to 1 (REG_DWORD) in: HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging
    • The additional logging will show you what code was run and can be found in event viewer under Applications and Services Logs\Microsoft\Windows\PowerShell\Operational.
    • Scriptblocks can be split across multiple event log entries due to size limitations.
    • Using Get-WinEvent -FilterHashTable it is possible to get related events, extract the information and combine it.
    • Since attackers would want to remove these registry settings and clear event logs, consider using Windows Event Forwarding/SCOM ACS to store this information on another server. Also consider enabling cmdlet logging.
  • Just Enough Admin (JEA)
    • JEA enables organizations to provide operators with only the amount of access required to perform their tasks.

 

New and improved functionality and cmdlets

 

Manage .zip files using Expand-Archive and Compress-Archive

.zip files can be managed using Compress-Archive and Expand-Archive. Other archive types like .rar are not currently supported, but this might be added in future versions.

 

New-Item

It is now not necessary anymore to specify the item type. To create a new item, simply run
New-Item foo.txt

 

Get-ItemPropertyValue

This makes it easier to get the value of a file or registry:

  • Get-ItemPropertyValue $Env:windir\system32\calc.exe -name versioninfo
  • Get-ItemPropertyValue-PathHKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\ScriptedDiagnostics -Name ExecutionPolicy

 

Symbolic links support for New-Item, Remove-Item and Get-ChildItem

Symbolic link files and directories can now be created using:

  • New-Item -ItemType SymbolicLink -Path C:\Temp\MySymLinkFile.txt -Value $pshome\profile.ps1
  • New-Item -ItemType SymbolicLink -Path C:\Temp\MySymLinkDir -Value $pshome

Junctions cannot currently be created, but this might also be added in a later version.

 

Debugging using Enter-PSHostProcess and Exit-PSHostProcess

Let you debug Windows PowerShell scripts in processes separate from the current process that is running in the Windows PowerShell console (by example long running or looping code). Run Enter-PSHostProcess to enter, or attach to, a specific process ID, and then run Get-Runspace to return the active runspaces within the process. Run Exit-PSHostProcess to detach from the process when you are finished debugging the script within the process.

 

Use Psedit to edit files in a remote session directly in ISE

Simply open a new PSSession to a remote computer and type PSEdit <path to a file>.

 

Classes and other user-defined types

    • The goal is to enable a wider range of use cases, simplify development of Windows PowerShell artifacts (such as DSC resources), and accelerate coverage of management surfaces.
    • Classes are useful for structured data. Think by example about custom objects that you need to change afterwards.
    • Name of the class and the constructor must be the same.
    • Code is case insensitive.
    • In classes, variables are lexically scoped (matching braces) instead of dynamically scoped.
    • Every return must be explicit.
    • Sample code:

Class MyClass
{
  MyClass($int1, $int2)
   {
        “In the constructor”
   }
   [int]$Property1
   [DateTime]$Property2
   [int]MyHelper($param1)
   {
       return 42
   } 
}

 

 

 

 

 

 

 

IndyPoSh Meeting #9 – What’s New in PowerShell v4


Description:

The November meeting of the Indianapolis PowerShell User Group will present an introduction to PowerShell 4.0. We will discuss new features in PowerShell 4.0 that ship with Server 2012 R2 and Windows 8.1 including Desired State Configuration (DSC), enhancements to the integrated Scripting Environment (ISE) and PowerShell Web Access and more.
In addition we will discuss installing Windows Management Framework 4.0 on Windows 7 SP1, Server 2008 R2 and later systems to bring the new features of PowerShell 4.0 to these operating systems.

Speaker:

John Gullion is a veteran of 18 years in the IT industry. He began his IT career in the mid 90’s working with UNIX, Linux and Windows while supporting dial up internet users and administering smtp mail and nntp news servers. Joining the staff of Indiana University in 2001, John began working with Active Directory and is an accomplished Windows Server and Desktop administrator with expertise in Group Policy Management and PowerShell.

John is a Microsoft Certified Trainer and holds a number of Microsoft and industry certifications including MCSA Server 2012, MCSA Windows 8, MCITP SQL 2008 and  VMWare Certified Professional.

Agenda:

6:00 – 6:30 Food | Networking
6:30 – 6:45 Introduction | Announcements | Speaker Introduction
6:45 – 7:45 Presentation
7:45 – 8:00 Giveaways

WMF compatibility


The Windows Management Framework 3.0 has been released as a Windows update.

However there are some compatibility issues as documented on the PowerShell team blog.  if you haven’t see the post it here

http://blogs.msdn.com/b/powershell/archive/2012/12/20/windows-management-framework-3-0-compatibility-update.aspx

Windows Management Framework 3.0 Compatibility Update


Windows Management Framework (WMF) 3.0, (currently distributed as KB2506146 for Windows Server 2008 SP2 and KB2506143, for Windows 7 SP1 and Windows Server 2008 R2 SP1) has been temporarily removed from Windows Update to protect from accidental installations on unsupported systems. Those who want to install WMF 3.0 to take advantage of all the great features this update provides can do so by installing the update from the Microsoft Download Center, after reading the known compatibility issues detailed below.

Background:

Windows Management Framework (WMF 3.0) was released to the Download Center on September 17, 2012. On December 11, 2012,this package was released through Windows Update. Although it was released as an optional update, many customers chose to deploy the package automatically.  Because there are compatibility issues between some released server applications and WMF 3.0, we have temporarily removed WMF 3.0 from Windows Update. This should prevent customers from inadvertently installing the package on unsupported systems.

 

Known Compatibility Issues:

Windows Management Framework 3.0 (WMF 3.0) is not currently compatible with the following applications.

-         System Center 2012 Configuration Manager

http://support.microsoft.com/kb/2796086  (Configuration Manager Management Points collocated with clients fail after installing Windows Management Framework 3.0 and running Client Health Evaluation)

-         System Center Virtual Machine Manager

http://support.microsoft.com/kb/2795043 (Managing Hyper-V hosts using Virtual Machine Manager fails with Error: 0x8033803b after installing WMF 3.0)

-         Microsoft Exchange Server 2007 and Microsoft Exchange Server 2010

http://blogs.technet.com/b/exchange/archive/2012/12/14/windows-management-framework-3-0-on-exchange-2007-and-exchange-2010.aspx (Windows Management Framework 3.0 on Exchange 2007 and Exchange 2010)

-         Microsoft SharePoint 2010

http://connect.microsoft.com/PowerShell/feedback/details/746908/powershell-3-0-and-sharepoint-2010  (Windows PowerShell 3.0 and SharePoint 2010)

-         Windows Small Business Server 2008 and Windows Small Business Server 2011

http://blogs.technet.com/b/sbs/archive/2012/12/15/windows-management-framework-3-0-applicability-on-windows-small-business-server-2008-2011-standard.aspx  (Windows Management Framework 3.0 applicability on Windows Small Business Server 2008/2011 Standard)

 

Systems that are running the above server applications should not run Windows Management Framework 3.0 at this time. WMF 3.0 is otherwise supported on Windows 7 SP1, Windows Server 2008 R2 SP1, and Windows Server 2008 SP2.

 

Windows Management Framework 3.0 Compatibility Update


Windows Management Framework (WMF) 3.0, (currently distributed as KB2506146 for Windows Server 2008 SP2 and KB2506143, for Windows 7 SP1 and Windows Server 2008 R2 SP1) has been temporarily removed from Windows Update to protect from accidental installations on unsupported systems. Those who want to install WMF 3.0 to take advantage of all the great features this update provides can do so by installing the update from the Microsoft Download Center, after reading the known compatibility issues detailed below.

Background:

Windows Management Framework (WMF 3.0) was released to the Download Center on September 17, 2012. On December 11, 2012,this package was released through Windows Update. Although it was released as an optional update, many customers chose to deploy the package automatically.  Because there are compatibility issues between some released server applications and WMF 3.0, we have temporarily removed WMF 3.0 from Windows Update. This should prevent customers from inadvertently installing the package on unsupported systems.

 

Known Compatibility Issues:

Windows Management Framework 3.0 (WMF 3.0) is not currently compatible with the following applications.

-         System Center 2012 Configuration Manager

http://support.microsoft.com/kb/2796086  (Configuration Manager Management Points collocated with clients fail after installing Windows Management Framework 3.0 and running Client Health Evaluation)

-         System Center Virtual Machine Manager

http://support.microsoft.com/kb/2795043 (Managing Hyper-V hosts using Virtual Machine Manager fails with Error: 0x8033803b after installing WMF 3.0)

-         Microsoft Exchange Server 2007 and Microsoft Exchange Server 2010

http://blogs.technet.com/b/exchange/archive/2012/12/14/windows-management-framework-3-0-on-exchange-2007-and-exchange-2010.aspx (Windows Management Framework 3.0 on Exchange 2007 and Exchange 2010)

-         Microsoft SharePoint 2010

http://connect.microsoft.com/PowerShell/feedback/details/746908/powershell-3-0-and-sharepoint-2010  (Windows PowerShell 3.0 and SharePoint 2010)

-         Windows Small Business Server 2008 and Windows Small Business Server 2011

http://blogs.technet.com/b/sbs/archive/2012/12/15/windows-management-framework-3-0-applicability-on-windows-small-business-server-2008-2011-standard.aspx  (Windows Management Framework 3.0 applicability on Windows Small Business Server 2008/2011 Standard)

 

Systems that are running the above server applications should not run Windows Management Framework 3.0 at this time. WMF 3.0 is otherwise supported on Windows 7 SP1, Windows Server 2008 R2 SP1, and Windows Server 2008 SP2.

 

Windows Management Framework 3.0 Available for Download


We hope that you’ve been enjoying all of the great new Windows PowerShell 3.0 features in Windows Server 2012. We wanted to make sure that everyone knows the final release of Windows Management Framework 3.0 is also available for download from the Microsoft Download Center.

Windows Management Framework 3.0 makes much of the same great management functionality from Windows Server 2012 available to earlier versions of Windows. Windows Management Framework 3.0 allows you to install Windows PowerShell 3.0 (including a new version of WMI and WinRM) on the following Operating Systems:

  • Windows 7 Service Pack 1 (32-bit & 64-bit)
  • Windows Server 2008 R2 Service Pack 1 (64-bit only, includes Server Core) 
  • Windows Server 2008 Service Pack 2 (32-bit & 64-bit)

 

Note: You must uninstall any of the pre-release packages of Windows Management Framework prior to installing the final release.

 

Travis Jones [MSFT]
Program Manager – Windows PowerShell
Microsoft Corporation

Windows Management Framework 3.0 Available for Download


We hope that you’ve been enjoying all of the great new Windows PowerShell 3.0 features in Windows Server 2012. We wanted to make sure that everyone knows the final release of Windows Management Framework 3.0 is also available for download from the Microsoft Download Center.

Windows Management Framework 3.0 makes much of the same great management functionality from Windows Server 2012 available to earlier versions of Windows. Windows Management Framework 3.0 allows you to install Windows PowerShell 3.0 (including a new version of WMI and WinRM) on the following Operating Systems:

  • Windows 7 Service Pack 1 (32-bit & 64-bit)
  • Windows Server 2008 R2 Service Pack 1 (64-bit only, includes Server Core) 
  • Windows Server 2008 Service Pack 2 (32-bit & 64-bit)

 

Note: You must uninstall any of the pre-release packages of Windows Management Framework prior to installing the final release.

 

Travis Jones [MSFT]
Program Manager – Windows PowerShell
Microsoft Corporation

Windows Management Framework 3.0 RC is Available for Download


Yesterday we published an RC version of the Windows Management Framework 3.0.

Windows Management Framework 3.0 RC makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 RC can be installed on the following Operating Systems:

  • Windows 7 Service Pack 1 (32-bit & 64-bit)
  • Windows Server 2008 R2 Service Pack 1 (64-bit only) – Server Core now supported with the RC release.
  • Windows Server 2008 Service Pack 2 (32-bit & 64-bit) –

 

Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The package also includes a CIM provider that allows you to collect management data from servers with Windows Management Framework 3.0 installed with the new Server Manager in Windows Server 2012 RC

 

Feedback & Bugs
We welcome any feedback or bug submissions to the Windows PowerShell Connect site: http://connect.microsoft.com/PowerShell. The release notes for Windows Management Framework 3.0 RC include a list of user submitted Connect bugs that have been fixed since Windows Management Framework 3.0 Beta.

 

Additional Information:
Release notes are available on the download page. They contain important information about changes since Windows PowerShell 2.0 and a list of known issues.

You must uninstall any other copies of Windows Management Framework 3.0 before installing Windows Management Framework 3.0 RC.

This software is a pre-release version. Features and behavior are likely to change before the final release.

Check out the two blog posts about PowerShell 3.0 written by Jeffrey Snover on the Windows Server blog this week: Part I & Part II.

 

Travis Jones [MSFT]
Program Manager – Windows PowerShell
Microsoft Corporation

Windows Management Framework 3.0 RC is Available for Download


Yesterday we published an RC version of the Windows Management Framework 3.0.

Windows Management Framework 3.0 RC makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 RC can be installed on the following Operating Systems:

  • Windows 7 Service Pack 1 (32-bit & 64-bit)
  • Windows Server 2008 R2 Service Pack 1 (64-bit only) – Server Core now supported with the RC release.
  • Windows Server 2008 Service Pack 2 (32-bit & 64-bit) –

 

Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The package also includes a CIM provider that allows you to collect management data from servers with Windows Management Framework 3.0 installed with the new Server Manager in Windows Server 2012 RC

 

Feedback & Bugs
We welcome any feedback or bug submissions to the Windows PowerShell Connect site: http://connect.microsoft.com/PowerShell. The release notes for Windows Management Framework 3.0 RC include a list of user submitted Connect bugs that have been fixed since Windows Management Framework 3.0 Beta.

 

Additional Information:
Release notes are available on the download page. They contain important information about changes since Windows PowerShell 2.0 and a list of known issues.

You must uninstall any other copies of Windows Management Framework 3.0 before installing Windows Management Framework 3.0 RC.

This software is a pre-release version. Features and behavior are likely to change before the final release.

Check out the two blog posts about PowerShell 3.0 written by Jeffrey Snover on the Windows Server blog this week: Part I & Part II.

 

Travis Jones [MSFT]
Program Manager – Windows PowerShell
Microsoft Corporation

Windows Management Framework 3.0 Beta Available for Download


Yesterday we published a Beta version of the Windows Management Framework 3.0.

Windows Management Framework 3.0 Beta makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 Beta can be installed on the following Operating Systems:

  • Windows 7 Service Pack 1 (32-bit & 64-bit)
  • Windows Server 2008 R2 Service Pack 1 (64-bit only)
  • Windows Server 2008 Service Pack 2 (32-bit & 64-bit) – NEW! Beginning with this Beta release.

 

Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The Beta version also includes a Server Manager CIM provider. This CIM provider allows users of Server Manager in Windows Server “8” to collect and view management data from servers with Windows Management Framework 3.0 installed.

 

Feedback & Bugs
We welcome any feedback or bug submissions to the Windows PowerShell Connect site: http://connect.microsoft.com/PowerShell. The release notes include a list of user submitted Connect bugs that have been fixed since Windows Management Framework 3.0 Community Technology Preview #2.

 

Additional Information:
Release notes are available on the download page. They contain important information about changes since Windows PowerShell 2.0 and a list of known issues.

You must uninstall any other copies of Windows Management Framework 3.0 before installing Windows Management Framework 3.0 Beta.

This software is a pre-release version. Features and behavior are likely to change before the final release.

 

Travis Jones [MSFT]
Program Manager – Windows PowerShell
Microsoft Corporation

Windows Management Framework 3.0 Beta Available for Download


Yesterday we published a Beta version of the Windows Management Framework 3.0.

Windows Management Framework 3.0 Beta makes some updated management functionality available to earlier versions of Windows. Windows Management Framework 3.0 Beta can be installed on the following Operating Systems:

  • Windows 7 Service Pack 1 (32-bit & 64-bit)
  • Windows Server 2008 R2 Service Pack 1 (64-bit only)
  • Windows Server 2008 Service Pack 2 (32-bit & 64-bit) – NEW! Beginning with this Beta release.

 

Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI and WinRM. The Beta version also includes a Server Manager CIM provider. This CIM provider allows users of Server Manager in Windows Server “8” to collect and view management data from servers with Windows Management Framework 3.0 installed.

 

Feedback & Bugs
We welcome any feedback or bug submissions to the Windows PowerShell Connect site: http://connect.microsoft.com/PowerShell. The release notes include a list of user submitted Connect bugs that have been fixed since Windows Management Framework 3.0 Community Technology Preview #2.

 

Additional Information:
Release notes are available on the download page. They contain important information about changes since Windows PowerShell 2.0 and a list of known issues.

You must uninstall any other copies of Windows Management Framework 3.0 before installing Windows Management Framework 3.0 Beta.

This software is a pre-release version. Features and behavior are likely to change before the final release.

 

Travis Jones [MSFT]
Program Manager – Windows PowerShell
Microsoft Corporation