Skip to content

Commit c732e3e

Browse files
Merging latest to live (#861)
* Fixing the cross file reference anchors (#855) * Removing 'preview' from WMF 5.0 release notes (#857) Add an optional extended description… * In the about topics examples, adding 'space' after the PS prompt (#859) * In the about topics examples, adding 'space' after the PS prompt * Adding 'space' after the PS prompt - II * Adding 'space' after the PS prompt - III * Fixing the prompt to say PS instead of CPS (#860)
1 parent e520723 commit c732e3e

File tree

68 files changed

+287
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+287
-284
lines changed

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Arrays.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ The syntax of the array operator is as follows:
9090
You can use the array operator to create an array of zero or
9191
one object.
9292

93-
PS C:>$a = @("One")
94-
PS C:>$a.Count
93+
PS C:> $a = @("One")
94+
PS C:> $a.Count
9595
# 1
9696

9797

98-
PS C:>$b = @()
99-
PS C:>$b.Count
98+
PS C:> $b = @()
99+
PS C:> $b.Count
100100
# 0
101101

102102

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Command_Precedence.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ ModuleName property of commands.
176176

177177
For example, to find the source of the Get-Date cmdlet, type:
178178

179-
PS C:>(Get-Command Get-Date).ModuleName
179+
PS C:> (Get-Command Get-Date).ModuleName
180180
Microsoft.PowerShell.Utility
181181

182182
# CALL OPERATOR

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Escape_Characters.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ being substituted for the variable.
4646

4747
For example:
4848

49-
PS C:>$a = 5
49+
PS C:> $a = 5
5050
PS C:>"The value is stored in $a."
5151
The value is stored in 5.
5252

53-
PS C:>$a = 5
53+
PS C:> $a = 5
5454
PS C:>"The value is stored in `$a."
5555
The value is stored in $a.
5656

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ You can use all of the parameters of Get-Command when you call
279279
the Get-MyCommand function. The parameters and parameter values
280280
are passed to the command using @Args.
281281

282-
PS C:>Get-MyCommand -Name Get-ChildItem
282+
PS C:> Get-MyCommand -Name Get-ChildItem
283283
CommandType Name ModuleName
284284
----------- ---- ----------
285285
Cmdlet Get-ChildItem Microsoft.PowerShell.Management

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ To turn on module logging for a module, use the following command format.
108108
The module must be imported into the session and the setting is effective
109109
only in the current session.
110110

111-
PS C:>Import-Module <Module-Name>
112-
PS C:>(Get-Module <Module-Name>).LogPipelineExecutionDetails = $true
111+
PS C:> Import-Module <Module-Name>
112+
PS C:> (Get-Module <Module-Name>).LogPipelineExecutionDetails = $true
113113

114114
To turn on module logging for all sessions on a particular computer,
115115
add the previous commands to the all-users Windows PowerShell profile

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Job_Details.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ When you display the Name and ChildJob properties of the job in $j, it
179179
shows that the command returned a job object with three child jobs, one for
180180
each computer.
181181

182-
CPS C:> $j | Format-List Name, ChildJobs
182+
PS C:> $j | Format-List Name, ChildJobs
183183

184184
Name : Job3
185185
ChildJobs : {Job4, Job5, Job6}

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Jobs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ returns all of the jobs that were started in the current session.
9494

9595
For example, the following command gets the jobs in the current session.
9696

97-
PS C:>Get-Job
97+
PS C:> Get-Job
9898

9999
Id Name PSJobTypeName State HasMoreData Location Command
100100
-- ---- ------------- ----- ----------- -------- -------

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Language_Modes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ configuration file, the session configuration has a LanguageMode
214214
property. You can find the language mode by getting the value
215215
of the LanguageMode property.
216216

217-
PS C:>(Get-PSSessionConfiguration -Name Test).LanguageMode
217+
PS C:> (Get-PSSessionConfiguration -Name Test).LanguageMode
218218
FullLanguage
219219

220220
On other session configurations, you can find the language
@@ -228,7 +228,7 @@ ConstrainedLanguage session by getting the value of the
228228
LanguageMode property of the session state.
229229

230230
For example:
231-
PS C:>$ExecutionContext.SessionState.LanguageMode
231+
PS C:> $ExecutionContext.SessionState.LanguageMode
232232
ConstrainedLanguage
233233

234234
However, in sessions with RestrictedLanguage and

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_PowerShell_Ise_exe.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -81,32 +81,32 @@ Displays help for PowerShell_ISE.exe.
8181
These commands start Windows PowerShell ISE. The commands are equivalent
8282
and can be used interchangeably.
8383

84-
PS C:>PowerShell_ISE.exe
85-
PS C:>PowerShell_ISE
84+
PS C:> PowerShell_ISE.exe
85+
PS C:> PowerShell_ISE
8686
# PS C:>ISE
8787

8888

8989
These commands open the Get-Profile.ps1 script in Windows PowerShell ISE.
9090
The commands are equivalent and can be used interchangeably.
9191

92-
PS C:>PowerShell_ISE.exe -File .\Get-Profile.ps1
93-
PS C:>ISE -File .\Get-Profile.ps1
94-
PS C:>ISE .\Get-Profile.ps1
92+
PS C:> PowerShell_ISE.exe -File .\Get-Profile.ps1
93+
PS C:> ISE -File .\Get-Profile.ps1
94+
PS C:> ISE .\Get-Profile.ps1
9595

9696
This command opens the Get-Backups.ps1 and Get-BackupInstance.ps1 scripts
9797
in Windows PowerShell ISE. To open more than one file, use a comma to
9898
separate the file names and enclose the entire file name value in quotation
9999
marks.
100100

101-
PS C:>ISE -File ".\Get-Backups.ps1,Get-BackupInstance.ps1"
101+
PS C:> ISE -File ".\Get-Backups.ps1,Get-BackupInstance.ps1"
102102

103103
This command starts Windows PowerShell ISE with no profiles.
104104

105-
PS C:>ISE -NoProfile
105+
PS C:> ISE -NoProfile
106106

107107
This command gets help for PowerShell_ISE.exe.
108108

109-
PS C:>ISE -help
109+
PS C:> ISE -help
110110

111111
# SEE ALSO
112112

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Remote_Variables.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ commands are defined in the session in which the command runs.
4545
In the following example, the $ps variable is defined in the
4646
temporary session in which the Get-WinEvent command runs.
4747

48-
PS C:>Invoke-Command -ComputerName S1 -ScriptBlock {$ps = "Windows PowerShell"; Get-WinEvent -LogName $ps}
48+
PS C:> Invoke-Command -ComputerName S1 -ScriptBlock {$ps = "Windows PowerShell"; Get-WinEvent -LogName $ps}
4949

5050
Similarly, when the command runs in a persistent session (PSSession),
5151
the remote variable must be defined in the same PSSession.
5252

53-
PS C:>$s = New-PSSession -ComputerName S1
53+
PS C:> $s = New-PSSession -ComputerName S1
5454

55-
PS C:>Invoke-Command -ComputerName S1 -ScriptBlock {$ps = "Windows PowerShell"}
55+
PS C:> Invoke-Command -ComputerName S1 -ScriptBlock {$ps = "Windows PowerShell"}
5656

57-
PS C:>Invoke-Command -Sessions $s -ScriptBlock {Get-WinEvent -LogName $ps}
57+
PS C:> Invoke-Command -Sessions $s -ScriptBlock {Get-WinEvent -LogName $ps}
5858

5959
# USING LOCAL VARIABLES
6060

@@ -74,16 +74,16 @@ In the following example, the $ps variable is created in the local
7474
session, but is used in the session in which the command runs. The
7575
Using scope modifier identifies $ps as a local variable.
7676

77-
PS C:>$ps = "Windows PowerShell"
78-
PS C:>Invoke-Command -ComputerName S1 -ScriptBlock {Get-WinEvent -LogName $Using:ps}
77+
PS C:> $ps = "Windows PowerShell"
78+
PS C:> Invoke-Command -ComputerName S1 -ScriptBlock {Get-WinEvent -LogName $Using:ps}
7979

8080
You can also use the Using scope modifier in PSSessions.
8181

82-
PS C:>$s = New-PSSession -ComputerName S1
82+
PS C:> $s = New-PSSession -ComputerName S1
8383

84-
PS C:>$ps = "Windows PowerShell"
84+
PS C:> $ps = "Windows PowerShell"
8585

86-
PS C:>Invoke-Command -Sessions $s -ScriptBlock {Get-WinEvent -LogName $Using:ps}
86+
PS C:> Invoke-Command -Sessions $s -ScriptBlock {Get-WinEvent -LogName $Using:ps}
8787

8888
# USING LOCAL VARIABLES IN WINDOWS POWERSHELL 2.0
8989

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_Splatting.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ replaces the dollar sign ($HashArguments) in the command.
8989

9090
To provide a value for the WhatIf switch parameter, use $True or $False.
9191

92-
PS C:>$HashArguments = @{ Path = "test.txt"; Destination = "test2.txt"; WhatIf = $true }
93-
PS C:>Copy-Item @HashArguments
92+
PS C:> $HashArguments = @{ Path = "test.txt"; Destination = "test2.txt"; WhatIf = $true }
93+
PS C:> Copy-Item @HashArguments
9494

9595
Note: In the first command, the At symbol (@) indicates a hash table, not
9696
a splatted value. The syntax for hash tables in Windows PowerShell is:
@@ -115,8 +115,8 @@ values are in position order in the array. The second command uses the
115115
$ArrayArguments variable in a command in splatting. The At symbol
116116
(@ArrayArguments) replaces the dollar sign ($ArrayArguments) in the command.
117117

118-
PS C:>$ArrayArguments = "test.txt", "test2.txt"
119-
PS C:>Copy-Item @ArrayArguments -WhatIf
118+
PS C:> $ArrayArguments = "test.txt", "test2.txt"
119+
PS C:> Copy-Item @ArrayArguments -WhatIf
120120

121121
# EXAMPLES
122122

Diff for: reference/3.0/Microsoft.PowerShell.Core/About/about_WQL.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ Get-CimInstance returns a CimInstance object, instead of
224224
the ManagementObject that Get-WmiObject returns, but
225225
the objects are quite similar.
226226

227-
PS C:>(Get-CimInstance -Query "Select * from Win32_Bios").GetType().FullName
227+
PS C:> (Get-CimInstance -Query "Select * from Win32_Bios").GetType().FullName
228228
Microsoft.Management.Infrastructure.CimInstance
229-
PS C:>(Get-WmiObject -Query "Select * from Win32_Bios").GetType().FullName
229+
PS C:> (Get-WmiObject -Query "Select * from Win32_Bios").GetType().FullName
230230
System.Management.ManagementObject
231231

232232
USING THE [wmisearcher] TYPE ACCELERATOR
@@ -287,12 +287,12 @@ When you use the [wmisearcher] type accelerator, it
287287
changes the query string into a ManagementObjectSearcher
288288
object, as shown in the following commands.
289289

290-
PS C:>$a = "Select * from Win32_Bios"
291-
PS C:>$a.GetType().FullName
290+
PS C:> $a = "Select * from Win32_Bios"
291+
PS C:> $a.GetType().FullName
292292
System.String
293293

294-
PS C:>$a = [wmisearcher]"Select * from Win32_Bios"
295-
PS C:>$a.GetType().FullName
294+
PS C:> $a = [wmisearcher]"Select * from Win32_Bios"
295+
PS C:> $a.GetType().FullName
296296
System.Management.ManagementObjectSearcher
297297

298298
This command format works on any query. The following
@@ -511,8 +511,8 @@ Select-Object cmdlet gets the Name and ProcessID
511511
properties, and the Sort-Object cmdlet sorts the
512512
results in alphabetical order by name.
513513

514-
PS C:>$query = "Select * from win32_Process where name LIKE '[A-P]%'"
515-
PS C:>Get-WmiObject -Query $query |
514+
PS C:> $query = "Select * from win32_Process where name LIKE '[A-P]%'"
515+
PS C:> Get-WmiObject -Query $query |
516516
Select-Object -Property Name, ProcessID |
517517
Sort-Object -Property Name
518518

@@ -523,8 +523,8 @@ do not begin with any of the following letters:
523523

524524
and followed zero or more letters.
525525

526-
PS C:>$query = "Select * from win32_Process where name LIKE '[^ASWPRCUN]%'"
527-
PS C:>Get-WmiObject -Query $query |
526+
PS C:> $query = "Select * from win32_Process where name LIKE '[^ASWPRCUN]%'"
527+
PS C:> Get-WmiObject -Query $query |
528528
Select-Object -Property Name, ProcessID |
529529
Sort-Object -Property Name
530530

@@ -588,8 +588,8 @@ For example, the following commands get all instances
588588
of the Win32_Process WMI class but returns them
589589
only if the process name is winword.exe or excel.exe.
590590

591-
PS C:>$q = "Select * from Win32_Process where Name = 'winword.exe' or Name = 'excel.exe'"
592-
PS C:>Get-WmiObject -Query $q
591+
PS C:> $q = "Select * from Win32_Process where Name = 'winword.exe' or Name = 'excel.exe'"
592+
PS C:> Get-WmiObject -Query $q
593593

594594
The Or statement can be used with more than two
595595
conditions. In the following query, the Or statement
@@ -613,7 +613,7 @@ ID of 6512.
613613

614614
Note that the commands use the Get-CimInstance cmdlet.
615615

616-
PS C:>$q = "Select * from Win32_Process where Name = 'winword.exe' and ProcessID =6512"
616+
PS C:> $q = "Select * from Win32_Process where Name = 'winword.exe' and ProcessID =6512"
617617
PS C:> Get-CimInstance -Query $q
618618

619619
ProcessId Name HandleCount WorkingSetSize VirtualSize
@@ -657,17 +657,17 @@ For example, the following commands get processes
657657
that have a null value for the IntallDate property.
658658
The commands return many processes.
659659

660-
PS C:>$q = "Select * from Win32_Process where InstallDate is null"
661-
PS C:>Get-WmiObject -Query $q
660+
PS C:> $q = "Select * from Win32_Process where InstallDate is null"
661+
PS C:> Get-WmiObject -Query $q
662662

663663
In contrast, the following command, gets user
664664
accounts that have a null value for the Description
665665
property. This command does not return any user
666666
accounts, even though most user accounts do not have
667667
any value for the Description property.
668668

669-
PS C:>$q = "Select * from Win32_UserAccount where Description is null"
670-
PS C:>Get-WmiObject -Query $q
669+
PS C:> $q = "Select * from Win32_UserAccount where Description is null"
670+
PS C:> Get-WmiObject -Query $q
671671

672672
To find the user accounts that have no value for
673673
the Description property, use the equality operator
@@ -685,14 +685,14 @@ sensitive.
685685
The following WQL query returns only local user
686686
accounts from a domain joined computer.
687687

688-
PS C:>$q = "Select * from Win32_UserAccount where LocalAccount = True"
689-
PS C:>Get-CimInstance -Query $q
688+
PS C:> $q = "Select * from Win32_UserAccount where LocalAccount = True"
689+
PS C:> Get-CimInstance -Query $q
690690

691691
To find domain accounts, use a value of False,
692692
as shown in the following example.
693693

694-
PS C:>$q = "Select * from Win32_UserAccount where LocalAccount = False"
695-
PS C:>Get-CimInstance -Query $q
694+
PS C:> $q = "Select * from Win32_UserAccount where LocalAccount = False"
695+
PS C:> Get-CimInstance -Query $q
696696

697697
# USING THE ESCAPE CHARACTER
698698

Diff for: reference/3.0/Microsoft.PowerShell.Management/Clear-Item.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Clear-Item is similar to Clear-Content, but it works on aliases and variables, i
4141
```
4242
PS C:\>Clear-Item Variable:TestVar1
4343
-or-
44-
PS C:>Set-location Variable:PS Variable:\> Clear-Item Testvar1
44+
PS C:> Set-location Variable:PS Variable:\> Clear-Item Testvar1
4545
```
4646

4747
This command deletes the value of the variable, Testvar1.

Diff for: reference/3.0/PSScheduledJob/About/about_Scheduled_Jobs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ are not subject to job options or affected by job triggers -- and
197197
their output is not saved in the Output directory of the scheduled
198198
job directory.
199199

200-
PS C:>Start-Job -DefinitionName ProcessJob
200+
PS C:> Start-Job -DefinitionName ProcessJob
201201

202202
The following command deletes the ProcessJob scheduled job and all
203203
saved results of its job instances.

Diff for: reference/3.0/PSWorkflow/About/about_ActivityCommonParameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ workflow Test-Workflow
584584
Get-Service -UseDefaultInput $True
585585
}
586586

587-
PS C:>Test-Workflow -InputObject WinRm
587+
PS C:> Test-Workflow -InputObject WinRm
588588

589589
Status Name DisplayName PSComputerName
590590
------ ---- ----------- --------------

Diff for: reference/3.0/PSWorkflow/About/about_Suspend-Workflow.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Suspend-Workflow
7272
(Get-Date)- $a
7373
}
7474

75-
PS C:>Test-Suspend
75+
PS C:> Test-Suspend
7676

7777
Id Name PSJobTypeName State HasMoreData Location Command
7878
-- ---- ------------- ----- ----------- -------- -------
@@ -89,13 +89,13 @@ To wait for the job to be resumed, use the Wait
8989
parameter, or use the Get-Job cmdlet to get the current
9090
job object.
9191

92-
PS C:>Resume-Job -Name Job8
92+
PS C:> Resume-Job -Name Job8
9393

9494
Id Name PSJobTypeName State HasMoreData Location Command
9595
-- ---- ------------- ----- ----------- -------- -------
9696
8 Job8 PSWorkflowJob Suspended True localhost Test-Suspend
9797

98-
PS C:>Get-Job -Name Job8
98+
PS C:> Get-Job -Name Job8
9999

100100
Id Name PSJobTypeName State HasMoreData Location Command
101101
-- ---- ------------- ----- ----------- -------- -------
@@ -109,7 +109,7 @@ command that followed the Suspend-Workflow cmdlet. The value
109109
of the $a variable, which was populated before the suspension,
110110
is available to the workflow when it resumes.
111111

112-
PS C:>Get-Job -Name Job8 | Receive-Job
112+
PS C:> Get-Job -Name Job8 | Receive-Job
113113

114114
Days : 0
115115
Hours : 0

Diff for: reference/4.0/Microsoft.PowerShell.Core/About/about_Arrays.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ The syntax of the array operator is as follows:
9191
You can use the array operator to create an array of zero or
9292
one object.
9393

94-
PS C:>$a = @("One")
95-
PS C:>$a.Count
94+
PS C:> $a = @("One")
95+
PS C:> $a.Count
9696
# 1
9797

9898

99-
PS C:>$b = @()
100-
PS C:>$b.Count
99+
PS C:> $b = @()
100+
PS C:> $b.Count
101101
# 0
102102

103103

0 commit comments

Comments
 (0)