This Azure tutorial will discuss the syntax and usage of the Get-AzTableRow PowerShell command and how to fix the error. The term ‘Get-AzTableRow’ is not recognized as the name of a cmdlet, which I got while trying to get the rows from the Azure Storage tables using the Get-AzTableRow PowerShell command in Azure.
Table of Contents
Get-AzTableRow
This Azure PowerShell command can get a row in your Azure Storage tables.
Syntax of Get-AzTableRow
Get-AzTableRow -Table $myTable
Example
You can execute the below PowerShell script to retrieve the Azure storage table rows from the specified table.
$mystorageacntName = "mynewstoragedemo"
$mystorageacntKey = "pNWgITmf33ROgS1ixyUAQ4fIQIhaqBUWQjwI79/PjLy9zRoqEsvOQ7fn1gu41sj+dQ9eCHA/sDew8/OhDMfI9w=="
$cntx = New-AzStorageContext $mystorageacntName -StorageAccountKey $mystorageacntKey
$mycloudTable = (Get-AzStorageTable –Name "AzureWebJobsHostLogs202008" –Context $cntx).CloudTable
Get-AzTableRow -Table $mycloudTable
However, after executing the above PowerShell script to retrieve the rows from the Azure Storage tables. I got the error ” The term ‘Get-AzTableRow’ is not recognized as the name of a cmdlet “.
Check out the screenshot below, where I got the error after executing the above script.
Below is the exact error message that I got
Get-AzTableRow: The term ‘Get-AzTableRow’ 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:5 char:1
- Get-AzTableRow -Table $mycloudTable
~~~~~~- CategoryInfo : ObjectNotFound: (Get-AzTableRow:String) [], CommandNotF
oundException - FullyQualifiedErrorId : CommandNotFoundException
- CategoryInfo : ObjectNotFound: (Get-AzTableRow:String) [], CommandNotF
Well, Now follow the below steps to fix the error. The term ‘Get-AzTableRow’ is not recognized as the name of a cmdlet.
Open the Windows PowerShell or PowerShell ISE with Run as Administrator mode
Now, the next step is to run the below PowerShell cmdlet to install the AzTable module
PS C:\WINDOWS\system32> Install-Module AzTable -Force
You can see below I have executed the above PowerShell cmdlet, and then it started installing the module. It took just 1 second, and the installation of the AzTable module was successful without any issues.
After successfully installing the AzTable module, I reran the PowerShell script to get the rows from the Azure Storage table.
$mystorageacntName = "mynewstoragedemo"
$mystorageacntKey = "pNWgITmf33ROgS1ixyUAQ4fIQIhaqBUWQjwI79/PjLy9zRoqEsvOQ7fn1gu41sj+dQ9eCHA/sDew8/OhDMfI9w=="
$cntx = New-AzStorageContext $mystorageacntName -StorageAccountKey $mystorageacntKey
$mycloudTable = (Get-AzStorageTable –Name "AzureWebJobsHostLogs202008" –Context $cntx).CloudTable
Get-AzTableRow -Table $mycloudTable
You can see the below screenshot. The script executed successfully without any issues, and I got all the rows from the Azure Storage table without any issues.
Get-AzTableRow – Video Tutorial
You may also like to follow the articles below
Wrapping Up
In this article, we discussed the syntax and usage of the Get-AzTableRow PowerShell command and how to fix the error. The term ‘Get-AzTableRow’ is not recognized as the name of a cmdlet, which I got while trying to get the rows from the Azure Storage tables using the Get-AzTableRow PowerShell command. I hope it will help you to fix your issue as well !!!
I am Bijay, a Microsoft MVP (10 times) having more than 17 years of experience in the software industry. During my IT career, I got a chance to share my expertise in SharePoint and Microsoft Azure, like Azure VM, Azure Active Directory, Azure PowerShell, etc. I hope you will learn from these Azure tutorials. Read more