Installs and configures PowerShell 2.0, 3.0, 4.0 or 5.0.
Not every version of Windows supports every version of Powershell. The following table illustrates Powershell support across the Windows family. Included means that the base installation of the operating system includes the indicated version of Powershell.
Windows Version | PowerShell 2.0 | PowerShell 3.0 | PowerShell 4.0 | PowerShell 5.0 |
---|---|---|---|---|
Windows Server 2008 R2 | Included | Supported | Supported | Supported |
Windows Server 2012 / Windows 8 | Included | Included | Supported | Supported |
Windows Server 2012R2 / Windows 8.1 | Included | Not Available | Included | Supported |
- Chef 13+
- windows 3.0+
PowerShell also requires the appropriate version of the Microsoft .NET Framework to be installed, if the operating system does not ship with that version. The following community cookbooks are used to install the correct version of the .NET Framework:
- ms_dotnet
The powershell_module
has been removed from this cookbook as it was non-functional for most needs and has been replaced with built in resources in chef:
Note: The installation may require a restart of the node being configured before PowerShell can be used.
The default recipe contains no resources and will do nothing if included on a run_list.
Include the powershell2
recipe in a run list, to ensure PowerShell 2.0 is installed. If the platform is not supported, a warning will be logged.
Include the powershell3
recipe in a run list, to install PowerShell 3.0 is installed on applicable platforms. If the platform is not supported, a warning will be logged.
Include the powershell4
recipe in a run list, to install PowerShell 4.0 is installed on applicable platforms. If the platform is not supported, a warning will be logged.
Include the powershell5
recipe in a run list, to install PowerShell 5.0 is installed on applicable platforms. If the platform is not supported, a warning will be logged.
- Installing Windows Management Framework 2.0
- Installing Windows Management Framework 3.0
- Installing Windows Management Framework 4.0
- Installing Windows Management Framework 5.0
- Author:: Seth Chisamore ([email protected])
- Author:: Julian Dunn ([email protected])
Copyright:: 2011-2016, Chef Software, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.