Skip to content

Commit 0a6b562

Browse files
authored
Merge pull request #4815 from MicrosoftDocs/staging
Merging latest changes to live
2 parents 889b93d + 9fefa4d commit 0a6b562

File tree

70 files changed

+7897
-6660
lines changed

Some content is hidden

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

70 files changed

+7897
-6660
lines changed

.openpublishing.redirection.json

Lines changed: 61 additions & 416 deletions
Large diffs are not rendered by default.

build.ps1

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ $global:ProgressPreference = 'SilentlyContinue'
88
if ($ShowProgress) { $ProgressPreference = 'Continue' }
99

1010
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
11+
$tempDir = [System.IO.Path]::GetTempPath()
1112

1213
# Pandoc source URL
13-
$panDocVersion = "2.0.6"
14-
$pandocSourceURL = "https://github.com/jgm/pandoc/releases/download/$panDocVersion/pandoc-$panDocVersion-windows.zip"
14+
$panDocVersion = "2.7.3"
15+
$pandocSourceURL = "https://github.com/jgm/pandoc/releases/download/$panDocVersion/pandoc-$panDocVersion-windows-x86_64.zip"
1516

16-
$pandocDestinationPath = New-Item (Join-Path ([System.IO.Path]::GetTempPath()) "PanDoc") -ItemType Directory -Force
17-
$pandocZipPath = Join-Path $pandocDestinationPath "pandoc-$panDocVersion-windows.zip"
17+
$pandocDestinationPath = New-Item (Join-Path $tempDir "pandoc") -ItemType Directory -Force
18+
$pandocZipPath = Join-Path $pandocDestinationPath "pandoc-$panDocVersion-windows-x86_64.zip"
1819
Invoke-WebRequest -Uri $pandocSourceURL -OutFile $pandocZipPath
1920

20-
Expand-Archive -Path (Join-Path $pandocDestinationPath "pandoc-$panDocVersion-windows.zip") -DestinationPath $pandocDestinationPath -Force
21-
$pandocExePath = Join-Path (Join-Path $pandocDestinationPath "pandoc-$panDocVersion") "pandoc.exe"
21+
Expand-Archive -Path $pandocZipPath -DestinationPath $pandocDestinationPath -Force
22+
$pandocExePath = Join-Path (Join-Path $pandocDestinationPath "pandoc-$panDocVersion-windows-x86_64") "pandoc.exe"
2223

2324
# Install ThreadJob if not available
2425
$threadJob = Get-Module ThreadJob -ListAvailable
@@ -112,7 +113,7 @@ Get-ChildItem $ReferenceDocset -Directory -Exclude $excludeList | ForEach-Object
112113

113114
$pandocArgs = @(
114115
"--from=gfm",
115-
"--to=plain+multiline_tables+inline_code_attributes",
116+
"--to=plain+multiline_tables",
116117
"--columns=75",
117118
"--output=$aboutFileOutputFullName",
118119
"--quiet"

developer/format/tablecolumnitem-element-for-tablecolumnitems-for-tablecontrol-format.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ TableColumnItem Element for TableColumnItems for TableControl (Format)
2727
```xml
2828
<TableColumnItem>
2929
<Alignment>Left, Right, or Center</Alignment>
30+
<FormatString>FormatPattern</FormatString>
3031
<PropertyName>Nameof.NetProperty</PropertyName>
3132
<ScriptBlock>ScriptToEvaluate</ScriptBlock>
3233
</TableColumnItem>
Lines changed: 109 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,109 @@
1-
---
2-
title: "Creating remote runspaces | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "09/12/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.tgt_pltfrm: ""
8-
ms.topic: "article"
9-
ms.assetid: 057a666f-731b-423d-9d80-7be6b1836244
10-
caps.latest.revision: 5
11-
---
12-
# Creating remote runspaces
13-
14-
Windows PowerShell commands that take a `ComputerName` parameter can be run on any computer that runs Windows PowerShell. To run commands that do not take a `ComputerName` parameter, you can use WS-Management to configure a runspace that connects to a specified computer, and run commands on that computer.
15-
16-
## Using a WSManConnection to create a remote runspace
17-
18-
To create a runspace that connects to a remote computer, you create a [System.Management.Automation.Runspaces.Wsmanconnectioninfo](/dotnet/api/System.Management.Automation.Runspaces.WSManConnectionInfo) object. You specify the target endpoint for the connection by setting the [System.Management.Automation.Runspaces.Wsmanconnectioninfo.Connectionuri*](/dotnet/api/System.Management.Automation.Runspaces.WSManConnectionInfo.ConnectionUri) property of the object. You then create a runspace by calling the [System.Management.Automation.Runspaces.Runspacefactory.Createrunspace*](/dotnet/api/System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace) method, specifying the [System.Management.Automation.Runspaces.Wsmanconnectioninfo](/dotnet/api/System.Management.Automation.Runspaces.WSManConnectionInfo) object as the `connectionInfo` parameter.
19-
20-
The following example shows how to create a runspace that connects to a remote computer. In the example, `RemoteComputerUri` is used as a placeholder for the actual URI of a remote computer.
21-
22-
```csharp
23-
namespace Samples
24-
{
25-
using System;
26-
using System.Collections.ObjectModel;
27-
using System.Management.Automation; // Windows PowerShell namespace.
28-
using System.Management.Automation.Runspaces; // Windows PowerShell namespace.
29-
30-
/// <summary>
31-
/// This class contains the Main entry point for this host application.
32-
/// </summary>
33-
internal class RemoteRunspace02
34-
{
35-
/// <summary>
36-
/// This sample shows how to create a remote runspace that
37-
/// runs commands on the local computer.
38-
/// </summary>
39-
/// <param name="args">Parameter not used.</param>
40-
private static void Main(string[] args)
41-
{
42-
// Create a WSManConnectionInfo object using the default constructor
43-
// to connect to the "localHost". The WSManConnectionInfo object can
44-
// also be used to specify connections to remote computers.
45-
WSManConnectionInfo connectionInfo = new WSManConnectionInfo();
46-
47-
// Set the OperationTimeout property and OpenTimeout properties.
48-
// The OperationTimeout property is used to tell Windows PowerShell
49-
// how long to wait (in milliseconds) before timing out for an
50-
// operation. The OpenTimeout property is used to tell Windows
51-
// PowerShell how long to wait (in milliseconds) before timing out
52-
// while establishing a remote connection.
53-
connectionInfo.OperationTimeout = 4 * 60 * 1000; // 4 minutes.
54-
connectionInfo.OpenTimeout = 1 * 60 * 1000; // 1 minute.
55-
56-
// Create a remote runspace using the connection information.
57-
//using (Runspace remoteRunspace = RunspaceFactory.CreateRunspace())
58-
using (Runspace remoteRunspace = RunspaceFactory.CreateRunspace(connectionInfo))
59-
{
60-
// Establish the connection by calling the Open() method to open the runspace.
61-
// The OpenTimeout value set previously will be applied while establishing
62-
// the connection. Establishing a remote connection involves sending and
63-
// receiving some data, so the OperationTimeout will also play a role in this process.
64-
remoteRunspace.Open();
65-
66-
// Create a PowerShell object to run commands in the remote runspace.
67-
using (PowerShell powershell = PowerShell.Create())
68-
{
69-
powershell.Runspace = remoteRunspace;
70-
powershell.AddCommand("get-process");
71-
powershell.Invoke();
72-
73-
Collection<PSObject> results = powershell.Invoke();
74-
75-
Console.WriteLine("Process HandleCount");
76-
Console.WriteLine("--------------------------------");
77-
78-
// Display the results.
79-
foreach (PSObject result in results)
80-
{
81-
Console.WriteLine(
82-
"{0,-20} {1}",
83-
result.Members["ProcessName"].Value,
84-
result.Members["HandleCount"].Value);
85-
}
86-
}
87-
88-
// Close the connection. Call the Close() method to close the remote
89-
// runspace. The Dispose() method (called by using primitive) will call
90-
// the Close() method if it is not already called.
91-
remoteRunspace.Close();
92-
}
93-
}
94-
}
95-
}
96-
```
1+
---
2+
title: "Creating remote runspaces | Microsoft Docs"
3+
ms.custom: ""
4+
ms.date: "09/12/2016"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.tgt_pltfrm: ""
8+
ms.topic: "article"
9+
ms.assetid: 057a666f-731b-423d-9d80-7be6b1836244
10+
caps.latest.revision: 5
11+
---
12+
13+
# Creating remote runspaces
14+
15+
PowerShell commands that take a **ComputerName** parameter can be run on any computer that runs
16+
PowerShell. To run commands that don't take a **ComputerName** parameter, you can use WS-Management
17+
to configure a runspace that connects to a specified computer, and run commands on that computer.
18+
19+
## Using a WSManConnection to create a remote runspace
20+
21+
To create a runspace that connects to a remote computer, you create a
22+
[System.Management.Automation.Runspaces.WSManConnectionInfo](/dotnet/api/System.Management.Automation.Runspaces.WSManConnectionInfo)
23+
object. You specify the target endpoint for the connection by setting the
24+
[System.Management.Automation.Runspaces.WSManConnectionInfo.ConnectionUri](/dotnet/api/System.Management.Automation.Runspaces.WSManConnectionInfo.ConnectionUri)
25+
property of the object. You then create a runspace by calling the
26+
[System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace](/dotnet/api/System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace)
27+
method, specifying the
28+
[System.Management.Automation.Runspaces.WSManConnectionInfo](/dotnet/api/System.Management.Automation.Runspaces.WSManConnectionInfo)
29+
object as the `connectionInfo` parameter.
30+
31+
The following example shows how to create a runspace that connects to a remote computer. In the
32+
example, `RemoteComputerUri` is used as a placeholder for the actual URI of a remote computer.
33+
34+
```csharp
35+
namespace Samples
36+
{
37+
using System;
38+
using System.Collections.ObjectModel;
39+
using System.Management.Automation; // PowerShell namespace.
40+
using System.Management.Automation.Runspaces; // PowerShell namespace.
41+
42+
/// <summary>
43+
/// This class contains the Main entry point for this host application.
44+
/// </summary>
45+
internal class RemoteRunspace02
46+
{
47+
/// <summary>
48+
/// This sample shows how to create a remote runspace that
49+
/// runs commands on the local computer.
50+
/// </summary>
51+
/// <param name="args">Parameter not used.</param>
52+
private static void Main(string[] args)
53+
{
54+
// Create a WSManConnectionInfo object using the default constructor
55+
// to connect to the "localHost". The WSManConnectionInfo object can
56+
// also be used to specify connections to remote computers.
57+
Uri RemoteComputerUri = new uri("http://Server01:5985/WSMAN");
58+
WSManConnectionInfo connectionInfo = new WSManConnectionInfo(RemoteComputerUri);
59+
60+
// Set the OperationTimeout property and OpenTimeout properties.
61+
// The OperationTimeout property is used to tell PowerShell
62+
// how long to wait (in milliseconds) before timing out for an
63+
// operation. The OpenTimeout property is used to tell Windows
64+
// PowerShell how long to wait (in milliseconds) before timing out
65+
// while establishing a remote connection.
66+
connectionInfo.OperationTimeout = 4 * 60 * 1000; // 4 minutes.
67+
connectionInfo.OpenTimeout = 1 * 60 * 1000; // 1 minute.
68+
69+
// Create a remote runspace using the connection information.
70+
//using (Runspace remoteRunspace = RunspaceFactory.CreateRunspace())
71+
using (Runspace remoteRunspace = RunspaceFactory.CreateRunspace(connectionInfo))
72+
{
73+
// Establish the connection by calling the Open() method to open the runspace.
74+
// The OpenTimeout value set previously will be applied while establishing
75+
// the connection. Establishing a remote connection involves sending and
76+
// receiving some data, so the OperationTimeout will also play a role in this process.
77+
remoteRunspace.Open();
78+
79+
// Create a PowerShell object to run commands in the remote runspace.
80+
using (PowerShell powershell = PowerShell.Create())
81+
{
82+
powershell.Runspace = remoteRunspace;
83+
powershell.AddCommand("get-process");
84+
powershell.Invoke();
85+
86+
Collection<PSObject> results = powershell.Invoke();
87+
88+
Console.WriteLine("Process HandleCount");
89+
Console.WriteLine("--------------------------------");
90+
91+
// Display the results.
92+
foreach (PSObject result in results)
93+
{
94+
Console.WriteLine(
95+
"{0,-20} {1}",
96+
result.Members["ProcessName"].Value,
97+
result.Members["HandleCount"].Value);
98+
}
99+
}
100+
101+
// Close the connection. Call the Close() method to close the remote
102+
// runspace. The Dispose() method (called by using primitive) will call
103+
// the Close() method if it is not already called.
104+
remoteRunspace.Close();
105+
}
106+
}
107+
}
108+
}
109+
```

gallery/installing-psget.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,50 @@ title: Installing PowerShellGet
1313
- [Windows Management Framework (WMF) 5.0](https://www.microsoft.com/download/details.aspx?id=50395) or newer
1414
- [PowerShell 6](https://github.com/PowerShell/PowerShell/releases)
1515

16-
## Get PowerShellGet module for PowerShell versions 3.0 and 4.0
17-
18-
- [PackageManagement MSI](https://www.microsoft.com/download/details.aspx?id=51451)
19-
2016
## Get the latest version from PowerShell Gallery
2117

22-
- Before updating PowerShellGet, you should always install the latest Nuget provider. To do that,
23-
run the following in an elevated PowerShell session.
18+
Before updating **PowerShellGet**, you should always install the latest **NuGet** provider. From an
19+
elevated PowerShell session, run the following command.
2420

25-
```powershell
26-
Install-PackageProvider Nuget -Force
27-
Exit
28-
```
21+
```powershell
22+
Install-PackageProvider -Name NuGet -Force
23+
Exit
24+
```
2925

3026
### For systems with PowerShell 5.0 (or newer) you can install the latest PowerShellGet
3127

32-
- To do this on Windows 10, Windows Server 2016, any system with WMF 5.0 or 5.1 installed, or any system with PowerShell 6, run the following commands from an elevated PowerShell session.
28+
To install PowerShellGet on Windows 10, Windows Server 2016, any system with WMF 5.0 or 5.1
29+
installed, or any system with PowerShell 6, run the following commands from an elevated PowerShell
30+
session.
3331

34-
```powershell
35-
Install-Module -Name PowerShellGet -Force
36-
Exit
37-
```
32+
```powershell
33+
Install-Module -Name PowerShellGet -Force
34+
Exit
35+
```
3836

39-
- Use `Update-Module` to get newer versions.
37+
Use `Update-Module` to get newer versions.
4038

41-
```powershell
42-
Update-Module -Name PowerShellGet
43-
Exit
44-
```
39+
```powershell
40+
Update-Module -Name PowerShellGet
41+
Exit
42+
```
4543

46-
### For systems running PowerShell 3 or PowerShell 4, that have installed the [PackageManagement MSI](https://www.microsoft.com/download/details.aspx?id=51451)
44+
### For systems running PowerShell 3 or PowerShell 4, that have installed the PackageManagement Preview
4745

48-
- Use below PowerShellGet cmdlet from an elevated PowerShell session to save the modules to a local directory
46+
1. From an elevated PowerShell session, use `Save-Module` to save the modules to a local directory.
4947

50-
```powershell
51-
Save-Module PowerShellGet -Path C:\LocalFolder
52-
Exit
53-
```
48+
```powershell
49+
Save-Module -Name PowerShellGet -Path C:\LocalFolder
50+
Exit
51+
```
5452

55-
- Ensure that PowerShellGet and PackageManagement modules are not loaded in any other processes.
56-
- Delete contents of `$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\` and `$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\` folders.
57-
- Re-open the PS Console with elevated permissions then run the following commands.
53+
1. Ensure that the **PowerShellGet** and **PackageManagement** modules aren't loaded in any other
54+
processes.
55+
1. Delete the contents of the folders: `$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\`
56+
and `$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\`.
57+
1. Reopen the PowerShell console with elevated permissions and run the following commands.
5858

59-
```powershell
60-
Copy-Item "C:\LocalFolder\PowerShellGet\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\" -Recurse -Force
61-
Copy-Item "C:\LocalFolder\PackageManagement\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\" -Recurse -Force
62-
```
59+
```powershell
60+
Copy-Item "C:\LocalFolder\PowerShellGet\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\" -Recurse -Force
61+
Copy-Item "C:\LocalFolder\PackageManagement\*" "$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\" -Recurse -Force
62+
```

0 commit comments

Comments
 (0)