Skip to content

(tools): use of deprecated wmic module windows #16419

@Calkines

Description

@Calkines

Cdk Cli uses WMI (Windows Management Instrumentation) cmdlets (docs) that is deprecated since version 3 of Power Shell. Today the cmdlet used is CIM (Common Information Model).

With the WMI the command to init a CDK folder cannot be executed.

Command failed: wmic path win32_computersystemproduct get uuid
'wmic' is not recognized as an internal or external command,
operable program or batch file.

Reproduction Steps

Install cdk:

npm install -g aws-cdk

Try to initiate a cdk repo like this:

cdk init

What did you expect to happen?

I expected the cdk prepare the first config files in folder.

What actually happened?

The mentioned error above.

Environment

  • Windows 10 Version 21H1 (OS Build 19043.1165)
  • Node version v12.16.3
  • Powershell Desktop Edition 5.1.19041.1151
  • or Powershell Core Edition 7.0.3

Other

These links maybe useful:


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1package/toolsRelated to AWS CDK Tools or CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions