Skip to content

Import Chef PowerShell module on Windows #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dougireton opened this issue Oct 27, 2015 · 4 comments
Open

Import Chef PowerShell module on Windows #46

dougireton opened this issue Oct 27, 2015 · 4 comments

Comments

@dougireton
Copy link
Contributor

See here:
https://docs.chef.io/knife_node.html#id25

@dougireton dougireton added this to the 2 milestone Jan 7, 2016
@dougireton dougireton modified the milestones: 1.6, 2 Feb 18, 2016
@dougireton dougireton self-assigned this May 4, 2016
@dougireton
Copy link
Contributor Author

This should just happen automatically on PowerShell 3.0+. Let's confirm and then close this issue.

See https://msdn.microsoft.com/en-us/library/dd878284(v=vs.85).aspx

@dougireton dougireton assigned oifland and unassigned dougireton May 11, 2016
@dougireton
Copy link
Contributor Author

dougireton commented May 24, 2016

This doesn't happen automatically and should be added to our PowerShell module.

The normal PowerShell 3.0+ behavior of automatically importing modules doesn't work for the chef module because PowerShell complains that you are masking existing .exes like chef-client.

@webframp
Copy link
Contributor

That's correct. I do this with PS v5:

# Chef
if(Get-Module -ListAvailable chef){
    Import-Module chef -DisableNameChecking
    chef shell-init powershell|iex
}

@dougireton
Copy link
Contributor Author

Cool. Thanks @webframp! I think we'll get this incorporated pretty soon.

@MarkGibbons MarkGibbons modified the milestones: 1.6, 2.0 Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants