Skip to content

reformatting About_* for 80 columns - part 3 #1902

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

Merged
merged 7 commits into from
Nov 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
---
ms.date: 2017-06-09
ms.date: 2017-11-28
schema: 2.0.0
locale: en-us
keywords: powershell,cmdlet
title: about_Functions_CmdletBindingAttribute
---

# About Functions CmdletBindingAttribute
## about_Functions_CmdletBindingAttribute


# SHORT DESCRIPTION

Describes the attribute that makes a function work like a
compiled cmdlet.
Describes the attribute that makes a function work like a compiled cmdlet.

# LONG DESCRIPTION

Expand Down Expand Up @@ -124,13 +121,15 @@ to an advanced function.
function Get-Numbers {
[CmdletBinding(SupportsPaging = $true)]
param()

$FirstNumber = [Math]::Min($PSCmdlet.PagingParameters.Skip, 100)
$LastNumber = [Math]::Min($PSCmdlet.PagingParameters.First + $FirstNumber - 1, 100)

$LastNumber = [Math]::Min($PSCmdlet.PagingParameters.First +
$FirstNumber - 1, 100)

if ($PSCmdlet.PagingParameters.IncludeTotalCount) {
$TotalCountAccuracy = 1.0
$TotalCount = $PSCmdlet.PagingParameters.NewTotalCount(100, $TotalCountAccuracy)
$TotalCount = $PSCmdlet.PagingParameters.NewTotalCount(100,
$TotalCountAccuracy)
Write-Output $TotalCount
}
$FirstNumber .. $LastNumber | Write-Output
Expand Down Expand Up @@ -173,8 +172,7 @@ must be included when the parameter is used in a function.
The Position argument of the Parameter attribute takes precedence over the
PositionalBinding default value. You can use the Position argument to specify
a position value for a parameter. For more information about the Position
argument, see about_Functions_Advanced_Parameters
(http://go.microsoft.com/fwlink/?LinkID=135173).
argument, see [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md).

# NOTES

Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
---
ms.date: 2017-06-09
ms.date: 2017-11-28
schema: 2.0.0
locale: en-us
keywords: powershell,cmdlet
title: about_Group_Policy_Settings
---

# About Group Policy Settings
## about_Group_Policy_Settings


# SHORT DESCRIPTION

Describes the Group Policy settings for Windows PowerShell

# LONG DESCRIPTION


Windows PowerShell includes Group Policy settings to help you define
consistent option values for servers in an enterprise environment.

The Windows PowerShell Group Policy settings are in the following
Group Policy paths:

Computer Configuration\Administrative Templates\Windows Components\Windows PowerShell
User Configuration\Administrative Templates\Windows Components\Windows PowerShell
Computer Configuration\
Administrative Templates\
Windows Components\
Windows PowerShell

User Configuration\
Administrative Templates\
Windows Components\
Windows PowerShell

Group policy settings in the User Configuration path take precedence
over Group Policy settings in the Computer Configuration path.

The policies are as follows:

Turn on Script Execution: Sets the Windows PowerShell execution
policy.
Turn on Module Logging: Sets the LogPipelineExecutionDetails
property of modules.
Set the default source path for Update-Help:
Sets the source for UpdatableHelp to
a directory, not the Internet.
- Turn on Script Execution: Sets the Windows PowerShell execution policy.
- Turn on Module Logging: Sets the LogPipelineExecutionDetails property of
modules.
- Set the default source path for Update-Help: Sets the source for
UpdatableHelp to a directory, not the Internet.

To download spreadsheets that list all of the Group Policy settings for
each version of Windows, see "Group Policy Settings Reference for Windows
Expand All @@ -53,28 +55,27 @@ run.
If you enable the policy setting, you can select from among the following
policy settings.

-- "Allow only signed scripts" allows scripts to execute only if they
are signed by a trusted publisher. This policy setting is equivalent
to the AllSigned execution policy.
- "Allow only signed scripts" allows scripts to execute only if they are
signed by a trusted publisher. This policy setting is equivalent to the
AllSigned execution policy.

-- "Allow local scripts and remote signed scripts" allows all local
scripts to run. Scripts that originate from the Internet must be
signed by a trusted publisher. This policy setting is equivalent
to the RemoteSigned execution policy.
- "Allow local scripts and remote signed scripts" allows all local scripts to
run. Scripts that originate from the Internet must be signed by a trusted
publisher. This policy setting is equivalent to the RemoteSigned execution
policy.

-- "Allow all scripts" allows all scripts to run. This policy
setting is equivalent to the Unrestricted execution policy.
- "Allow all scripts" allows all scripts to run. This policy setting is
equivalent to the Unrestricted execution policy.

If you disable this policy setting, no scripts are allowed to run.
This policy setting is equivalent to the Restricted execution policy.
If you disable this policy setting, no scripts are allowed to run. This policy
setting is equivalent to the Restricted execution policy.

If you disable or do not configure this policy setting, the execution
policy that is set for the computer or user by the Set-ExecutionPolicy
cmdlet determines whether scripts are permitted to run. The default
value is Restricted.
If you disable or do not configure this policy setting, the execution policy
that is set for the computer or user by the Set-ExecutionPolicy cmdlet
determines whether scripts are permitted to run. The default value is
Restricted.

For more information, see about_Execution_Policies
(http://go.microsoft.com/fwlink/?LinkID=135170).
For more information, see [about_Execution_Policies](about_Execution_Policies.md).

# TURN ON MODULE LOGGING

Expand All @@ -99,56 +100,54 @@ To turn on module logging for a module, use the following command format.
The module must be imported into the session and the setting is effective
only in the current session.

```powershell
PS C:> Import-Module <Module-Name>
PS C:> (Get-Module <Module-Name>).LogPipelineExecutionDetails = $true
```

To turn on module logging for all sessions on a particular computer,
add the previous commands to the all-users Windows PowerShell profile
($Profile.AllUsers.AllHosts).

For more information about module logging, see about_Modules
(http://go.microsoft.com/fwlink/?LinkID=144311).
For more information about module logging, see [about_Modules](about_Modules.md).

# SET THE DEFAULT SOURCE PATH FOR UPDATE-HELP

The "Set the Default Source Path for Update-Help" policy setting sets a
default value for the SourcePath parameter of the Update-Help cmdlet.
This setting prevents users from using the Update-Help cmdlet to download
help files from the Internet.
default value for the SourcePath parameter of the Update-Help cmdlet. This
setting prevents users from using the Update-Help cmdlet to download help
files from the Internet.

NOTE: The "Set the default source path for Update-Help" Group
Policy setting appears under Computer Configuration and
User Configuration. However, only the Group Policy setting
under Computer Configuration is effective. The Group Policy
setting under User Configuration is ignored.
NOTE: The "Set the default source path for Update-Help" Group Policy setting
appears under Computer Configuration and User Configuration. However, only the
Group Policy setting under Computer Configuration is effective. The Group
Policy setting under User Configuration is ignored.

The Update-Help cmdlet downloads and installs the newest help files for
Windows PowerShell modules and installs them on the computer. By default,
Update-Help downloads new help files from an Internet location specified
by the module.
Update-Help downloads new help files from an Internet location specified by
the module.

However, you can use the Save-Help cmdlet to download the newest help
files to a file system location, such as a network share, and then use
the Update-Help cmdlet to get the help files from the file system
location and install them on the computer. The SourcePath parameter of
the Update-Help cmdlet specifies the file system location.
However, you can use the Save-Help cmdlet to download the newest help files to
a file system location, such as a network share, and then use the Update-Help
cmdlet to get the help files from the file system location and install them on
the computer. The SourcePath parameter of the Update-Help cmdlet specifies the
file system location.

By providing a default value for the SourcePath parameter, this Group
Policy setting implicitly adds the SourcePath parameter to all Update-Help
commands. Users can override the particular file system location specified
as the default value by entering a different file system location. But they
cannot remove the SourcePath parameter from the Update-Help command.
By providing a default value for the SourcePath parameter, this Group Policy
setting implicitly adds the SourcePath parameter to all Update-Help commands.
Users can override the particular file system location specified as the
default value by entering a different file system location. But they cannot
remove the SourcePath parameter from the Update-Help command.

If you enable this policy setting, you can specify a default value for the
SourcePath parameter. Enter a file system location.

If this policy setting is disabled or not configured, there is no
default value for the SourcePath parameter of the Update-Help cmdlet.
Users can download help from the Internet or from any file system
location.
If this policy setting is disabled or not configured, there is no default
value for the SourcePath parameter of the `Update-Help` cmdlet. Users can
download help from the Internet or from any file system location.

For more information, see about_Updatable_Help
(http://go.microsoft.com/fwlink/?LinkID=235801).
For more information, see [about_Updatable_Help](about_Updatable_Help.md).

# KEYWORDS

Expand All @@ -163,13 +162,12 @@ about_GroupPolicy

[about_Updatable_Help](about_Updatable_Help.md)

Get-ExecutionPolicy

Set-ExecutionPolicy
[Get-ExecutionPolicy](../../Microsoft.PowerShell.Security/Get-ExecutionPolicy.md)

Get-Module
[Set-ExecutionPolicy](../../Microsoft.PowerShell.Security/Set-ExecutionPolicy.md)

Update-Help
[Get-Module](../Get-Module.md)

Save-Help
[Update-Help](../Update-Help.md)

[Save-Help](../Save-Help.md)
Loading