Updates from: 06/18/2021 03:19:06
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Management Get Content (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md
last index in the returned array of 25 retrieved lines.
### Example 4: Get the last line of a text file
-This command gets the first line and last line of content from a file. This example uses the
-`LineNumbers.txt` file that was created in Example 1.
+This command gets the last line of content from a file. This example uses the `LineNumbers.txt` file
+that was created in Example 1.
```powershell Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1
Microsoft.PowerShell.Management Get Content (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Content.md
last index in the returned array of 25 retrieved lines.
### Example 4: Get the last line of a text file
-This command gets the first line and last line of content from a file. This example uses the
-`LineNumbers.txt` file that was created in Example 1.
+This command gets the last line of content from a file. This example uses the `LineNumbers.txt` file
+that was created in Example 1.
```powershell Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1
Microsoft.PowerShell.Utility Convertto Json (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Specifies the objects to convert to JSON format. Enter a variable that contains
a command or expression that gets the objects. You can also pipe an object to `ConvertTo-Json`. The **InputObject** parameter is required, but its value can be null (`$null`) or an empty string.
-When the input object is `$null`, `ConvertTo-Json` does not generate any output. When the input
-object is an empty string, `ConvertTo-Json` returns an empty string.
+When the input object is `$null` or an empty string, `ConvertTo-Json` outputs the string `null`.
```yaml Type: System.Object
Microsoft.PowerShell.Management Get Content (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Content.md
last index in the returned array of 25 retrieved lines.
### Example 4: Get the last line of a text file
-This command gets the first line and last line of content from a file. This example uses the
-`LineNumbers.txt` file that was created in Example 1.
+This command gets the last line of content from a file. This example uses the `LineNumbers.txt` file
+that was created in Example 1.
```powershell Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1
Microsoft.PowerShell.Utility Convertto Json (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Specifies the objects to convert to JSON format. Enter a variable that contains
a command or expression that gets the objects. You can also pipe an object to `ConvertTo-Json`. The **InputObject** parameter is required, but its value can be null (`$null`) or an empty string.
-When the input object is `$null`, `ConvertTo-Json` does not generate any output. When the input
-object is an empty string, `ConvertTo-Json` returns an empty string.
+When the input object is `$null` or an empty string, `ConvertTo-Json` outputs the string `null`.
```yaml Type: System.Object
Microsoft.PowerShell.Management Get Content (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Content.md
last index in the returned array of 25 retrieved lines.
### Example 4: Get the last line of a text file
-This command gets the first line and last line of content from a file. This example uses the
-`LineNumbers.txt` file that was created in Example 1.
+This command gets the last line of content from a file. This example uses the `LineNumbers.txt` file
+that was created in Example 1.
```powershell Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1
Microsoft.PowerShell.Utility Convertto Json (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Specifies the objects to convert to JSON format. Enter a variable that contains
a command or expression that gets the objects. You can also pipe an object to `ConvertTo-Json`. The **InputObject** parameter is required, but its value can be null (`$null`) or an empty string.
-When the input object is `$null`, `ConvertTo-Json` does not generate any output. When the input
-object is an empty string, `ConvertTo-Json` returns an empty string.
+When the input object is `$null` or an empty string, `ConvertTo-Json` outputs the string `null`.
```yaml Type: System.Object
dsc Wingettingstarted https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/dsc/getting-started/winGettingStarted.md
The following sections explain how to create and run DSC configurations on Windo
The Windows PowerShell `Configuration` keyword is used to create a configuration. The following steps describe the creation of a configuration document using Windows PowerShell.
+#### Install a module containing DSC resources
+
+Windows PowerShell Desired State Configuration includes built-in modules containing DSC resources.
+You can also load modules from external sources such as the PowerShell Gallery, using the
+PowerShellGet cmdlets.
+
+```PowerShell
+Install-Module 'PSDscResources' -Verbose
+```
+ #### Define a configuration and generate the configuration document: ```powershell
Configuration EnvironmentVariable_Path
} }
-EnvironmentVariable_Path -OutputPath:"C:\EnvironmentVariable_Path"
-```
-
-#### Install a module containing DSC resources
-
-Windows PowerShell Desired State Configuration includes built-in modules containing DSC resources.
-You can also load modules from external sources such as the PowerShell Gallery, using the
-PowerShellGet cmdlets.
-
-```PowerShell
-Install-Module 'PSDscResources' -Verbose
+EnvironmentVariable_Path -OutputPath:"./EnvironmentVariable_Path"
``` #### Apply the configuration to the machine
module Index https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/module/index.md
archive_url: ''
layout: ApiBrowserPage apiPlatform: powershell quickFilterColumn1: powershell-7.1,windowsserver2019-ps
-quickFilterColumn2: azps-6.0.0,win-mdop2-ps
+quickFilterColumn2: azps-6.1.0,win-mdop2-ps
quickFilterColumn3: sqlserver-ps,systemcenter-ps-2019 ---