Skip to content

Commit

Permalink
Fixes MicrosoftDocs#4702 - fix accepts wildcards docs - part 2 (Micro…
Browse files Browse the repository at this point in the history
…softDocs#4714)

* remove old JEA folder

* v3/4/5 edits

* fix typo

* feedback edits

* more feedback edits
  • Loading branch information
sdwheeler authored and DCtheGeek committed Sep 3, 2019
1 parent 8d3efe9 commit 4701de2
Show file tree
Hide file tree
Showing 398 changed files with 13,208 additions and 10,883 deletions.
6 changes: 3 additions & 3 deletions reference/3.0/CimCmdlets/Get-CimClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Accept wildcard characters: True
```
### -ComputerName
Expand Down Expand Up @@ -169,7 +169,7 @@ Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Accept wildcard characters: True
```
### -Namespace
Expand Down Expand Up @@ -239,7 +239,7 @@ Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Accept wildcard characters: True
```
### CommonParameters
Expand Down
44 changes: 28 additions & 16 deletions reference/3.0/CimCmdlets/Get-CimSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,27 @@ Get-CimSession -Name <String[]> [<CommonParameters>]
```

## DESCRIPTION
The Get-CimSession cmdlet gets the CIM session objects created in the current Windows PowerShell session.

If used without any parameters, the cmdlet gets all of the CIM sessions created in the current Windows PowerShell session.
You can use the parameters of Get-CimSession to get the sessions that are for particular computers, or you can identify sessions by their names, IDs, or instance IDs.
The Get-CimSession cmdlet gets the CIM session objects created in the current PowerShell session.

For more information about Windows PowerShell sessions, see about_CimSessions
If used without any parameters, the cmdlet gets all of the CIM sessions created in the current PowerShell session.
You can use the parameters of `Get-CimSession` to get the sessions that are for particular computers, or you can identify sessions by their names, IDs, or instance IDs.

For more information about PowerShell sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).

## EXAMPLES

### Example 1: Get CIM sessions from the current PowerShell session

By default, Get-CimSession only gets information about the CIM sessions that exist in the current PowerShell session.
By default, `Get-CimSession` only gets information about the CIM sessions that exist in the current PowerShell session.
Get-CimSession does not get CIM sessions that were created in other PowerShell sessions or that were created on other computers.

```powershell
PS C:\> New-CimSession -ComputerName Server01,Server02
PS C:\> Get-CimSession
New-CimSession -ComputerName Server01,Server02
Get-CimSession
```

```Output
Id : 1
Name : CimSession1
InstanceId : d1413bc3-162a-4cb8-9aec-4d2c61253d59
Expand All @@ -68,13 +70,15 @@ ComputerName : Server02
Protocol : WSMAN
```

This command first creates CIM sessions by using New-CimSession, and then gets the CIM sessions by using Get-CimSession.
This command first creates CIM sessions by using [New-CimSession](New-CimSession.md), and then gets the CIM sessions by using `Get-CimSession`.

### Example 2: Get the CIM sessions to a specific computer

```powershell
PS C:\> Get-CimSession -ComputerName Server02
Get-CimSession -ComputerName Server02
```

```Output
Id : 2
Name : CimSession2
InstanceId : c0095981-52c5-4e7f-a5bb-c4c680541710
Expand All @@ -87,21 +91,25 @@ This command gets the CIM sessions that are connected to the computer named Serv
### Example 3: Get a list of CIM sessions and then format the list

```powershell
PS C:\> Get-CimSession | Format-Table -Property ComputerName,InstanceId
Get-CimSession | Format-Table -Property ComputerName,InstanceId
```

```Output
ComputerName InstanceId
------------ ----------
Server01 d1413bc3-162a-4cb8-9aec-4d2c61253d59
Server02 c0095981-52c5-4e7f-a5bb-c4c680541710
```

This command gets all of the CIM sessions in the current PowerShell session, and then formats the list in a table containing only the ComputerName and InstanceID parameters.
This command gets all of the CIM sessions in the current PowerShell session, and then formats the list in a table containing only the **ComputerName** and **InstanceID** properties.

### Example 4: Get all the CIM sessions that have specific names

```powershell
PS C:\> Get-CimSession -ComputerName Serv*
Get-CimSession -ComputerName Serv*
```

```Output
Id : 1
Name : CimSession1
InstanceId : d1413bc-162a-4cb8-9aec-4d2c61253d59
Expand All @@ -120,8 +128,10 @@ This command gets all of the CIM sessions that have names that begin with the ch
### Example 5: Get a specific CIM session

```powershell
PS C:\> Get-CimSession -ID 2
Get-CimSession -ID 2
```

```Output
Id : 2
Name : CimSession2
InstanceId : c0095981-52c5-4e7f-a5bb-c4c680541710
Expand All @@ -144,7 +154,7 @@ Parameter Sets: ComputerNameSet
Aliases: CN, ServerName

Required: False
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True
Expand All @@ -166,7 +176,7 @@ Parameter Sets: SessionIdSet
Aliases:

Required: True
Position: 1
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Expand Down Expand Up @@ -194,6 +204,7 @@ Accept wildcard characters: False
```
### -Name
Gets one or more CIM sessions which contain the specified friendly names.
Wildcard characters are permitted.
Expand Down Expand Up @@ -231,3 +242,4 @@ For more information, see [about_CommonParameters](https://go.microsoft.com/fwli
[Remove-CimSession](remove-cimsession.md)
[about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md)
54 changes: 23 additions & 31 deletions reference/3.0/CimCmdlets/New-CimSessionOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,29 @@ Depending on which parameters you use, the cmdlet returns either an instance of
## EXAMPLES

### Example 1: Create a CIM session options object for DCOM
```
PS C:\>$so = New-CimSessionOption -Protocol DCOM

PS C:\>New-CimSession -ComputerName Server01 -SessionOption $so
```powershell
$so = New-CimSessionOption -Protocol DCOM
New-CimSession -ComputerName Server01 -SessionOption $so
```

This set of commands creates a CIM session options object for the DCOM protocol and stores it in a variable named $so.
The contents of the variable are then passed to the New-CimSession cmdlet.
New-CimSession then creates a new CIM session with the remote server named Server01, using the options defined in the variable.

### Example 2: Create a CIM session options object for WsMan
```
PS C:\>New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl

```powershell
New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl
```

This command creates a CIM session options object for the WsMan protocol.
The object contains configuration for the authentication mode of Kerberos specified by the ProxyAuthentication parameter, the credentials specified by the ProxyCredential parameter, and specifies that the command is to skip the CA check, skip the CN check, and use SSL.

### Example 3: Create a CIM session options object with the culture specified
```
PS C:\>New-CimSessionOption -Culture Fr-Fr -Protocol Wsman

```powershell
New-CimSessionOption -Culture Fr-Fr -Protocol Wsman
```

This command specifies the culture that is used for the CIM session.
Expand All @@ -81,16 +81,11 @@ However, the default culture can be overridden using the Culture parameter.
Specifies the user interface culture to use for the CIM session.
Specify the value for this parameter using one of the following formats:

Enter a culture name in \<languagecode2\>-\<country/regioncode2\> format such as "EN-US".

Enter a culture name in `<languagecode2>-<country/regioncode2>` format such as "EN-US".

A variable that contains a CultureInfo object.
A variable that contains a CultureInfo object.


A command that gets a CultureInfo object, such as Get-Culture.
For more information about Get-Culture, see http://technet.microsoft.com/library/hh849930.aspx.
A command that gets a **CultureInfo** object, such as [Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)

```yaml
Type: CultureInfo
Expand Down Expand Up @@ -158,13 +153,13 @@ Accept wildcard characters: False
### -Impersonation
Creates a DCOM session to Windows Management Instrumentation (WMI) using impersonation.
Valid values for this parameter are:
Valid values for this parameter are:
- Default: DCOM can choose the impersonation level using its normal security negotiation algorithm.
- Default: DCOM can choose the impersonation level using its normal security negotiation algorithm.
- None: The client is anonymous to the server.
The server process can impersonate the client, but the impersonation token does not contain any information and cannot be used.
- Identify: Allows objects to query the credentials of the caller.
- Impersonate: Allows objects to use the credentials of the caller.
The server process can impersonate the client, but the impersonation token does not contain any information and cannot be used.
- Identify: Allows objects to query the credentials of the caller.
- Impersonate: Allows objects to use the credentials of the caller.
- Delegate: Allows objects to permit other objects to use the credentials of the caller.
If Impersonation is not specified, the New-CimSession cmdlet uses the value of 3: Impersonate
Expand Down Expand Up @@ -285,9 +280,7 @@ Enter the certificate thumbprint of the certificate.
Certificates are used in client certificate-based authentication.
They can only be mapped to local user accounts and they do not work with domain accounts.
To get a certificate thumbprint, use the Get-Item or Get-ChildItem cmdlets in the PowerShell Cert: drive.
For more information about the Get-ChildItem cmdlet for the PowerShell Cert: drive, see http://technet.microsoft.com/library/hh847761.aspx.
For more information about Get-Item, see http://technet.microsoft.com/library/hh849788.aspx
To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` cmdlets in the PowerShell Cert: drive.

```yaml
Type: String
Expand All @@ -305,7 +298,7 @@ Accept wildcard characters: False
Specifies the credentials to use for proxy authentication.
Enter one of the following:

- A variable that contains a PSCredential object.
- A variable that contains a PSCredential object.
- A command that gets a PSCredential object, such as Get-Credential

If this option is not set, then you cannot specify any credentials.
Expand Down Expand Up @@ -398,10 +391,10 @@ Accept wildcard characters: False
Specifies the user interface culture to use for the CIM session.
Specify the value for this parameter using one of the following formats:

- Enter a culture name in \<languagecode2\>-\<country/regioncode2\> format such as "EN-US".
- Enter a culture name in `<languagecode2>-<country/regioncode2>` format such as "EN-US".
- A variable that contains a CultureInfo object.
- A command that gets a CultureInfo object, such as Get-Culture.
For more information about Get-Culture, see http://technet.microsoft.com/library/hh849930.aspx.
- A command that gets a CultureInfo object, such as `Get-Culture`.


```yaml
Type: CultureInfo
Expand Down Expand Up @@ -438,8 +431,7 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).

## INPUTS

Expand Down
Loading

0 comments on commit 4701de2

Please sign in to comment.