Articles on Trending Technologies

Technical articles with clear explanations and examples

How to get the location of the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 31-Aug-2021 818 Views

To find the location of the particular Azure VM using Az CLI, we can use the below command but before that, you need to make sure you are connected to the Azure cloud and had set that specific subscription.PS C:\> az vm show -n VMName -g ResourceGroupName --query '[location]' -otsvAlternatively, you can use the below command to get the location of the Azure VM.PS C:\> az vm list --query "[?name==’VMName’].location" -otsv

Read More

How to connect to the Azure subscription using Azure CLI in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 31-Aug-2021 9K+ Views

To connect to the specific azure subscription using Az CLI we need to use “Az account set” command but before using this command make sure you are connected with the Azure cloud using “az login” account.az account set --subscription 'subscription name or id'You can also use -s instead of --subscription.az account set -s 'subscription name or id'To check if the subscription is set properly, use the below command.PS C:\> az account show -otable

Read More

How to log in to the Azure account using Az CLI command in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 31-Aug-2021 16K+ Views

To login to the Azure account using Azure CLI, we need to use the az login command. Once you type the az login command, it will prompt for the Azure portal login console.If you need to log in with the device authentication code in the browser, you need to use the parameter –use-device-code.PS C:\> az login --use-device-code To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ‘DeviceCode’ to authenticate.You need to open a website https://microsoft.com/devicelogin/ and have to enter a code. If you are not already connected with the Microsoft Azure portal, you ...

Read More

How to get the Application security groups of the Azure VM using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 31-Aug-2021 631 Views

To get the Application security groups of the Azure VM using PowerShell, we need to first get the Network Interface of the Azure VM.The below command will retrieve the NIC name of the Azure VM.PS C:\> $vm = Get-AzVM -Name TestVM $nic = (($vm.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1]Once we have the NIC name, we can use the Get-AzNetworkInterface command to retrieve the NIC information and the Security group.The below command will retrieve the application security group names using PowerShell.PS C:\> $nicsettings = Get-AzNetworkInterface -Name $nic $nicsettings.IpConfigurations.ApplicationSecurityGroups

Read More

How to retrieve the Azure subnets connected to the virtual network using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 31-Aug-2021 3K+ Views

To get all the subnets attached to the virtual network using PowerShell, we need to use the GetAzVirtualNetwork command.PS C:\> $vn = Get-AzVirtualNetwork -Name VirtualNetworkNameTo get the Subnets and its address prefix details, you need to filter out the Subnets and AddressPrefixPS C:\> $vn.Subnets | Select Name, AddressPrefix

Read More

How to find the file modified after a certain date using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 31-Aug-2021 17K+ Views

To get all the files that are modified after certain days, we need to use the LastWriteTime property.The below command shows us the files which are modified within the last 30 days in the C:\temp folder.Get-ChildItem C:\Temp | where{$_.LastWriteTime -ge (GetDate).AddDays(-30)}You can also use the AddMonths() or AddYears() instead of AddDays() as per your requirement.To get all the files that are modified before 30 days, use the below command.Get-ChildItem C:\Temp | where{$_.LastWriteTime -le (GetDate).AddDays(-30)}To get the file modified after a specific date, you need to compare the LastWriteTime with the Date. For example, we need all the files that are ...

Read More

Electric Power and Efficiency of Electric Device

Manish Kumar Saini
Manish Kumar Saini
Updated on 30-Aug-2021 1K+ Views

Power or Electric PowerThe rate at which work is done in an electric circuit is called as electric power. In other word, the work done per unit time is termed as electric power. It is denoted p or P.Formula and Unit of PowerWhen voltage is applied across a resistor, it causes current to flow through it. Therefore, work is being done in moving the electrons through the resistor in a unit time is called the electric power.Referring the above figure, $$\mathrm{V=\frac{work}{Q}}$$$$\mathrm{\Rightarrow work(W)=VQ=VIt}$$As, the power is defined as work done per unit time i.e.$$\mathrm{Power(P)=\frac{work\:done\:in\:electric\:circuit(W)}{Time(t)}=\frac{VIt}{t}}$$$$\mathrm{(∵V=IR\:or\:I=\frac{V}{R})}$$$$\mathrm{∴P=VI=I^2R=\frac{V^2}{R}}$$The above three formulae are equally valid for ...

Read More

What is Requirement Traceability Matrix?

Vineet Nanda
Vineet Nanda
Updated on 30-Aug-2021 2K+ Views

Introduction to Requirement Traceability MatrixA traceability matrix is a table-style document that is used to track requirements in the development of software applications. It can be used to trace backwards (from Coding to requirement) as well as forwards (from Requirements to Design or Coding). Requirement Traceability Matrix (RTM) or Cross Reference Matrix are other names for it (CRM).It is produced prior to the test execution process to ensure that all requirements are addressed in the form of a Test case, ensuring that no testing is missed. We connect all of the requirements to their associated test cases in the RTM ...

Read More

Get contents of a Tkinter Entry widget

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 20-Aug-2021 4K+ Views

An Entry widget is a basic one-line character widget that supports only single-line text input. An Entry widget can be defined by initializing the Entry(parent, width) constructor.To validate the Entry widget, we can use the get() method which results in the character entered in the Entry widget.Let us define an Entry widget that accepts single-line text input, and we will print the character that is input in the Entry widget.Example#Import the required Libraries from tkinter import * from tkinter import ttk #Create an instance of Tkinter frame win = Tk() #Set the geometry of Tkinter frame win.geometry("750x250") def get_content(): ...

Read More

Save File Dialog Box in Tkinter

Dev Prakash Sharma
Dev Prakash Sharma
Updated on 20-Aug-2021 15K+ Views

We often use Open and Save Dialog. They are common across many applications and we already know how these dialogs work and behave. For instance, if we click on open, it will open a dialog to traverse the location of the file. Similarly, we have the Save Dialog.We can create these dialogs using Python tkFileDialog package. In order to work with the package, we have to import this in our environment.Type the following command to import the tkFileDialog package in the notebook, from tkinter.filedialog import asksaveasfileExampleIn this example, we will create an application that will save the file using the ...

Read More
Showing 48301–48310 of 61,297 articles
Advertisements