Could use some help as to why I am getting the following errors.
SEE CODE at the bottom of this post
----------------------
Product, version and build:Powershell Studio 5.7.1.179
32 or 64 bit version of product:
Operating system: windows 10
32 or 64 bit OS: 64
ERROR: Cannot bind argument to parameter 'Name' because it is null.
ERROR: + CategoryInfo : InvalidData: (:) [Disable-TlsCipherSuite], ParameterBindingValidationException
ERROR: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.WindowsAuthenticationProtocols.Commands.RemoveTlsCipherSuiteCommand
ERROR: + PSComputerName : DALC6-OCSQ01P
------------------------
CODE:
$cipherToDisable = "TLS_PSK_WITH_NULL_SHA256"
#$name = $cipherListBox
Write-Host $name
$test = Invoke-Command -ComputerName $serverNameLabel.Text.ToString() -ScriptBlock {Disable-TlsCipherSuite -Name $cipherToDisable
}
Problem with invoke-command and forms
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- mtartaglia
- Posts: 101
- Last visit: Mon Dec 19, 2022 11:45 am
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Problem with invoke-command and forms
[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Problem with invoke-command and forms
You haven't passed the variable to the script block.
To get a full understanding of how to use "Invoke-Command" see the following topic:
help Invoke-Command -online
There are numerous ways to pass this variables. I t is useful to understand all and how they work.
To get a full understanding of how to use "Invoke-Command" see the following topic:
help Invoke-Command -online
There are numerous ways to pass this variables. I t is useful to understand all and how they work.
- mtartaglia
- Posts: 101
- Last visit: Mon Dec 19, 2022 11:45 am
Re: Problem with invoke-command and forms
thank you so much! I was able to use example 9 to help me. I just can't believe I have never ran into this before. LOL