How to run IoTCorePShell.cmd - powershell

I try to port Prolific USB to COM converter for solve my other problem: List UART -> COM converter in Windows Device Portal
I found this manual: https://learn.microsoft.com/en-us/windows/iot-core/learn-about-hardware/peripheraldrivers and copied all necessary files to separate folder:
oem6.inf
ser2pl64.sys
serenum.sys
I installed:
Windows 10 IoT Core Packages
Windows Assessment and Deployment Kit including Windows PE add-on
Now I try to launch IoTCorePShell.cmd for run New-IoTInf2Cab as mentioned in the manual.
I tried both cmd and Power Shell, both with administrator rights and without.
In Power Shell I get:
PS C:\Users\olga\Desktop\COMDriver> New-IoTInf2Cab
New-IoTInf2Cab : The term 'New-IoTInf2Cab' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-IoTInf2Cab
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-IoTInf2Cab:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How can I run New-IoTInf2Cab?

OK, it was necessary to clone the repository.
The IoTCorePShell.cmd stay in the root.
https://github.com/ms-iot/iot-adk-addonkit

Related

error in executing lua code in vscode powershell terminal

i normally execute my lua files in the terminal with lua file-name.lua. i recently found out that you could also execute the code from terminal using lua53 .\file_name.lua where the lua version was 5.3
the lua version that im using is 5.1 so i entered lua51 .\file_name.lua on my terminal but i was given this error instead
lua51 : The term 'lua51' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ lua51 .\main.lua
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (lua51:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
the lua version that im using is 5.1 so i entered
lua51 .\file_name.lua
on my terminal but i was given this error instead
try to write this
lua5.1 .\file_name.lua

Why do I have a terminal error in VS Code?

I'm trying to learn Python using VS Code. Onde of my task is to opne a file from folder in VS Code nad then run a terminal but when I'm opening it i have error like below in temrinal
PS C:\Users\Łukasz\Desktop\Exercise Files> & C:/Users/ukasz/AppData/Local/Programs/Python/Python39/python.exe "c:/Users/ukasz/Desktop/Exercise Files/Chap02/02_07_begin.py"
& : The term 'C:/Users/ukasz/AppData/Local/Programs/Python/Python39/python.exe' is not recognized as the name of a cmdlet, function, script file, or operable progra
m. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ & C:/Users/ukasz/AppData/Local/Programs/Python/Python39/python.exe "c ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:/Users/ukasz/...on39/python.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\Łukasz\Desktop\Exercise Files>
Could you explain me what I'm doing wrong? I'm not sure what's wrong in the file path and what I can change. I was just adding a file from my desktop, and also just installing a Python on my computer, nothing more.
If it help - I'm learning from the Linkedin Learnign, so I'm just trying to do what they say ;)

PowerShell 6.2.4 : Get-Clipboard' is not recognized as the name of a cmdlet

I would expect Get-Clipboard to work from this
I am on PowerShell 6.2.4 and MacOs Catalina?
Get-Clipboard : The term 'Get-Clipboard' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At /Users/.../debug.ps1:41 char:1
+ Get-Clipboard
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-Clipboard:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PowerShell [Core] v6.x has no clipboard cmdlets - you'll have to wait for v7.0 for them to return (the available preview releases have them).
The documentation URL in your link ends in ?view=powershell-7, indicating a v7.x topic; there's a dropdown list labeled "Version" to select a different PowerShell version; if you had selected 6, you would have been told that no such page exists for v6.x
In the meantime, you have two options:
Use platform-specific tools such as pbpaste / pbcopy (macOS) and xclip (Linux distros with X11-based desktop), and clip.exe / the System.Windows.Forms assembly on Windows.
Use the ClipboardText third-party module (authored by me; repo), which wraps the above tools for you (text support only, via commands Set-ClipboardText and Get-ClipboardText).
The module also works with Windows PowerShell versions v2-v4, which similarly lack clipboard utilities.

How to reserve a static IP for Azure Virtual Machines?

Amazon have Elastic IP that you can assign to an instance,
How can I do that with Azure for existing VM?
(I don't want to change all my DNS entries if the IP changes)
I found some articles about running power shell commands
1. http://michaelwasham.com/windows-azure-powershell-reference-guide/using-reserved-ip-addresses-with-microsoft-azure-virtual-machines/
2. http://azure.microsoft.com/blog/2014/05/14/reserved-ip-addresses/
3. http://azure.microsoft.com/blog/2014/04/22/static-internal-ip-address-for-virtual-machines/
But the commands are not recognized on my server (Windows server 2012 R2)
Any idea how can I do that?
This is the error that I'm getting on Power Shell:
PS C:\> New-AzureReservedIP – ReservedIPName "137.117.11.18" –Label "people-dns-ip" –Location "US West"
New-AzureReservedIP : The term 'New-AzureReservedIP' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ New-AzureReservedIP – ReservedIPName "137.117.11.18" –Label "people-dns-ip" –Loc ...
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-AzureReservedIP:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Sounds like you are missing the requiered CMD for PowerShell. Please download the Microsoft Webinstaller:
Download Microsoft Web-Installer
and do an fresh installation of Microsoft PowerShell. After this you should be able to use the "New-AzureReservedIP" command. Maybe you are running an old version of PowerShell without this CMDlet.
For more information about installation PowerShell, see: Configure and Install PowerShell (Azure)

Windows PowerShell cannot recognize sqlite3

I have installed SQLite3 on my computer in G:\SQLite3\sqlite3.exe
However, when I type "sqlite3" (no quotes) to PowerShell, it gives me the following error:
sqlite3 : The term 'sqlite3' is not recognized as the name of a cmdlet, functio
n, script file, or operable program. Check the spelling of the name, or if a pa
th was included, verify that the path is correct and try again.
At line:1 char:1
+ sqlite3
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (sqlite3:String) [], CommandNotF
oundException
+ FullyQualifiedErrorId : CommandNotFoundException
My Environmental Path includes G:\SQLite3, so when I run sqlite3 in command prompt (cmd.exe), it runs just fine. I prefer PowerShell though, so I would be glad, if someone could point me in the right direction how to make it accept this command. If that matters, I use Windows 8.
Most likely the directory G:\SQLite3 is not in your PATH environment variable, so PowerShell doesn't know where to look for the executable. Either run the executable with its full path, or add the directory to the $env:PATH:
$env:PATH += ';G:\SQLite3'
& sqlite3.exe