Skip to content

Merging latest updates to Live #2013

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 174 commits into from
Jan 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
2a3ccf3
Update the example of `Where-Object -IsNot` (#1841)
matt9ucci Nov 7, 2017
f778a37
Update Example 5 in Group-Object.md (#1845)
matt9ucci Nov 8, 2017
1357977
removing @{Text=} tags
Nov 7, 2017
efba651
fixing UTF8 characters
Nov 7, 2017
b93a6ba
removed empty H3
Nov 7, 2017
ec505bf
added H3 for input and output types
Nov 7, 2017
c2abb44
removed mangled UTF8 character
Nov 8, 2017
bbffd77
updating Out-* commands with -NoNewLine per Issue 1739
Nov 9, 2017
2bdb9e6
Fix the example of `Format-Table -DisplayError` (#1848)
matt9ucci Nov 9, 2017
61cb77d
Fix the example of `Format-Wide -DisplayError` (#1850)
matt9ucci Nov 10, 2017
882b0e8
Fix the example of `Format-Custom -DisplayError` (#1849)
matt9ucci Nov 10, 2017
67db02a
updating set-acl docs per PR#901
Nov 7, 2017
9799c2b
using semantic link breaks
Nov 10, 2017
a5f21c5
Fix the example of `Format-Wide -ShowError` (#1851)
matt9ucci Nov 13, 2017
9467262
Fixed Test-ScriptFileInfo example (#1852)
alan-null Nov 13, 2017
b5d12a3
fixing issue 1768
Nov 7, 2017
b04197f
Formatting, example fix for Body parameter (#1847)
ebrucucen Nov 13, 2017
b6b156a
fixing style consistency across articles
Nov 13, 2017
e03a354
fixing conflicts
Nov 13, 2017
07b21b0
Fix example numbers in Resume-Job.md (#1857)
matt9ucci Nov 14, 2017
348ed70
Fixes typo $WebSiteName in separatingEnvData.md (#1856)
DexterPOSH Nov 14, 2017
b04a75a
Updates configurations.md (#1855)
DexterPOSH Nov 14, 2017
484d598
Fix typo in comment (#1854)
ciriarte Nov 14, 2017
e46d3a1
Merge pull request #1846 from sdwheeler/sdw-issue1739
zjalexander Nov 14, 2017
f42a62f
Updating the help content for v6. (#1853)
adityapatwardhan Nov 15, 2017
eade8e4
Fix example numbers in about_Transactions.md (#1859)
matt9ucci Nov 15, 2017
518fde2
Update Alias-Provider.md (#1831)
doctordns Nov 15, 2017
248e283
Add documentation of new -AsHashtable switch for ConvertFrom-Json int…
bergmeister Nov 15, 2017
bcedaf0
Fix example numbers in Invoke-WebRequest.md (#1862)
matt9ucci Nov 16, 2017
8e4ac81
Merge branch 'live' into staging
Nov 16, 2017
1f54577
reformatting and integrating changes from PR#1831 (#1860)
Nov 16, 2017
aeeb091
Fix example numbers in Get-Help.md (#1869)
matt9ucci Nov 17, 2017
83b1241
Fix example numbers in Import-Module.md (#1868)
matt9ucci Nov 17, 2017
99be9ad
Fix example number in ConvertTo-Html.html (#1867)
matt9ucci Nov 17, 2017
919d940
Update dscCiCd.md (#1865)
tomlarse Nov 17, 2017
cb00730
Web Cmdlets 6.0.0 Documentation Refresh (#1870)
markekraus Nov 18, 2017
6e31c85
Merge Example 4 and 5 in Get-Member.md (#1874)
matt9ucci Nov 18, 2017
cc018bf
Remove hash algorithms unsupported in v6.0 (#1873)
matt9ucci Nov 19, 2017
b98aa67
Update outputs of Get-Verb (#1872)
matt9ucci Nov 19, 2017
1b2889e
Fix typo in ConvertTo-Html.md (UTF-x) (#1879)
matt9ucci Nov 20, 2017
4fec39b
Fix "Accept wildcard characters" in Get-Service.md v6 (#1878)
matt9ucci Nov 20, 2017
061245d
Fixed Get-WindowsFeature cmdlet HyperLink (#1877)
keeratsingh Nov 20, 2017
496832f
Update Get-WinEvent.md (#1876)
doctordns Nov 20, 2017
c644c38
Update Example 8 in Get-Process.md (find the owner of a process) (#1875)
matt9ucci Nov 20, 2017
58b15dd
updated localmachine\Root to LocalMachine\My (#1880)
rchaganti Nov 20, 2017
69c037d
Update Group property example in Get-Verb.md (#1881)
matt9ucci Nov 21, 2017
d69465e
adding missing space (#1885)
mairaw Nov 21, 2017
a066c77
removing stray character (#1886)
mairaw Nov 21, 2017
bf70ac9
Update Example 9 in Get-Process.md (#1888)
matt9ucci Nov 22, 2017
6687a84
Remove "About ISE" files of v6.0 (#1891)
matt9ucci Nov 27, 2017
23afc78
Update Get-Process.md (#1890)
doctordns Nov 27, 2017
5a8d5f4
Update productincompat.md (#1892)
Cloud-Writer Nov 27, 2017
46d7c99
Update unapproved verbs examples in Get-Verb.md (#1896)
matt9ucci Nov 28, 2017
a88c947
Removing extra space in the Example 5A script (#1894)
vrnithinkumar Nov 28, 2017
a2d0e9b
fixing merge conflict
Nov 28, 2017
f0f0da0
resolving conflict
Nov 28, 2017
d395d0e
updates to style and contrib
Nov 16, 2017
d4d446d
tweak format
Nov 16, 2017
67ad296
tweak format 2
Nov 16, 2017
7883844
fix typo
Nov 16, 2017
b4877f3
fix number list example
Nov 16, 2017
9e6ebd0
adding review feedback
Nov 22, 2017
323e325
fix broken links
Nov 22, 2017
e6b4a53
incorporating feedback from zach
Nov 27, 2017
7514fcf
reformatting About_* for 80 columns - part 1
Nov 27, 2017
66ecafd
reformat about_*
Nov 28, 2017
56dc2df
reformatting About_* topics - Part 2
Nov 28, 2017
d310e14
fixing broken links
Nov 28, 2017
e084dc5
fixing more broken links
Nov 28, 2017
05ff294
more broken links fixed
Nov 28, 2017
a935671
Fix parameter's position in Get-Random.md (#1901)
matt9ucci Nov 29, 2017
9040d65
Fix parameter's position in Measure-Command.md (#1905)
matt9ucci Nov 30, 2017
c715ab2
Fix parameter's position in Trace-Command.md (#1904)
matt9ucci Nov 30, 2017
6824d85
Actually call the configuration in the example (#1906)
charlesbihis Nov 30, 2017
cece485
reformatting About_* for 80 columns - part 3 (#1902)
Nov 30, 2017
877c2cc
reformatting About_* for 80 columns - part 4
Nov 30, 2017
1e0c256
Adding PreRelease versioning info for PSGallery & PSGet (#1903)
Dec 1, 2017
38d64d4
Style tweaks in STYLE.md (#1913)
SamB Dec 2, 2017
c6f3f13
Fix YAML metadata on "Understanding Concepts" (#1911)
SamB Dec 2, 2017
92e1b1b
Fix parameter's position in Join-Path.md (#1909)
matt9ucci Dec 2, 2017
b71d428
typo correction on line 85 (#1916)
J0F3 Dec 4, 2017
4e6505f
Fix parameter's position in Get-TraceSource.md (#1917)
matt9ucci Dec 4, 2017
a935850
Changed required PSGet version to 1.6.0 (#1920)
Dec 4, 2017
96504e3
Update Example 5 in Get-Process.md (#1923)
matt9ucci Dec 5, 2017
f586a98
fixing backlashes reported in PR1921 (#1924)
Dec 5, 2017
a08dbd5
Merge branch 'live' into staging
Dec 5, 2017
66349ff
reformatting About_* for 80 columns - part 5
Dec 1, 2017
6424e0d
reformatting About_* for 80 columns - part 6
Dec 1, 2017
03211c6
incorporating review feedback
Dec 4, 2017
a0b952c
reformatting About_* for 80 columns - part 7
Dec 2, 2017
bbe8f07
Fixed formatting of output per issue #808
Dec 4, 2017
eb2a12b
Merge branch 'live' into staging
Dec 5, 2017
6976ff4
Fix typo in syntax description (#1931)
TheSecretSquad Dec 6, 2017
6712f85
Fix parameter's position in ConvertTo-Xml.md (#1929)
matt9ucci Dec 6, 2017
6686c23
Remove descriptions about ComputerName parameter in Get-Process.md v6…
matt9ucci Dec 6, 2017
a0b2502
Line 192 Single Quote Breaks Example (#1930)
YuriySamorodov Dec 6, 2017
00a2675
Update Example 2 in Get-Alias.md (ineffective Exclude) (#1935)
matt9ucci Dec 7, 2017
010d9e5
Fix formatting: DESCRIPTION section in ConvertTo-Xml.md (#1934)
matt9ucci Dec 7, 2017
89de813
Fix typo in Unregister-ScheduledJob (#1932)
wemyss Dec 7, 2017
59ff97e
Fix parameter's position in ConvertFrom-Csv.md (#1937)
matt9ucci Dec 8, 2017
d428986
fix typo on metaConfig.md (#1936)
Dec 8, 2017
c070f79
Quick edits (#1938)
Dec 8, 2017
5119bda
Update Get-Item.md (#1942)
skycommand Dec 11, 2017
54a3de4
Add description about Format-Hex -InputObject (#1939)
matt9ucci Dec 11, 2017
4e663d6
Fix parameter's position in Add-Member.md (#1946)
matt9ucci Dec 12, 2017
2342a7e
Fix parameter's position in Select-Object.md (#1945)
matt9ucci Dec 12, 2017
7e23ff9
Correcting add to hash table example (#1944)
Koshersalt Dec 12, 2017
7009825
Merge branch 'live' into staging
Dec 12, 2017
4e99941
Fix Set-TraceSource -ListenerOption parameter (#1949)
matt9ucci Dec 13, 2017
85a3adb
Fix Trace-Command -ListenerOption parameter (#1948)
matt9ucci Dec 13, 2017
ba3ae32
Fix parameter's position in Select-Xml.md (#1953)
matt9ucci Dec 14, 2017
e9721d2
Fix Get-Alias -Name parameter (#1952)
matt9ucci Dec 14, 2017
41dc145
Wmf 5.1 cleanup (#1950)
Dec 14, 2017
c11cc97
Typo fix ("you will are not" -> "you will not"). (#1951)
relsqui Dec 14, 2017
8be92ec
added article about formatting code samples
Dec 14, 2017
52c3d1d
fixing typos
Dec 14, 2017
da136b5
fixed typos and incorporated feedback
Dec 14, 2017
7f1bfb6
updating metadata tags in docfx.json
Dec 14, 2017
4a0e687
Merge pull request #1954 from sdwheeler/sdw-codestyle
joeyaiello Dec 14, 2017
f190e9d
Merge pull request #1955 from sdwheeler/sdw-metafix
joeyaiello Dec 14, 2017
ff9fc52
Merge branch 'live' into staging
Dec 14, 2017
d0b75bb
fixing filename spelling
Dec 14, 2017
8c303f1
Fix parameter's position in Get-Content.md (#1959)
matt9ucci Dec 15, 2017
2dffaff
Fix parameter's position in Get-Member.md (#1958)
matt9ucci Dec 15, 2017
fa5064b
Update PSGallery "Items Tab" (for the new prerelease feature) (#1957)
matt9ucci Dec 15, 2017
8190bfc
Fix link for about_WorkflowCommonParameters in New-PSWorkflowExecutio…
matt9ucci Dec 18, 2017
9cfd38a
Fix link for about_Types.ps1xml in Update-TypeData.md (#1961)
matt9ucci Dec 18, 2017
219e848
Fix parameter's position in Group-Object.md (#1966)
matt9ucci Dec 19, 2017
91a778c
Fix hex values in about_Arithmetic_Operators.md (#1965)
matt9ucci Dec 19, 2017
7569a34
Indent headers as subheaders (#1967)
lavahot Dec 19, 2017
a6c39a2
Update minor typo in Limit-EventLog.md (#1968)
DannyMeister Dec 19, 2017
4dfa90f
Update Example 3 in Get-FileHash.md (#1969)
matt9ucci Dec 20, 2017
9603e0f
Fix parameter's position in Tee-Object.md (#1970)
matt9ucci Dec 20, 2017
45517f9
fixing output example per issue 1933
Dec 20, 2017
4c8ad5c
fix -Path metadata to reflect wildcard support
Dec 20, 2017
7f07ed2
fixing issue 1640
Dec 20, 2017
e3d2746
fixing issue 1651
Dec 20, 2017
83a1f36
Merge pull request #1974 from sdwheeler/sdw-issue1651
joeyaiello Dec 20, 2017
9fea401
Merge pull request #1973 from sdwheeler/sdw-issue1640
joeyaiello Dec 20, 2017
703bce7
Merge pull request #1972 from sdwheeler/sdw-issue1672
joeyaiello Dec 20, 2017
700455e
Merge pull request #1971 from sdwheeler/sdw-issue1933
joeyaiello Dec 20, 2017
2247085
Fix link for about_Remote_Requirements (#1976)
matt9ucci Dec 21, 2017
2f7bd31
Split parameter set in Sort-Object.md v6.0 (#1975)
matt9ucci Dec 21, 2017
bfb1184
Merge branch 'live' into staging
Dec 21, 2017
1854c4d
Fix link for about_Preference_Variables (#1982)
matt9ucci Dec 22, 2017
34e0059
Fix broken headers in Get-CimSession.md v6.0 (#1981)
matt9ucci Dec 22, 2017
bd76183
Update Example 1 in Import-Counter.md (#1980)
matt9ucci Dec 22, 2017
ce0b7c1
move $OFS to prefs article added note about read-only (#1978)
Dec 22, 2017
4ff282e
Merge branch 'live' into staging
Dec 22, 2017
62d8b8a
Update decisionMaker.md (#1984)
rockygiglio Dec 30, 2017
6a1218a
Update configurations.md (#1985)
bradh Dec 30, 2017
ccb1710
Fix parameter's position in Restart-Service.md (#1993)
matt9ucci Jan 2, 2018
8eca7bc
Fix link for logical operators in about_Operator_Precedence.md (#1992)
matt9ucci Jan 2, 2018
272aa18
Update scriptResource.md (#1986)
bradh Jan 2, 2018
c454e5d
Bad link (#1988)
fullenw1 Jan 2, 2018
cb095ea
Update Example 1 of Protect-CmsMessage (#1987)
BladeFireLight Jan 2, 2018
8d405c1
Small edits for mispellings (#1989)
hintbw Jan 2, 2018
e777b83
Corrected command (#1990)
Jan 2, 2018
d0b6eb8
removing module ref for modules that do not ship in v6-rc2 (#1996)
Jan 2, 2018
160ba5e
Fix parameter's position in Resume-Service.md (#1998)
matt9ucci Jan 3, 2018
0e1efd4
Fix link for about_Providers (#1999)
matt9ucci Jan 3, 2018
ea3e851
Merge branch 'live' into staging
Jan 3, 2018
b1a95ce
Help doc enhancement for ConvertFrom-StringData cmdlet (#2002)
kvprasoon Jan 3, 2018
fa96dbb
PowerShell 6 logging on Windows, Linux, and MacOS (#1922)
dantraMSFT Jan 3, 2018
1ed352f
Adding calling the ComputerName parameter to the example (#1964)
mbreakey3 Jan 3, 2018
43ba68f
Removed unused variable in Example 1 (#2004)
Jan 4, 2018
308c233
Made surrounding text agree with sample code. (#2003)
regexaurus Jan 4, 2018
a2607ed
Reformatting v4 About_ topics missed in first pass (#2006)
Jan 4, 2018
e740350
Reformatting v3 About_ topics missed in first pass (#2005)
Jan 4, 2018
98f2b8a
Reformatting v5 About_ topics missed in first pass (#2008)
Jan 4, 2018
95d4005
v5.1 about scrub missed files (#2009)
Jan 4, 2018
c4bc861
Reformatting v6 About_ topics missed in first pass (#2010)
Jan 4, 2018
6c34220
final pass on About_ topic reformat (#2011)
Jan 5, 2018
27973f4
Merge branch 'live' into staging
Jan 5, 2018
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
2 changes: 1 addition & 1 deletion dsc/configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Configuration MyDscConfiguration {
}
}
}
MyDscConfiguration
MyDscConfiguration -ComputerName <MyComputer>

```

Expand Down
2 changes: 0 additions & 2 deletions dsc/scriptResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ Script [string] #ResourceName

## Example 1
```powershell
$version = Get-Content 'version.txt'

Configuration ScriptTest
{
Import-DscResource –ModuleName 'PSDesiredStateConfiguration'
Expand Down
663 changes: 358 additions & 305 deletions reference/3.0/Microsoft.PowerShell.Core/About/about_Debuggers.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ The environment variables that store preferences include:
The default value of $Env:PSModulePath is:

```
$home\Documents\WindowsPowerShell\Modules; $pshome\Modules
$HOME\Documents\WindowsPowerShell\Modules; $PSHOME\Modules
```

Windows PowerShell sets the value of "\$pshome\\Modules" in the registry. It
sets the value of "\$home\\Documents\\WindowsPowerShell\\Modules" each time you
Windows PowerShell sets the value of "\$PSHOME\\Modules" in the registry. It
sets the value of "\$HOME\\Documents\\WindowsPowerShell\\Modules" each time you
start Windows PowerShell.

In addition, setup programs that install modules in other directories, such as
Expand Down Expand Up @@ -294,7 +294,7 @@ $path = [System.Environment]::GetEnvironmentVariable("PSModulePath",
```

For more information about the methods of the System.Environment class, see
[Environment Methods](http://go.microsoft.com/fwlink/?LinkId=242783) in
[Environment Methods](https://go.microsoft.com/fwlink/?LinkId=242783) in
MSDN.

You can add also add a command that changes the value to your profile or use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ all the values in an array, consider using a Foreach statement.
The following shows the For statement syntax.

```powershell
for (>init>; <condition>; <repeat>)
for (<init>; <condition>; <repeat>)
{<statement list>}
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,83 +1,77 @@
---
ms.date: 2017-06-09
ms.date: 2018-01-03
schema: 2.0.0
locale: en-us
keywords: powershell,cmdlet
title: about_Functions_Advanced_Methods
---

# About Functions Advanced Methods
## about_Functions_Advanced_Methods

## SHORT DESCRIPTION

# SHORT DESCRIPTION

Describes how functions that specify the `CmdletBinding` attribute can use
the methods and properties that are available to compiled cmdlets.
Describes how functions that specify the `CmdletBinding` attribute can use the
methods and properties that are available to compiled cmdlets.

# LONG DESCRIPTION

Functions that specify the `CmdletBinding` attribute can access a number of
methods and properties through the `$pscmdlet` variable. These methods
include the following methods:
methods and properties through the `$pscmdlet` variable. These methods include
the following methods:

- Input-processing methods that compiled cmdlets use to do their work.

- The `ShouldProcess` and `ShouldContinue` methods that are used to get
user feedback before an action is performed.

user feedback before an action is performed.
- The `ThrowTerminatingError` method for generating error records.

- Several Write methods that return different types of output.

All the methods and properties of the `PSCmdlet` class are available to
advanced functions. For more information about these methods and
properties, see `System.Management.Automation.PSCmdlet` in the MSDN
(Microsoft Developer Network) library at
http://go.microsoft.com/fwlink/?LinkId=142139.

# Input Processing Methods

The methods described in this section are referred to as the input
processing methods. For functions, these three methods are represented
by the `Begin`, `Process`, and `End` blocks of the function. Each function
must include one or more of these blocks. The Windows PowerShell runtime
uses the code within these blocks when it is running a function. (These
blocks are also available to functions that do not use the `CmdletBinding`
attribute.)

## Begin
advanced functions. For more information about these methods and properties,
see [`System.Management.Automation.PSCmdlet`](http://go.microsoft.com/fwlink/?LinkId=142139) in the MSDN library.

### Input Processing Methods

The methods described in this section are referred to as the input processing
methods. For functions, these three methods are represented by the `Begin`,
`Process`, and `End` blocks of the function. Each function must include one or
more of these blocks. The Windows PowerShell runtime uses the code within
these blocks when it is running a function. (These blocks are also available
to functions that do not use the `CmdletBinding` attribute.)

#### Begin

This block is used to provide optional one-time preprocessing for the
function. The Windows PowerShell runtime uses the code in this block one
time for each instance of the function in the pipeline.

## Process
This block is used to provide record-by-record processing for the
function. This block might be used any number of times, or not at all,
depending on the input to the function. For example, if the function is
the first command in the pipeline, the `Process` block will be used one
time. If the function is not the first command in the pipeline, the
`Process` block is used one time for every input that the function
receives from the pipeline. If there is no pipeline input, the `Process`
block is not used.

This block must be defined if a function parameter is set to accept
pipeline input. If this block is not defined and the parameter accepts
input from the pipeline, the function will miss the values that are
passed to the function through the pipeline.
function. The Windows PowerShell runtime uses the code in this block one time
for each instance of the function in the pipeline.

#### Process

This block is used to provide record-by-record processing for the function.
This block might be used any number of times, or not at all, depending on the
input to the function. For example, if the function is the first command in
the pipeline, the `Process` block will be used one time. If the function is
not the first command in the pipeline, the `Process` block is used one time
for every input that the function receives from the pipeline. If there is no
pipeline input, the `Process` block is not used.

This block must be defined if a function parameter is set to accept pipeline
input. If this block is not defined and the parameter accepts input from the
pipeline, the function will miss the values that are passed to the function
through the pipeline.

Also, when the function supports confirmation requests (when the
`SupportsShouldProcess` parameter of the Parameter attribute is set to
`$True`), the call to the `ShouldProcess` method must be made from within
the Process block.
`$True`), the call to the `ShouldProcess` method must be made from within the
Process block.

#### End

## End
This block is used to provide optional one-time post-processing for
the function.
This block is used to provide optional one-time post-processing for the
function.

The following example shows the outline of a function that contains a
`Begin` block for one-time preprocessing, a `Process` block for multiple
record processing, and an `End` block for one-time post-processing.
The following example shows the outline of a function that contains a `Begin`
block for one-time preprocessing, a `Process` block for multiple record
processing, and an `End` block for one-time post-processing.

```powershell
Function Test-ScriptCmdlet
Expand All @@ -90,119 +84,125 @@ Function Test-ScriptCmdlet
}
```

# Confirmation Methods
### Confirmation Methods

#### ShouldProcess

## ShouldProcess
This method is called to request confirmation from the user before the
function performs an action that would change the system. The function
can continue based on the Boolean value returned by the method. This
method can be called only from within the `Process{}` block of the
function. And, the `CmdletBinding` attribute must declare that the
function supports `ShouldProcess` (as shown in the previous example).
function performs an action that would change the system. The function can
continue based on the Boolean value returned by the method. This method can be
called only from within the `Process{}` block of the function. And, the
`CmdletBinding` attribute must declare that the function supports
`ShouldProcess` (as shown in the previous example).

For more information about this method, see
`System.Management.Automation.Cmdlet.ShouldProcess` in the MSDN library at
http://go.microsoft.com/fwlink/?LinkId=142142.
[`System.Management.Automation.Cmdlet.ShouldProcess`](http://go.microsoft.com/fwlink/?LinkId=142142)
in the MSDN library.

For more information about how to request confirmation, see
"Requesting Confirmation" in the MSDN library at
http://go.microsoft.com/fwlink/?LinkID=136658.
[Requesting Confirmation](http://go.microsoft.com/fwlink/?LinkID=136658)
in the MSDN library.

#### ShouldContinue

## ShouldContinue
This method is called to request a second confirmation message. It
should be called when the `ShouldProcess` method returns `$true`. For more
information about this method, see
`System.Management.Automation.Cmdlet.ShouldContinue` in the MSDN library
at http://go.microsoft.com/fwlink/?LinkId=142143.
This method is called to request a second confirmation message. It should be
called when the `ShouldProcess` method returns `$true`. For more information
about this method, see `System.Management.Automation.Cmdlet.ShouldContinue` in
the MSDN library at http://go.microsoft.com/fwlink/?LinkId=142143.

# Error Methods
### Error Methods

Functions can call two different methods when errors occur. When a
nonterminating error occurs, the function should call the `WriteError`
method, which is described in the "Write Methods" section. When a
terminating error occurs and the function cannot continue, it should call
the `ThrowTerminatingError` method. You can also use the `Throw` statement for
nonterminating error occurs, the function should call the `WriteError` method,
which is described in the "Write Methods" section. When a terminating error
occurs and the function cannot continue, it should call the
`ThrowTerminatingError` method. You can also use the `Throw` statement for
terminating errors and the `Write-Error` cmdlet for nonterminating errors.

For more information, see `System.Management.Automation.Cmdlet.ThrowTerminatingError`
in the MSDN libray at
http://go.microsoft.com/fwlink/?LinkId=142144.
For more information, see
[`System.Management.Automation.Cmdlet.ThrowTerminatingError`](http://go.microsoft.com/fwlink/?LinkId=142144)
in the MSDN libray.

# Write Methods
### Write Methods

A function can call the following methods to return different types of
output. Notice that not all the output goes to the next command in the
pipeline. You can also use the various Write cmdlets, such as
Write-Error.
A function can call the following methods to return different types of output.
Notice that not all the output goes to the next command in the pipeline. You
can also use the various Write cmdlets, such as Write-Error.

#### WriteCommandDetail

## WriteCommandDetail
For information about the `WriteCommandDetails` method, see
`System.Management.Automation.Cmdlet.WriteCommandDetail` in the MSDN
library at http://go.microsoft.com/fwlink/?LinkId=142155.

## WriteDebug
To provide information that can be used to troubleshoot a function,
make the function call the `WriteDebug` method. This displays debug
messages to the user. For more information, see
`System.Management.Automation.Cmdlet.WriteDebug` in the MSDN library
at http://go.microsoft.com/fwlink/?LinkId=142156.

## WriteError
Functions should call this method when nonterminating errors occur and
the function is designed to continue processing records. For more
information, see `System.Management.Automation.Cmdlet.WriteError` in the
MSDN library at http://go.microsoft.com/fwlink/?LinkId=142157.
[`System.Management.Automation.Cmdlet.WriteCommandDetail`](http://go.microsoft.com/fwlink/?LinkId=142155)
in the MSDN library.

#### WriteDebug

To provide information that can be used to troubleshoot a function, make the
function call the `WriteDebug` method. This displays debug messages to the
user. For more information, see
[`System.Management.Automation.Cmdlet.WriteDebug`](http://go.microsoft.com/fwlink/?LinkId=142156)
in the MSDN library.

#### WriteError

Functions should call this method when nonterminating errors occur and the
function is designed to continue processing records. For more information, see
[`System.Management.Automation.Cmdlet.WriteError`](http://go.microsoft.com/fwlink/?LinkId=142157)
in the MSDN library.

Note: If a terminating error occurs, the function should call the
`ThrowTerminatingError` method.

## WriteObject
This method allows the function to send an object to the next command in
the pipeline. In most cases, this is the method to use when the function
returns data. For more information, see
`System.Management.Automation.PSCmdlet.WriteObject` in the MSDN library at
http://go.microsoft.com/fwlink/?LinkId=142158.

## WriteProgress
For functions whose actions take a long time to complete, this method
allows the function to call the `WriteProgress` method so that progress
information is displayed. For example, you can display the percent
completed. For more information, see
`System.Management.Automation.PSCmdlet.WriteProgress` in the MSDN library
at http://go.microsoft.com/fwlink/?LinkId=142160.

## WriteVerbose
To provide detailed information about what the function is doing, make
the function call the `WriteVerbose` method to display verbose messages to
the user. By default, verbose messages are not displayed. For more
information, see `System.Management.Automation.PSCmdlet.WriteVerbose`
in the MSDN library at http://go.microsoft.com/fwlink/?LinkId=142162.

## WriteWarning
To provide information about conditions that may cause unexpected
results, make the function call the WriteWarning method to display
warning messages to the user. By default, warning messages are displayed.
For more information, see
`System.Management.Automation.PSCmdlet.WriteWarning` in the MSDN library
at http://go.microsoft.com/fwlink/?LinkId=142164.
#### WriteObject

This method allows the function to send an object to the next command in the
pipeline. In most cases, this is the method to use when the function returns
data. For more information, see
[`System.Management.Automation.PSCmdlet.WriteObject`](http://go.microsoft.com/fwlink/?LinkId=142158)
in the MSDN library.

#### WriteProgress

For functions whose actions take a long time to complete, this method allows
the function to call the `WriteProgress` method so that progress information
is displayed. For example, you can display the percent completed. For more
information, see [`System.Management.Automation.PSCmdlet.WriteProgress`](http://go.microsoft.com/fwlink/?LinkId=142160)
in the MSDN library.

#### WriteVerbose

To provide detailed information about what the function is doing, make the
function call the `WriteVerbose` method to display verbose messages to the
user. By default, verbose messages are not displayed. For more information,
see
[`System.Management.Automation.PSCmdlet.WriteVerbose`](http://go.microsoft.com/fwlink/?LinkId=142162)
in the MSDN library.

#### WriteWarning

To provide information about conditions that may cause unexpected results,
make the function call the WriteWarning method to display warning messages to
the user. By default, warning messages are displayed. For more information,
see [`System.Management.Automation.PSCmdlet.WriteWarning`](http://go.microsoft.com/fwlink/?LinkId=142164)
in the MSDN library.

Note: You can also display warning messages by configuring the
`WarningPreference` variable or by using the `Verbose` and `Debug`
command-line options.

# Other Methods and Properties
### Other Methods and Properties

For information about the other methods and properties that can be
accessed through the `$PSCmdlet` variable, see
`System.Management.Automation.PSCmdlet` in the MSDN library at
http://go.microsoft.com/fwlink/?LinkId=142139.
[`System.Management.Automation.PSCmdlet`](http://go.microsoft.com/fwlink/?LinkId=142139)
in the MSDN library.

For example, the `ParameterSetName` property allows you to see the parameter
set that is being used. Parameter sets allow you to create a function that
performs different tasks based on the parameters that are specified when
the function is run.
performs different tasks based on the parameters that are specified when the
function is run.

# SEE ALSO
## SEE ALSO

[about_Functions](about_Functions.md)

Expand All @@ -213,4 +213,3 @@ the function is run.
[about_Functions_CmdletBindingAttribute](about_Functions_CmdletBindingAttribute.md)

[about_Functions_OutputTypeAttribute](about_Functions_OutputTypeAttribute.md)

Loading