This is my script:
<#
.SYNOPSIS
x
.Description
x
.PARAMETER vCenterName
x
.PARAMETER TargetEmailAddress
x
.PARAMETER SMTPServer
x
.EXAMPLE
x
.EXAMPLE
x
.EXAMPLE
x
.INPUTS
x
.OUTPUTS
x
.NOTES
x
.LINK
x
#>
Function Remove-OldFiles
{
}
# Basic code to start the cull.
Write-Host "Script Starting." -ForegroundColor Green
$CurrPath = (Get-Location).path
Remove-OldFiles -FolderPath "$CurrPath\Test\" -FileFilter "ZertoReports_*.Log" -DaysOld 20 -WhatIf
Write-Host "Script Finished." -ForegroundColor Green
If I try this command:
get-help .\test.ps1
I get this back:
test.ps1
If I change the “Function” to “xFunction” Get-Help works OK??
get-help .\test.ps1
NAME
C:\Users\jmilano\Documents\PowerShell_Scripts\test.ps1SYNOPSIS
xSYNTAX
C:\Users\jmilano\Documents\PowerShell_Scripts\test.ps1 []
What am I doing wrong?
Tested on:
Name Value
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
and
Name Value
PSVersion 5.1.14393.8146
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
BuildVersion 10.0.14393.8146
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1