Skip to content

Commit aa771b7

Browse files
authored
Fix example 3 (#11634)
1 parent d9d8b91 commit aa771b7

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.ConsoleHost.dll-help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Host
5-
ms.date: 04/30/2024
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Start-Transcript
@@ -91,7 +91,7 @@ $hostname = hostname
9191
$version = $PSVersionTable.PSVersion.ToString()
9292
$datetime = Get-Date -f 'yyyyMMddHHmmss'
9393
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
94-
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
94+
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
9595
Start-Transcript
9696
```
9797

reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.ConsoleHost.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Host
5-
ms.date: 04/30/2024
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Start-Transcript
@@ -92,7 +92,7 @@ $hostname = hostname
9292
$version = $PSVersionTable.PSVersion.ToString()
9393
$datetime = Get-Date -f 'yyyyMMddHHmmss'
9494
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
95-
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
95+
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
9696
Start-Transcript
9797
```
9898

@@ -262,8 +262,7 @@ Accept wildcard characters: False
262262

263263
### -WhatIf
264264

265-
Shows what would happen if the cmdlet runs.
266-
The cmdlet isn't run.
265+
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
267266

268267
```yaml
269268
Type: System.Management.Automation.SwitchParameter

reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.ConsoleHost.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Host
5-
ms.date: 04/30/2024
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Start-Transcript
@@ -92,7 +92,7 @@ $hostname = hostname
9292
$version = $PSVersionTable.PSVersion.ToString()
9393
$datetime = Get-Date -f 'yyyyMMddHHmmss'
9494
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
95-
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
95+
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
9696
Start-Transcript
9797
```
9898

@@ -262,8 +262,7 @@ Accept wildcard characters: False
262262

263263
### -WhatIf
264264

265-
Shows what would happen if the cmdlet runs.
266-
The cmdlet isn't run.
265+
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
267266

268267
```yaml
269268
Type: System.Management.Automation.SwitchParameter

0 commit comments

Comments
 (0)