0:00
uh hello guys uh welcome to this video
0:02
so in this video I will show you how to
0:04
fix this error uh basically it comes
0:06
whenever you execute npmi or pnmi
0:10
command in uh any sort of project in VS
0:13
code it basically tells you that the
0:15
command can't be executed because you
0:17
haven't uh just set your execution
0:20
policy inside your powershell you
0:23
have you get the security error it's
0:27
basically comes it's unauthorized so
0:30
there is just one line of code that you
0:32
need to add inside your PowerShell uh in
0:34
this video I will show you so just go to
0:37
start menu and just type here Windows
0:40
PowerShell and just right click and run
0:43
this program as administrator so just
0:46
run this PowerShell grant the permission
0:49
and now you are inside your Windows
0:51
PowerShell so you can see it is not
0:54
command line it is powershell so just
0:56
open with the administrator uh
0:58
permission i have given this command
1:00
both these commands that I will show you
1:02
I have given in the description of this
1:04
video so first command let me show you
1:07
both commands do the same thing so you
1:09
can execute either of them so first of
1:20
execution policy you just need to write
1:24
uh same thing that I'm writing right
1:26
here spelling needs to be the same right
1:29
here dash scope and then the current
1:45
remote signed so we need to change our
1:49
uh permission to remote sign this is
1:51
actually the command here set dash
1:54
execution policy dash scope current user
1:58
dash execution policy remote sign this
2:01
is actually the command you just need to
2:04
set this just now press enter key i have
2:07
already executed this command so I will
2:10
not execute once again so this is the
2:14
command the second command is this
2:17
version it also does the same
2:20
thing so if the previous command is not
2:23
working you can execute this
2:25
one so either of these commands will
2:28
resolve the problem current user
2:33
unrestricted so now you will not be
2:35
restricted you will be able to execute
2:38
the command set execution policy -ash
2:40
scope current user unrestricted so if
2:43
the previous command is not working you
2:44
can uh execute this one so both the
2:48
commands I've given in the description
2:49
of this video so after that
2:55
actually restart your command line after
2:58
executing both these commands
3:01
so now your you will be able to execute
3:05
npmi command you there will be no sort
3:08
of error which will be there so this is
3:11
the thing thank you very much for
3:13
watching this video and also check out
3:16
my website freemediatools.com which
3:19
contains thousands of tools regarding
3:21
audio video and image