-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add support for Windows Management Framework (WMF) 5.1 #106
Comments
@tas50 what do you think about this? I can start WIP PR for wmf5.1. |
As per today announcement https://blogs.msdn.microsoft.com/powershell/2017/03/28/windows-management-framework-wmf-5-1-now-in-microsoft-update-catalog/ WMF5.0 will be removed from Download Center as of June 1, 2017.
I think we should deprecate wmf5.0 in |
There's work progress on this cookbook (and some of it's dependencies) in prep for Chef 13. We can remove wmf 5 support and update to wmf 5.1 as part of that process. |
I'm working on this now. |
@smurawski I'm just testing mwf 5.1 on windows 6.1 and found a nasty bug after powershell 5.1 was installed on windows 7 sp1 (doesn't testing 2008r2 yet). As a workaround # NOTE: add hotfix to Microsoft.powershell bug after WMF5.1 installation
# as Test-Kitchen couldn't connect via WinRM after reboot
if ENV['TEST_KITCHEN']
registry_key 'HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce' do
values [
{ name: '!FixPowershell5', type: :string, data: "C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -ExecutionPolicy Bypass -NonInteractive -Command \"sleep 120; Register-PSSessionConfiguration -Name Microsoft.powershell -Force\"" },
]
only_if { powershell_out("$PSVersionTable.PSVersion.Major").stdout.strip.to_i < 5 }
action :create
end
end
# ensure Microsoft.powershell is enabled after WMF5.1 installation
powershell_script 'Register Microsoft.powershell session configuration' do
code 'Register-PSSessionConfiguration -Name Microsoft.powershell -Force'
not_if '(Get-PSSessionConfiguration -Name microsoft.powershell) -ne $null'
action :run
end
include_recipe 'ms_dotnet::ms_dotnet4'
include_recipe 'powershell::powershell5' |
Here we go # NOTE: add hotfix to Microsoft.powershell bug after WMF5.1 installation
# as Test-Kitchen couldn't connect via WinRM after reboot
cmd = 'C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe'
cmd << " -NoProfile -Executionpolicy Bypass -NonInteractive -Command \"sleep 120;"
cmd << " Register-PSSessionConfiguration -Name Microsoft.powershell -Force\""
if ENV['TEST_KITCHEN']
registry_key 'HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce' do
values [
{ name: '!FixPowershell5', type: :string, data: cmd },
]
only_if { powershell_out('$PSVersionTable.PSVersion.Major').stdout.strip.to_i < 5 }
action :create
end
end
# ensure Microsoft.powershell is enabled after WMF5.1 installation
powershell_script 'Register Microsoft.powershell session configuration' do
code 'Register-PSSessionConfiguration -Name Microsoft.powershell -Force'
not_if '(Get-PSSessionConfiguration -Name microsoft.powershell) -ne $null'
not_if { powershell_out('$PSVersionTable.PSVersion.Major').stdout.strip.to_i < 5 }
action :run
end
include_recipe 'ms_dotnet::ms_dotnet4'
include_recipe 'powershell::powershell5' To workaround not_if { powershell_out('$PSVersionTable.PSVersion.Major').stdout.strip.to_i < 5 } |
The support deadline for WMF 5.0 is a few days away (June 2017). Any news on WMF 5.1? Thanks. |
@smurawski any progress on this issue? can i help with testing? |
Sorry, I got hung up on some other stuff a while back. I'll start back up on this tomorrow and get a release out with 5.1. |
WMF 5.1 has been released few month ago https://blogs.msdn.microsoft.com/powershell/2017/01/19/windows-management-framework-wmf-5-1-released/
I have a question to discuss: what is the best naming convention for new recipe for support wmf 5.1?
powershell51
? Or 5.0 should be depricated?The text was updated successfully, but these errors were encountered: