Skip to content

Commit 8fbc170

Browse files
committed
Add cmdlet updates
1 parent 4b34925 commit 8fbc170

File tree

7 files changed

+257
-99
lines changed

7 files changed

+257
-99
lines changed

reference/5.1/Microsoft.PowerShell.Management/Get-Clipboard.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@ returned as an array of strings similar to `Get-Content`.
2828

2929
## EXAMPLES
3030

31-
### Example 1: Get the content of the clipboard and display it to the command-line
32-
33-
In this example we have right-clicked on an image in a browser and chose the **Copy** action. The
34-
following command displays the link, as a URL, of the image that is stored in the clipboard.
31+
### Example 1: Get the content of the clipboard
3532

3633
```powershell
34+
Set-Clipboard -Value 'hello world'
3735
Get-Clipboard
3836
```
3937

4038
```Output
41-
https://en.wikipedia.org/wiki/PowerShell
39+
hello world
4240
```
4341

4442
### Example 2: Get the content of the clipboard in a specific format

reference/7.4/Microsoft.PowerShell.Management/Get-Clipboard.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ returned as an array of strings similar to `Get-Content`.
3232
3333
## EXAMPLES
3434

35-
### Example 1: Get the content of the clipboard and display it to the command-line
36-
37-
In this example we have copied the text "hello" into the clipboard.
35+
### Example 1: Get the content of the clipboard
3836

3937
```powershell
38+
Set-Clipboard -Value 'hello world'
4039
Get-Clipboard
4140
```
4241

4342
```Output
44-
hello
43+
hello world
4544
```
4645

4746
## PARAMETERS

reference/7.5/Microsoft.PowerShell.Management/Get-Clipboard.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ returned as an array of strings similar to `Get-Content`.
3232
3333
## EXAMPLES
3434

35-
### Example 1: Get the content of the clipboard and display it to the command-line
36-
37-
In this example we have copied the text "hello" into the clipboard.
35+
### Example 1: Get the content of the clipboard
3836

3937
```powershell
38+
Set-Clipboard -Value 'hello world'
4039
Get-Clipboard
4140
```
4241

4342
```Output
44-
hello
43+
hello world
4544
```
4645

4746
## PARAMETERS

reference/7.6/Microsoft.PowerShell.Management/Get-Clipboard.md

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 11/01/2025
5+
ms.date: 12/10/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-clipboard?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
aliases:
@@ -18,7 +18,7 @@ Gets the contents of the clipboard.
1818
## SYNTAX
1919

2020
```
21-
Get-Clipboard [-Raw] [<CommonParameters>]
21+
Get-Clipboard [-Raw] [-Delimiter <String[]>] [<CommonParameters>]
2222
```
2323

2424
## DESCRIPTION
@@ -32,20 +32,65 @@ returned as an array of strings similar to `Get-Content`.
3232
3333
## EXAMPLES
3434

35-
### Example 1: Get the content of the clipboard and display it to the command-line
36-
37-
In this example we have copied the text "hello" into the clipboard.
35+
### Example 1: Get the content of the clipboard
3836

3937
```powershell
38+
Set-Clipboard -Value 'hello world'
4039
Get-Clipboard
4140
```
4241

4342
```Output
44-
hello
43+
hello world
44+
```
45+
46+
### Example 2: Get the content of the clipboard using a custom delimiter
47+
48+
This example gets the content of the clipboard. The content is a string containing the pipe
49+
character. `Get-Clipboard` splits the content at each occurrence of the specified delimiter.
50+
51+
```powershell
52+
Set-Clipboard -Value 'line1|line2|line3'
53+
Get-Clipboard -Delimiter '|'
54+
```
55+
56+
```Output
57+
line1
58+
line2
59+
line3
60+
```
61+
62+
### Example 3: Get the content of the clipboard using custom delimiters
63+
64+
This example gets the content of the clipboard delimited by the line ending for both Windows and
65+
Linux.
66+
67+
```powershell
68+
Get-Clipboard -Delimiter "`r`n", "`n"
4569
```
4670

4771
## PARAMETERS
4872

73+
### -Delimiter
74+
75+
Specifies one or more delimiters to use when the clipboard content is returned as an array of
76+
strings. The contents of the clipboard are split at each occurrence of any of the specified
77+
delimiters. If not specified, the default delimiter is the platform-specific newline.
78+
79+
- On Windows, the default delimiter is ``"`r`n"``.
80+
- On Linux and macOS, the default delimiter is ``"`n"``.
81+
82+
```yaml
83+
Type: System.String[]
84+
Parameter Sets: (All)
85+
Aliases:
86+
87+
Required: False
88+
Position: Named
89+
Default value: [Environment.NewLine]
90+
Accept pipeline input: False
91+
Accept wildcard characters: False
92+
```
93+
4994
### -Raw
5095
5196
Gets the entire contents of the clipboard. Multiline text is returned as a single multiline string

reference/7.6/Microsoft.PowerShell.Management/Join-Path.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Management
5-
ms.date: 03/25/2025
5+
ms.date: 12/10/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/join-path?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Join-Path
@@ -16,7 +16,7 @@ Combines a path and a child path into a single path.
1616

1717
```
1818
Join-Path [-Path] <String[]> [-ChildPath] <String> [[-AdditionalChildPath] <String[]>] [-Resolve]
19-
[-Credential <PSCredential>] [<CommonParameters>]
19+
[-Credential <PSCredential>] [-Extension <String>] [<CommonParameters>]
2020
```
2121

2222
## DESCRIPTION
@@ -150,6 +150,46 @@ Join-Path -Path a -ChildPath b, c, d, e, f, g
150150
a\b\c\d\e\f\g
151151
```
152152

153+
### Example 9: Add extension to file without extension
154+
155+
```powershell
156+
Join-Path C:\Temp myfile -Extension txt
157+
```
158+
159+
```Output
160+
C:\Temp\myfile.txt
161+
```
162+
163+
### Example 10: Change existing extension
164+
165+
```powershell
166+
Join-Path C:\Temp myfile.txt -Extension .log
167+
```
168+
169+
```Output
170+
C:\Temp\myfile.log
171+
```
172+
173+
### Example 11: Extension without leading dot
174+
175+
```powershell
176+
Join-Path C:\Temp file.txt -Extension log
177+
```
178+
179+
```Output
180+
C:\Temp\file.log
181+
```
182+
183+
### Example 12: Remove extension with empty string
184+
185+
```powershell
186+
Join-Path C:\Temp file.txt -Extension ""
187+
```
188+
189+
```Output
190+
C:\Temp\file
191+
```
192+
153193
## PARAMETERS
154194

155195
### -AdditionalChildPath
@@ -211,6 +251,28 @@ Accept pipeline input: True (ByPropertyName)
211251
Accept wildcard characters: False
212252
```
213253

254+
### -Extension
255+
256+
Specifies the extension to use for the resulting path. If not specified, the original extension is
257+
preserved. The leading dot in the extension is optional. If omitted, the command adds it
258+
automatically.
259+
260+
- If the path has an existing extension, it's replaced with the specified extension.
261+
- If the path has no extension, the specified extension is added.
262+
- If you provide an empty string, the existing extension is removed.
263+
264+
```yaml
265+
Type: System.String
266+
Parameter Sets: (All)
267+
Aliases:
268+
269+
Required: True
270+
Position: 0
271+
Default value: None
272+
Accept pipeline input: True (ByPropertyName)
273+
Accept wildcard characters: True
274+
```
275+
214276
### -Path
215277

216278
Specifies the main path (or paths) to which the child-path is appended. The value of **Path**

0 commit comments

Comments
 (0)