Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

sc alias is being confused with sc.exe #208

Closed
flcdrg opened this issue May 5, 2020 · 2 comments · Fixed by #209
Closed

sc alias is being confused with sc.exe #208

flcdrg opened this issue May 5, 2020 · 2 comments · Fixed by #209

Comments

@flcdrg
Copy link
Contributor

flcdrg commented May 5, 2020

I've seen this sometimes where the sc alias is sometimes missing and instead the sc.exe Windows tool gets run instead - obviously not the same thing :-)

D:\dev\git\au-packages\sql-server-2019-cumulative-update [master ↑1]> .\update.ps1
SetValueInvocationException: C:\Program Files\WindowsPowerShell\Modules\au\2019.5.22\Public\Update-Package.ps1:384
Line |
 384 |      [System.Net.ServicePointManager]::SecurityProtocol = 'Ssl3,Tls,Tl …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception setting "SecurityProtocol": "The requested security protocol is not supported."

sql-server-2019-cumulative-update - checking updates using au version 2019.5.22

URL check
  https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB4548597-x64.exe
nuspec version: 14.0.3294.2
remote version: 15.0.4033.1
New version is available
Automatic checksum started

ERROR:  Unrecognized command

DESCRIPTION:
        SC is a command line program used for communicating with the
        Service Control Manager and services.
USAGE:
        sc <server> [command] [service name] <option1> <option2>...


        The option <server> has the form "\\ServerName"
        Further help on commands can be obtained by typing: "sc [command]"
        Commands:

I think this happens in PowerShell 7 - alias sc does not exist there

@majkinetor
Copy link
Owner

Yeah, I know... feel free to PR.

@flcdrg
Copy link
Contributor Author

flcdrg commented May 5, 2020

on the way 😃

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants