Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

powershell (30) Versions 6.0.0

Installs/Configures PowerShell on the Windows platform

Berkshelf/Librarian
Policyfile
Knife
cookbook 'powershell', '= 6.0.0'
cookbook 'powershell', '= 6.0.0', :supermarket
knife cookbook site install powershell
knife cookbook site download powershell
README
Dependencies
Changelog
Quality

Powershell Cookbook

AppVeyor Build status Cookbook Version

Installs and configures PowerShell 2.0, 3.0, 4.0 or 5.0.

Requirements

Platforms

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

  • Chef 12.6+

Cookbooks

  • 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

Resources

powershell_module

Installs or uninstalls a Powershell module.

Actions

  • :install: install the powershell module
  • :uninstall: uninstall the powershell module

Attribute Parameters

  • name: name attribute. Name of the module to install or uninstall.
  • source: quoted string of Local directory path(Not zipfile) or URL for the zipped module folder.
  • package_name: quoted string of name of the module to install or uninstall.
  • destination: location where module should be installed

Examples

# Install module from local directory path
# change the package_name and source
powershell_module "PsUrl" do
  package_name "PsUrl"
  source "C:\\PsUrl"
end
# Install from URL of zipped module folder
powershell_module "posh-git" do
  package_name "posh-git"
  source "https://github.com/dahlbyk/posh-git/zipball/master"
end
# change the package_name
powershell_module "Uninstall PsUrl" do
  package_name "PsUrl"
  action :uninstall
end
# Install without using 'source' attribute
powershell_module "https://github.com/dahlbyk/posh-git/zipball/master" do
  package_name "posh-git"  
end

Usage

Note: The installation may require a restart of the node being configured before PowerShell can be used.

default

The default recipe contains no resources and will do nothing if included on a run_list.

powershell2

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.

powershell3

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.

powershell4

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.

powershell5

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.

References

License & Authors

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.

powershell Cookbook CHANGELOG

This file is used to list changes made in each version of the powershell cookbook.

6.0.0 (2017-03-20)

  • Add returns property to windows_package resource to ensure compatibility with chef's built-in windows_package resource
  • Require windows 3.0 cookbook

5.2.0 (2017-03-08)

  • Test with Local Delivery instead of Rake
  • Add integration testing in Appveyer on a Windows 2012R2 node and remove the Travis testing
  • Require chef-client 12.6 or later since we're using windows_package

5.1.0 (2016-09-02)

  • Remove the windows_reboot resource which has been removed from the Windows cookbook.

5.0.0 (2016-09-02)

  • Require Chef 12.1 or later
  • Dynamically install rubyzip in the provider. This eliminates the need for the default recipe, which only installed the rubyzip gem. It now just works as expected
  • Test Powershell 2-5 and the custom resource in test kitchen on multiple Windows releases
  • Remove test deps that are in ChefDK from the Gemfile
  • Update the documentation for the powershell recipes to clarify what happens if the platform is not supported

4.0.0 (2016-09-02)

  • Remove support for Windows XP, 2003, 2003 R2, and 2008
  • Remove the powershell provider that was only needed for Chef 10
  • Require a modern windows cookbook release
  • Consistently check platform_family in recipes
  • Use node.normal instead of node.set in specs
  • Switch ruby linting to cookstyle and the new rakefile
  • Rename the minimal recipe to test
  • Avoid deprecation warnings during specs and use doc output
  • Fix a long failing spec so we can get the tests green

v3.3.2 (2016-06-09)

Full Changelog

Merged pull requests:

v3.3.1 (2016-05-27)

Full Changelog

Merged pull requests:

v3.3.0 (2016-05-17)

Full Changelog

Merged pull requests:

v3.2.3 (2015-12-24)

Full Changelog

Merged pull requests:

v3.2.2 (2015-12-18)

Full Changelog

Merged pull requests:

v3.2.1 (2015-12-17)

Full Changelog

Merged pull requests:

v3.2.0 (2015-12-14)

Full Changelog

Merged pull requests:

v3.0.7 (2014-07-16)

Full Changelog

v3.0.6 (2014-07-15)

Full Changelog

v3.0.5 (2014-07-12)

Full Changelog

v3.0.4 (2014-05-10)

Full Changelog

v3.0.2 (2014-04-24)

Full Changelog

v3.0.0 (2014-02-05)

Full Changelog

v2.0.0 (2014-01-03)

Full Changelog

Merged pull requests:

  • [COOK-3330] Only adds the helper on windows (fixes crashes on *nix) #5 (skoczen)

v1.1.2 (2013-08-28)

Full Changelog

Merged pull requests:

1.1.0 (2013-06-15)

Full Changelog

Merged pull requests:

  • fixing foodcritic alerts #3 (ranjib)
  • Add powershell_out mixin for use in LWRPs at compile #2 (moserke)

1.0.8 (2012-11-26)

Merged pull requests:

Collaborator Number Metric
            

6.0.0 passed this metric

Contributing File Metric
            

6.0.0 passed this metric

Foodcritic Metric
            

6.0.0 passed this metric

License Metric
            

6.0.0 passed this metric

No Binaries Metric
            

6.0.0 passed this metric

Publish Metric
            

6.0.0 passed this metric

Supported Platforms Metric
            

6.0.0 passed this metric

Testing File Metric
            

6.0.0 passed this metric

Version Tag Metric
            

6.0.0 passed this metric