Skip to content
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

Merging latest changes to Live #1898

Merged
merged 56 commits into from
Nov 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 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
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/secureMOF.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Import-Certificate -FilePath "$env:temp\DscPublicKey.cer" -CertStoreLocation Cer
```powershell
# Import to the root store so that it is trusted
$mypwd = ConvertTo-SecureString -String "YOUR_PFX_PASSWD" -Force -AsPlainText
Import-PfxCertificate -FilePath "$env:temp\DscPrivateKey.pfx" -CertStoreLocation Cert:\LocalMachine\Root -Password $mypwd > $null
Import-PfxCertificate -FilePath "$env:temp\DscPrivateKey.pfx" -CertStoreLocation Cert:\LocalMachine\My -Password $mypwd > $null
```

## Configuration data
Expand Down
2 changes: 1 addition & 1 deletion dsc/windowsfeatureResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ WindowsFeature [string] #ResourceName

| Property | Description |
|---|---|
| Name| Indicates the name of the role or feature that you want to ensure is added or removed. This is the same as the __Name__ property from the [Get-WindowsFeature](https://technet.microsoft.com/en-us/library/jj205469.aspx) cmdlet, and not the display name of the role or feature.|
| Name| Indicates the name of the role or feature that you want to ensure is added or removed. This is the same as the __Name__ property from the [Get-WindowsFeature](/powershell/module/servermanager/Get-WindowsFeature) cmdlet, and not the display name of the role or feature.|
| Credential| Indicates the credentials to use to add or remove the role or feature.|
| Ensure| Indicates if the role or feature is added. To ensure that the role or feature is added, set this property to "Present" To ensure that the role or feature is removed, set the property to "Absent".|
| IncludeAllSubFeature| Set this property to __$true__ to ensure the state of all required subfeatures with the state of the feature you specify with the __Name__ property.|
Expand Down
62 changes: 17 additions & 45 deletions reference/3.0/Microsoft.PowerShell.Core/Functions/Get-Verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,60 +68,32 @@ Description
This command gets all approved verbs that begin with "un".

### Example 3
```powershell
PS C:\> Get-Verb | Where-Object Group -EQ Security

Verb Group
---- -----
Block Security
Grant Security
Protect Security
Revoke Security
Unblock Security
Unprotect Security
```
get-verb | where-object {$_.Group -eq "Security"}

Verb Group
---- -----
Block Security
Grant Security
Protect Security
Revoke Security
Unblock Security
Unprotect Security
```

Description

-----------

This command gets all approved verbs in the Security group.

### Example 4
```powershell
Get-Command -Module Microsoft.PowerShell.Utility | where Verb -NotIn (Get-Verb).Verb
# CommandType Name Version Source
# ----------- ---- ------- ------
# Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
# Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility
```
get-command -module MyModule | where { (get-verb $_.Verb) -eq $null }
```

Description

-----------

This command finds all commands in a module that have unapproved verbs.

### Example 5
```
$approvedVerbs = get-verb | foreach {$_.verb}

C:\PS> $myVerbs = get-command -module MyModule | foreach {$_.verb}

# Does MyModule export functions with unapproved verbs?
C:\PS> ($myVerbs | foreach {$approvedVerbs -contains $_}) -contains $false
True

# Which unapproved verbs are used in MyModule?
C:\PS> ($myverbs | where {$approvedVerbs -notcontains $_})
ForEach
Sort
Tee
Where
```

Description

-----------

These commands detect unapproved verbs in a module and tell which unapproved verbs were detected in the module.

## PARAMETERS

### -verb
Expand Down
40 changes: 23 additions & 17 deletions reference/3.0/Microsoft.PowerShell.Management/Get-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ This command gets the modules for the processes that have names that begin with

To run this command on Windows Vista (and later versions of Windows) with processes that you do not own, you must start Windows PowerShell with the "Run as administrator" option.
### Example 8
```
PS C:\> $p = get-wmiobject win32_process -filter "name='powershell.exe'"
PS C:\> $p.getowner()
```powershell
PS C:\> $p = Get-WmiObject Win32_Process -Filter "name='powershell.exe'"
PS C:\> $p.GetOwner()


__GENUS : 2
__CLASS : __PARAMETERS
Expand All @@ -134,33 +135,38 @@ User : user01
```

This command shows how to find the owner of a process.
Because the System.Diagnostics.Process object that Get-Process returns does not have a property or method that returns the process owner, the command uses

the Get-WmiObject cmdlet to get a Win32_Process object that represents the same process.
Because the System.Diagnostics.Process object that `Get-Process` returns does not have a property or method that returns the process owner, the command uses the `Get-WmiObject` cmdlet to get a Win32_Process object that represents the same process.

The first command uses Get-WmiObject to get the PowerShell process.
The first command uses `Get-WmiObject` to get the PowerShell process.
It saves it in the $p variable.

The second command uses the GetOwner method to get the owner of the process in $p.
The command reveals that the owner is Domain01\user01.
The output reveals that the owner is Domain01\user01.

### Example 9
```
PS C:\> get-process powershell
```powershell
PS C:\> Get-Process powershell

Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
308 26 52308 61780 567 3.18 5632 powershell
377 26 62676 63384 575 3.88 5888 powershell PS C:\> get-process -id $pid
308 26 52308 61780 567 3.18 5632 powershell
377 26 62676 63384 575 3.88 5888 powershell


PS C:\> Get-Process -Id $PID

Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
396 26 56488 57236 575 3.90 5888 powershell
396 26 56488 57236 575 3.90 5888 powershell
```

These commands show how to use the $pid automatic variable to identify the process that is hosting the current Windows PowerShell session.
You can use this method to distinguish the host process from other Windows PowerShell processes that you might want to stop or close.
The first command gets all of the Windows PowerShell processes in the current session.
These commands show how to use the $PID automatic variable to identify the process that is hosting the current PowerShell session.
You can use this method to distinguish the host process from other PowerShell processes that you might want to stop or close.

The first command gets all of the PowerShell processes in the current session.

The second command gets the PowerShell process that is hosting the current session.

The second command gets the Windows PowerShell process that is hosting the current session.
### Example 10
```
PS C:\> get-process | where {$_.mainWindowTitle} | format-table id, name, mainwindowtitle -autosize
Expand Down
29 changes: 9 additions & 20 deletions reference/3.0/Microsoft.PowerShell.Utility/Get-Member.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,33 +102,22 @@ This command gets the methods and properties of service objects that were extend
The Get-Member command uses the View parameter to get only the extended members of the service objects.
In this case, the extended member is the Name property, which is an alias property of the ServiceName property.
### Example 4
```
PS C:\> get-eventlog -log system | gm -membertype scriptproperty
TypeName: System.Diagnostics.EventLogEntry
```powershell
PS C:\> Get-EventLog -Log System | Get-Member -MemberType ScriptProperty

Name MemberType Definition
---- ---------- ----------
EventID ScriptProperty System.Object EventID {get=$this.get_EventID() -band 0xFFFF;}
```

This command gets the script properties of event log objects in the System log in Event Viewer.
In this case, the only script property is the EventID.
### Example 5
```
PS C:\> get-eventlog -log system | get-member -membertype scriptproperty
TypeName: System.Diagnostics.EventLogEntry
TypeName: System.Diagnostics.EventLogEntry

Name MemberType Definition
---- ---------- ----------
EventID ScriptProperty System.Object EventID {get=$this.get_EventID() -band 0xFFFF;}
```

This command gets the script properties of event log objects in the System log in Event Viewer.
The command uses the **MemberType** parameter to get only objects with a value of ScriptProperty for their MemberType property.
The command returns the EventID property of the **EventLog** object.

The command uses the MemberType parameter to get only objects with a value of AliasProperty for their MemberType property.

The command returns the EventID property of the EventLog object.
### Example 6
### Example 5
```
PS C:\> $a = "get-process", "get-service", "get-culture", "get-psdrive", "get-executionpolicy"
PS C:\> foreach ($cmdlet in $a) {invoke-command $cmdlet | get-member -name machinename}
Expand All @@ -152,7 +141,7 @@ The first command stores the names of several cmdlets in the $a variable.
The second command uses a ForEach statement to invoke each command, send the results to Get-Member, and limit the results from Get-Member to members that have the name "MachineName."

The results show that only process objects (System.Diagnostics.Process) and service objects (System.ServiceProcess.ServiceController) have a MachineName property.
### Example 7
### Example 6
```
PS C:\> $a = get-member -inputobject @(1)
PS C:\> $a.count
Expand All @@ -179,7 +168,7 @@ In this case, the array contains only one object, the integer 1.
The third command uses the Get-Member cmdlet to get the properties and methods of an array of integers, and the command saves them in the $a variable.

The fourth command uses the Count property of the array to find the number of objects in the $a variable.
### Example 8
### Example 7
```
PS C:\> $file = get-item c:\test\textFile.txt
PS C:\> $file.psobject.properties | where-object {$_.issettable} | format-table -property name
Expand Down Expand Up @@ -212,7 +201,7 @@ The first command uses the Get-Item cmdlet to get a text file, and then it saves
The second command gets all of the changeable properties of the file object in the $file variable and displays the names of the properties in a table.

The third command gets the changeable properties of all objects in your Windows PowerShell session.
### Example 9
### Example 8
```
PS C:\> $s = get-service
PS C:\> $s | get-member
Expand Down
62 changes: 17 additions & 45 deletions reference/4.0/Microsoft.PowerShell.Core/Functions/Get-Verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,60 +68,32 @@ Description
This command gets all approved verbs that begin with "un".

### Example 3
```powershell
PS C:\> Get-Verb | Where-Object Group -EQ Security

Verb Group
---- -----
Block Security
Grant Security
Protect Security
Revoke Security
Unblock Security
Unprotect Security
```
get-verb | where-object {$_.Group -eq "Security"}

Verb Group
---- -----
Block Security
Grant Security
Protect Security
Revoke Security
Unblock Security
Unprotect Security
```

Description

-----------

This command gets all approved verbs in the Security group.

### Example 4
```powershell
Get-Command -Module Microsoft.PowerShell.Utility | where Verb -NotIn (Get-Verb).Verb
# CommandType Name Version Source
# ----------- ---- ------- ------
# Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
# Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility
```
get-command -module MyModule | where { (get-verb $_.Verb) -eq $null }
```

Description

-----------

This command finds all commands in a module that have unapproved verbs.

### Example 5
```
$approvedVerbs = get-verb | foreach {$_.verb}

C:\PS> $myVerbs = get-command -module MyModule | foreach {$_.verb}

# Does MyModule export functions with unapproved verbs?
C:\PS> ($myVerbs | foreach {$approvedVerbs -contains $_}) -contains $false
True

# Which unapproved verbs are used in MyModule?
C:\PS> ($myverbs | where {$approvedVerbs -notcontains $_})
ForEach
Sort
Tee
Where
```

Description

-----------

These commands detect unapproved verbs in a module and tell which unapproved verbs were detected in the module.

## PARAMETERS

### -verb
Expand Down
49 changes: 31 additions & 18 deletions reference/4.0/Microsoft.PowerShell.Management/Get-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,16 @@ This command gets the modules for the processes that have names that begin with
To run this command on Windows Vista (and later versions of Windows) with processes that you do not own, you must start Windows PowerShell with the "Run as administrator" option.

### Example 8
```
PS C:\> $p = get-wmiobject win32_process -filter "name='powershell.exe'"
PS C:\> $p.getowner()
```powershell
PS C:\> Get-Process powershell -IncludeUserName

Handles WS(K) CPU(s) Id UserName ProcessName
------- ----- ------ -- -------- -----------
782 132080 2.08 2188 DOMAIN01\user01 powershell

PS C:\> $p = Get-WmiObject Win32_Process -Filter "name='powershell.exe'"
PS C:\> $p.GetOwner()


__GENUS : 2
__CLASS : __PARAMETERS
Expand All @@ -158,35 +165,41 @@ ReturnValue : 0
User : user01
```

This command shows how to find the owner of a process.
Because the System.Diagnostics.Process object that Get-Process returns does not have a property or method that returns the process owner, the command uses
The first command shows how to find the owner of a process.
The **IncludeUserName** parameter requires elevated user rights (Run as Administrator).
The output reveals that the owner is Domain01\user01.

the Get-WmiObject cmdlet to get a Win32_Process object that represents the same process.
The second and third command are another way to find the owner of a process.

The first command uses Get-WmiObject to get the PowerShell process.
The second command uses `Get-WmiObject` to get the PowerShell process.
It saves it in the $p variable.

The second command uses the GetOwner method to get the owner of the process in $p.
The command reveals that the owner is Domain01\user01.
The third command uses the GetOwner method to get the owner of the process in $p.
The output reveals that the owner is Domain01\user01.

### Example 9
```
PS C:\> get-process powershell
```powershell
PS C:\> Get-Process powershell

Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
308 26 52308 61780 567 3.18 5632 powershell
377 26 62676 63384 575 3.88 5888 powershell PS C:\> get-process -id $pid
308 26 52308 61780 567 3.18 5632 powershell
377 26 62676 63384 575 3.88 5888 powershell


PS C:\> Get-Process -Id $PID

Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
396 26 56488 57236 575 3.90 5888 powershell
396 26 56488 57236 575 3.90 5888 powershell
```

These commands show how to use the $pid automatic variable to identify the process that is hosting the current Windows PowerShell session.
You can use this method to distinguish the host process from other Windows PowerShell processes that you might want to stop or close.
The first command gets all of the Windows PowerShell processes in the current session.
These commands show how to use the $PID automatic variable to identify the process that is hosting the current PowerShell session.
You can use this method to distinguish the host process from other PowerShell processes that you might want to stop or close.

The first command gets all of the PowerShell processes in the current session.

The second command gets the Windows PowerShell process that is hosting the current session.
The second command gets the PowerShell process that is hosting the current session.

### Example 10
```
Expand Down
Loading