ExecutionPolicy default value is RemoteSigned (#72993)

* ExecutionPolicy default value is RemoteSigned

##### SUMMARY
In Windows setup steps, settings `ExecutionPolicy` is restored to value `Restricted`. But actually default value for Windows server is not `Restricted` but `RemoteSigned` ([source](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1#default)).

I have got issue with `win_dsc` because `ExecutionPolicy` was `Restricted`.

##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr

* Add changelog fragment

* Apply suggestions from code review

Co-authored-by: Sandra McCann <samccann@redhat.com>
pull/73113/head
Jean-Pierre Matsumoto 4 years ago committed by GitHub
parent 418bad7ad4
commit 3074ede8a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- "ansible-doc - In Windows setup steps, ``ExecutionPolicy`` should be restored to default value ``RemoteSigned`` (https://github.com/ansible/ansible/pull/72993)."

@ -49,13 +49,13 @@ This is an example of how to run this script from PowerShell:
&$file -Version 5.1 -Username $username -Password $password -Verbose &$file -Version 5.1 -Username $username -Password $password -Verbose
Once completed, you will need to remove auto logon Once completed, you will need to remove auto logon
and set the execution policy back to the default of ``Restricted``. You can and set the execution policy back to the default (``Restricted `` for Windows clients, or ``RemoteSigned`` for Windows servers). You can
do this with the following PowerShell commands: do this with the following PowerShell commands:
.. code-block:: powershell .. code-block:: powershell
# This isn't needed but is a good security practice to complete # This isn't needed but is a good security practice to complete
Set-ExecutionPolicy -ExecutionPolicy Restricted -Force Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
$reg_winlogon_path = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" $reg_winlogon_path = "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-ItemProperty -Path $reg_winlogon_path -Name AutoAdminLogon -Value 0 Set-ItemProperty -Path $reg_winlogon_path -Name AutoAdminLogon -Value 0

Loading…
Cancel
Save