Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

pbiviz --create-cert error

Here is the details of my error:

C:\Users\nilotpal.datta\Documents\Power BI\Developer>pbiviz --create-cert
'powershell' is not recognized as an internal or external command,
operable program or batch file.
error Create certificate error: { Error: Command failed: powershell "$cert = ('Cert:\CurrentUser\My\' + ( New-SelfSignedCertificate -DnsName localhost -HashAlgorithm sha256 -Type Custom -Subject localhost -KeyAlgorithm RSA -KeyLength 2048 -KeyExportPolicy Exportable -CertStoreLocation Cert:\CurrentUser\My -NotAfter (get-date).AddDays(180) | select Thumbprint | ForEach-Object { $_.Thumbprint.ToString() }).toString()); Export-PfxCertificate -Cert $cert -FilePath 'C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\certs\PowerBICustomVisualTest_public.pfx' -Password (ConvertTo-SecureString -String '7529797484684206' -Force -AsPlainText)"
'powershell' is not recognized as an internal or external command,
operable program or batch file.

at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:653:13)
at createCertFile (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\bin\pbiviz.js:209:25)
at Command.<anonymous> (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\commander\index.js:395:35)
at Command.emit (events.js:189:13)
at Command.parseOptions (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\commander\index.js:702:14)
at Command.parse (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\commander\index.js:455:21)
at Object.<anonymous> (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\bin\pbiviz.js:60:9)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
status: 1,
signal: null,
output:
[ null,
<Buffer >,
<Buffer 27 70 6f 77 65 72 73 68 65 6c 6c 27 20 69 73 20 6e 6f 74 20 72 65 63 6f 67 6e 69 7a 65 64 20 61 73 20 61 6e 20 69 6e 74 65 72 6e 61 6c 20 6f 72 20 65 ... > ],
pid: 15324,
stdout: <Buffer >,
stderr:
<Buffer 27 70 6f 77 65 72 73 68 65 6c 6c 27 20 69 73 20 6e 6f 74 20 72 65 63 6f 67 6e 69 7a 65 64 20 61 73 20 61 6e 20 69 6e 74 65 72 6e 61 6c 20 6f 72 20 65 ... > }

C:\Users\nilotpal.datta\Documents\EY Badge\Power BI\Developer>services.msc
'services.msc' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\nilotpal.datta\Documents\EY Badge\Power BI\Developer>pbiviz --create-cert
'powershell' is not recognized as an internal or external command,
operable program or batch file.
error Create certificate error: { Error: Command failed: powershell "$cert = ('Cert:\CurrentUser\My\' + ( New-SelfSignedCertificate -DnsName localhost -HashAlgorithm sha256 -Type Custom -Subject localhost -KeyAlgorithm RSA -KeyLength 2048 -KeyExportPolicy Exportable -CertStoreLocation Cert:\CurrentUser\My -NotAfter (get-date).AddDays(180) | select Thumbprint | ForEach-Object { $_.Thumbprint.ToString() }).toString()); Export-PfxCertificate -Cert $cert -FilePath 'C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\certs\PowerBICustomVisualTest_public.pfx' -Password (ConvertTo-SecureString -String '35251793965561573' -Force -AsPlainText)"
'powershell' is not recognized as an internal or external command,
operable program or batch file.

at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:653:13)
at createCertFile (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\bin\pbiviz.js:209:25)
at Command.<anonymous> (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\commander\index.js:395:35)
at Command.emit (events.js:189:13)
at Command.parseOptions (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\commander\index.js:702:14)
at Command.parse (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\node_modules\commander\index.js:455:21)
at Object.<anonymous> (C:\Users\nilotpal.datta\AppData\Roaming\npm\node_modules\powerbi-visuals-tools\bin\pbiviz.js:60:9)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
status: 1,
signal: null,
output:
[ null,
<Buffer >,
<Buffer 27 70 6f 77 65 72 73 68 65 6c 6c 27 20 69 73 20 6e 6f 74 20 72 65 63 6f 67 6e 69 7a 65 64 20 61 73 20 61 6e 20 69 6e 74 65 72 6e 61 6c 20 6f 72 20 65 ... > ],
pid: 1932,
stdout: <Buffer >,
stderr:
<Buffer 27 70 6f 77 65 72 73 68 65 6c 6c 27 20 69 73 20 6e 6f 74 20 72 65 63 6f 67 6e 69 7a 65 64 20 61 73 20 61 6e 20 69 6e 74 65 72 6e 61 6c 20 6f 72 20 65 ... > }

1 REPLY 1
v-evelk
Microsoft Employee
Microsoft Employee

Hello,

Please add the following to your Path environment variable:

 

%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
 
Kind regards,
 
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.