Need to check tls/ssl but getting stuck with "You must provide a value expression on the right-hand side of the '-' operator."

I would like to disable ssl 3 but need to test what sites only support ssl 3. I keep getting stuck with an error that is over my head. I've tried manipulating the string a dozen different ways and keep getting the same error. I am not familiar with -notin
or how to specify which part of the property its checking: thanks a ton
http://blog.whatsupduck.net/2014/10/checking-ssl-and-tls-versions-with-powershell.html
line with issues:
$ProtocolNames = [System.Security.Authentication.SslProtocols] | gm -static -MemberType Property | where-object{$_.Name -notin @("Default","None") | %{$_.Name}
You must provide a value expression on the right-hand side of the '-' operator.
At S:\scripts\test23.ps1:50 char:126
+ $ProtocolNames = [System.Security.Authentication.SslProtocols] | gm -static -MemberType Property | where-object{$_.Name - <<<< noti
n @("Default","None") | %{$_.Name}
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ExpectedValueExpression
<#
.DESCRIPTION
Outputs the SSL protocols that the client is able to successfully use to connect to a server.
.NOTES
Copyright 2014 Chris Duck
http://blog.whatsupduck.net
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.PARAMETER ComputerName
The name of the remote computer to connect to.
.PARAMETER Port
The remote port to connect to. The default is 443.
.EXAMPLE
Test-SslProtocols -ComputerName "www.google.com"
ComputerName : www.google.com
Port : 443
KeyLength : 2048
SignatureAlgorithm : rsa-sha1
Ssl2 : False
Ssl3 : True
Tls : True
Tls11 : True
Tls12 : True
#>
function Test-SslProtocols {
param(
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)]
$ComputerName,
[Parameter(ValueFromPipelineByPropertyName=$true)]
[int]$Port = 443
begin {
$ProtocolNames = [System.Security.Authentication.SslProtocols] | gm -static -MemberType Property | where-object{$_.Name -notin @("Default","None") | %{$_.Name}
process {
$ProtocolStatus = [Ordered]@{}
$ProtocolStatus.Add("ComputerName", $ComputerName)
$ProtocolStatus.Add("Port", $Port)
$ProtocolStatus.Add("KeyLength", $null)
$ProtocolStatus.Add("SignatureAlgorithm", $null)
$ProtocolNames | %{
$ProtocolName = $_
$Socket = New-Object System.Net.Sockets.Socket([System.Net.Sockets.SocketType]::Stream, [System.Net.Sockets.ProtocolType]::Tcp)
$Socket.Connect($ComputerName, $Port)
try {
$NetStream = New-Object System.Net.Sockets.NetworkStream($Socket, $true)
$SslStream = New-Object System.Net.Security.SslStream($NetStream, $true)
$SslStream.AuthenticateAsClient($ComputerName, $null, $ProtocolName, $false )
$RemoteCertificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]$SslStream.RemoteCertificate
$ProtocolStatus["KeyLength"] = $RemoteCertificate.PublicKey.Key.KeySize
$ProtocolStatus["SignatureAlgorithm"] = $RemoteCertificate.PublicKey.Key.SignatureAlgorithm.Split("#")[1]
$ProtocolStatus.Add($ProtocolName, $true)
} catch {
$ProtocolStatus.Add($ProtocolName, $false)
} finally {
$SslStream.Close()
[PSCustomObject]$ProtocolStatus
Test-SslProtocols -ComputerName "www.google.com"

V2 version:
function Test-SslProtocols {
param(
[Parameter(
Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
ValueFromPipeline=$true
)]$ComputerName,
[Parameter(
ValueFromPipelineByPropertyName=$true
)][int]$Port = 443
begin {
$protocols=[enum]::GetNames([System.Security.Authentication.SslProtocols])|?{$_ -notmatch 'none|default'}
process {
foreach($protocol in $protocols){
$ProtocolStatus = @{
ComputerName=$ComputerName
Port=$Port
KeyLength=$null
SignatureAlgorithm=$null
Protocol=$protocol
Active=$false
$Socket = New-Object System.Net.Sockets.Socket('Internetwork','Stream', 'Tcp')
$Socket.Connect($ComputerName, $Port)
try {
$NetStream = New-Object System.Net.Sockets.NetworkStream($Socket, $true)
$SslStream = New-Object System.Net.Security.SslStream($NetStream, $true)
$SslStream.AuthenticateAsClient($ComputerName, $null, $protocol, $false )
$RemoteCertificate = [System.Security.Cryptography.X509Certificates.X509Certificate2]$SslStream.RemoteCertificate
$protocolstatus.Active=$true
$ProtocolStatus.KeyLength = $RemoteCertificate.PublicKey.Key.KeySize
$ProtocolStatus.SignatureAlgorithm = $RemoteCertificate.PublicKey.Key.SignatureAlgorithm.Split("#")[1]
catch {
Write-Host 'Failed'
finally {
New-Object PsObject -Property $ProtocolStatus
$SslStream.Close()
Test-SslProtocols -ComputerName www.google.com
¯\_(ツ)_/¯

Similar Messages

  • I have iMovie application open, but the iMovie application keeps disappearing off the right hand side of the screen and and I can not see it, even though the application is open..help, please!

    I have iMovie application open, but the iMovie application keeps disappearing off the right hand side of the screen and and I can not see it, even though the application is open..help, please!

    Thanks. I don't know why it wouldn't just go back there when I tried putting it back? I didn't change anything, so I assumed the new "default" was over on the left. Glad it was a simple solution after all.

  • Why is the right hand side of the tables on a Word document that was imported being cut off using Webhelp but not when using Webhelp Pro?

    I would prefer to use Webhelp and not Webhelp Pro because Webhelp allow for the insertion of a logo located to the right of the search field by selecting the "Show About" check box when generating content. The problem is that Webhelp is cutting off the words in the tables. Wordwrap is turned on in the Word document and the rest of the sentence will continue beneath the "cut off" word.

    You would only use WebHelp Pro if you were using RH Server – that’s what the “pro” versions of output are for. I would suggest that something’s wrong with your table definition. You talk about a Word document – is this the source or the output you’re talking about?

  • I was trying to update my Garmin,on my Imac and the application is locked down on the right hand side of the page next to my trash can and will not open---how can I get firefox to open up again ???

    I was trying to update my Garmin and Firefox is now locked down on the righthand page next to my trash can and will not open---I have an Imac desktop.

    We need a lot more information - like exactly waht you are doing, what version of iPhoto you have and what happens
    LN

  • TS3274 Email display problem: My email only display the list of emails and a preview (first two lines of the body of the mail). If one click on the message it only shows the heading on the right hand side of the screen, but not the content.

    My email only display the list of mails in my in box with a preview of the first two lines of the body of the message. When one clicks on the message to open it, only the header is displayed in the right hand side of the screen - the actual message is missing. This happens on older mail previously downloaded that use to work properly as well. Any idea how to fix this?

    Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Why can't i see the Toolbox - the support documents talk about a toolbox but I don't have anything on the right hand side of my editor.

    I can't find the toolbox on the right hand side of the editor. ANy ideas why??

    I haven't seen this documented anywhere, and I can't replicate it for Administrator / Partner users of BC sites, but the toolbox does get closed (by default?) for some users in some circumstances.
    To get it back, you'll need to click the 'Add Modules' button, which is on the page editor between the "Page Content" heading, and the WYSWIG editor window.
    Pics:

  • I have an hd movie on both my ipad and iPhone 5, using airplay with my iPhone 5 plays perfectly but gets stuck with my ipad 2, almost like its buffering? I just want it to play smoothly like with my iPhone. Any suggestion?

    I have an hd movie on both my ipad and iPhone 5, using airplay on my apple tv with my iPhone 5 plays perfectly but gets stuck with my ipad 2, almost like its buffering? I just want it to play smoothly like with my iPhone. Any suggestion?

    About 6 months ago I discovered iTunes was set by default to 720p. These MUST BE CHANGED TO 1080P!!!!!!!!.......So I installed FULL 1080P file on my laptop on iTunes...  When I download movies on iPhone 5s/iPad mini the file is 720p So within about 60 seconds of starting download of 1080p files into my laptop of iTunes purchases. It was at that moment that I realized it was that file my laptop has on file to sync to my Apple device...Ten minutes later when the first 1080P HD file was downloaded  I must say... The resolution is amazing... I now use this same process to install movie files from iTunes.. In FULL 1080P.. Not 720P... Works on my iPad mini also... Avatar is 5.4 GB if installed over Wi-Fi... However sync with laptop and file is 6.5 GB in size... Called Apple told them... No reply yet.... You must delete 720P files from your laptop... Look for file size in any movie purchase and you will see DOWNLOAD IN 1080P.. This will open preferences in iTunes for you to the correct tab so you can change setting to 1080p from default of 720p... DELETE any downloaded movies already downloaded into laptop... You can check file quality by right click on any movie folder and the look at movie info... Will say 720p HD... Delete to recycle bin and iCloud will appear on each movie... Now download 1080P HD file... When completed. Right click any file to verify it is 1080P HD... The sync with device...... And get ready to be upset with Apple for holding back your device for the last 2 years 3 months and 16 days......And be ready to catch your jaw from hitting the floor when you see your screen in full 1080P HD.... Apple Engineer's were asleep.....
    You will notice better pic quality... Apple by default is still sending the 720P file to the new iPhone 6 plus over wifi and sync.. howve this process above will give you full HD file for your Apple device...

  • I am in my e-mail and a keyboard came up but only the left hand-side of the keyboard and I can't get rid of it, any idea how to make it go away?

    I am in my e-mail and a keyboard came up but only the left hand-side of the keyboard and I can't get rid of it, any idea how to make it go away?

    Have you turned the phone off? If so, and it hasn't fixed the issue, try a reset:
    Press and hold the Sleep/On/Off button and the Home button at the same time for approximately 10-15 seconds. Ignore the slide to turn off indicator, and wait for the Apple logo to reappear. Release buttons. No content will he changed with this process.
    Stedman

  • How do I add my Applications fold back onto the dock? People say I must drag it near the trash can, but that just puts it past that barrier. I am trying to get it back to where it disappeared from, on the left hand side near the finder icon.

    How do I add my Applications fold back onto the dock? People say I must drag it near the trash can, but that just puts it past that barrier. I am trying to get it back to where it disappeared from, on the left hand side near the finder icon. And how / why did it disappear?

    With respect, you actually cannot store folders on the left side of the Dock - only on the right side. I wonder if you're talking about Launchpad, which looks like a silver rocket and shows you your installed applications? It's not actually a shortcut to the Applications folder, though. You can certainly drag Launchpad into the left side of the Dock from the Applications folder.
    Matt

  • Downloaded newest iTunes,now can't see cheap movies in the right hand side topics; where did it go - how do I get to them?

    Downloaded the newest itunes, now I can no longer see the "cheap" movies listed on the links to the right hand side.  Where did they go, and how do I now get to them?  I tried search and that didn't work.

    Are they gone completely from the computer, or just no longer in the library? Check your movie media folder.
    If your'e in the USA you can download some movies a second time, but not all (studio dependent).  You should always back up all media.

  • Mouse pointer stuck at the right-hand corner of the screen.

    Hello all,
    I am writing to find help for my girlfriend in Nepal. She says the mouse pointer is stuck in the right-hand corner of the screen, and won't move. I suspect it's a software glitch but since I'm in the US, I can't look at it. This is an old G3 iBook in which we replaced the battery just before she left, and she reports that the battery may be connected to her problem. Anybody have any ideas for fixing this?
    Any help really appreciated!
    Thanks!
    mike simpson
    < Edited by Host, for your protection, no personal information please. >

    Hi, and welcome to Apple Discussions.
    If the iBook is running OS X 10.2 or above, have her try booting into Safe Mode. This will take quite awhile longer than a normal startup because it does a file check and repair of the hard disk.
    If this works she will see the normal desktop. Once completely started up in Safe Mode, have her try to restart normally, and go to Applications > Utilities > Disk Utility.
    Select the named boot volume in the left sidebar, ("Macintosh HD" unless it's been renamed). What is the hard drive capacity and how much space remains available on it? Repair permissions on it.
    See if a little hard drive maintenance helps things out.

  • How do I get a trash, spam and draft files to be a visible part of my in box set of files on the left hand side of the page

    On the left hand side of the gmail screen and under compose mail, there is an inbox item and some sub-files, including "Starred," "Important," "Chats," and "Sent Mail. But there isn't "drafts," "spam," or "trash." Nor when I seek to move an e-mail is there in the move-to drop down a way of moving files to important, drafts, trash or spam. Thus i can't file and I can't see what has been moved where. I don't know whether this is a function of version 9, but if so, I'd like to get the older version so I can manage my files.and view what's there.

    Turn on the side bar by typing Cntrl + S.

  • VERTICAL SLIDING BAR ON RIGHT HAND SIDE OF THE SCREEN HAS DISAPPEARED - HOW DO I GET IT BACK PLEASE?

    VERTICAL SLIDING BAR ON RIGHT HAND SIDE OF THE SCREEN HAS DISAPPEARED - HOW DO I GET IT BACK PLEASE?

    This issue can be caused by the Babylon Toolbar extension
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • How to i get the main picture to change after editing it on the right hand side?

    help ..i was emailed a document that i can edit...made the corrections on the right hand side, but cannot get the main document to change it

    Email edit right side main document change it may mean something to you but I bet most of us are in the dark.
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • I once created an account and changed meanwhile my Apple ID. Now, when trying to log in to iCloud, I get the message: "You are already logged in". I cannot get access to the account in the way, that, for example, the options appear on the right hand side.

    I once created an account and changed meanwhile my Apple ID. Now, when trying to log in to iCloud, I get the message: "You are already logged in". I cannot get access to the account in the way, that, for example, the options appear on the right hand side.
    What can I do?

    Thank you, pvonk, but:
    To be more precise: I am talking about the logging-in within the System Preferences on my iMac.
    When trying to log in with the old ID, I get no access, i.e. it says "Try again"...-Trying the same with the new one gives me the result I mentioned in my first question...
    Now I found out how to do it: I had to erase all accounts-then I could sign in with my Apple-ID. Thanks again.

Maybe you are looking for