SQLServerPSModule
SQLServerPSModule copied to clipboard
Write-SQLTableData has no ProgressAction Parameter with Powershell 5.1 what is not documented
Hello,
like mentioned in the headline, the Write-SQLTableData command has in Powershell 5.1 no progressaction parameter. This is no issue when we know it, but in documentaion for this module is no hint about it.
Thanks a lot
Hello,
i found out that in automation account the module has no -ProgressAction for powershell 7 as well.
Is this expected behavior because of automation account?
Hi @DennisBergemann - that's weird.
That parameter is usually added automatically by PowerShell and there's nothing I usually do to.
I'm also a bit confused. When I run
Get-Help Write-SqlTableData
I see it:
PS C:\Users\matteot> Get-Help Write-SqlTableData
NAME
Write-SqlTableData
SYNOPSIS
Writes data to a table of a SQL database.
SYNTAX
Write-SqlTableData [[-ServerInstance] <String[]>] [-AccessToken <PSObject>] [-ConnectionTimeout <Int32>]
[-ConnectToDatabase] [-Credential <PSCredential>] [-DatabaseName <String>] [-Encrypt {Mandatory | Optional |
Strict}] [-Force] [-HostNameInCertificate <String>] [-IgnoreProviderContext] -InputData <PSObject> [-Passthru]
[-ProgressAction <ActionPreference>] [-SchemaName <String>] [-SuppressProviderContextWarning] [-TableName
<String>] [-Timeout <Int32>] [-TrustServerCertificate] [<CommonParameters>]
...
What am I missing? Could you provide more info? Thanks!!!
Hi Matteo-T,
you can easy test it. Use the cmdlet with powershell 5.1 or within automation account, then you will an error that progress action is unknown.
King regards
Oh I see. You are telling me that PlatyPS generated the documentation using PS7 and, in theory, I should generate 2 sets of docs files: one for PS5 and one for PS7.
I think it's a bit of an overkill.
-ProgressAction is a PS7.4+ thing, so I think users will be smart enough to avoid it.
@Matteo-T you interpreted wrong. The documentation was on original Microsoft siite wrong. I need no other documentation and it’s easy to see if I am on 7 or 5. At the End it would be good to know how to avoid the Progress in Console, because it crashes interactive consoles in powershell 5. It floods buffer /memory