← Back to Articles         
Azure AzCopy and Networking PowerShell Commands – AZ-104 Revision

Azure AzCopy and Networking PowerShell Commands – AZ-104 Revision

Published on 25 Oct 2026     4 min read Microsoft AZURE
Azure 104
 

Azure AzCopy and PowerShell Commands with Simple Examples

Command

Simple example

Purpose

azcopy copy

azcopy copy "C:\Images\photo.jpg" "https://myaccount.blob.core.windows.net/images/photo.jpg?<SAS>"

Copies a file to Azure Blob Storage.

azcopy copy --recursive

azcopy copy "\\server1\images" "https://myaccount.blob.core.windows.net/images?<SAS>" --recursive

Copies all files and subfolders recursively.

azcopy sync

azcopy sync "C:\Images" "https://myaccount.blob.core.windows.net/images?<SAS>"

Synchronizes source and destination changes.

Get-ChildItem

Get-ChildItem -Path "C:\Images"

Lists files and folders in a directory.

Get-ChildItem -Recurse

Get-ChildItem -Path "C:\Images" -Recurse

Lists files and folders, including subfolders.

Set-AzStorageBlobContent

Set-AzStorageBlobContent -File "C:\Images\photo.jpg" -Container "images" -Blob "photo.jpg" -Context $ctx

Uploads a file to a Blob Storage container.

Get-AzStorageBlob

Get-AzStorageBlob -Container "images" -Context $ctx

Lists blobs in a container.

Get-AzStorageContainer

Get-AzStorageContainer -Context $ctx

Lists containers in a storage account.

New-AzStorageContainer

New-AzStorageContainer -Name "images" -Context $ctx

Creates a new blob container.

Remove-AzStorageBlob

Remove-AzStorageBlob -Container "images" -Blob "photo.jpg" -Context $ctx

Deletes a blob.

Get-AzStorageAccount

Get-AzStorageAccount -ResourceGroupName "rg-jntech-lab"

Retrieves storage account details in a resource group.

New-AzStorageAccount

New-AzStorageAccount -ResourceGroupName "rg-jntech-lab" -Name "jntechstore123" -Location "CentralIndia" -SkuName "Standard_LRS" -Kind "StorageV2"

Creates a storage account.

Connect-AzAccount

Connect-AzAccount

Signs in to Azure PowerShell.

Get-AzSubscription

Get-AzSubscription

Lists accessible Azure subscriptions.

Set-AzContext

Set-AzContext -SubscriptionId "your-subscription-id"

Selects the active subscription.

Get-AzResourceGroup

Get-AzResourceGroup

Lists resource groups.

Get-AzVM

Get-AzVM -ResourceGroupName "rg-jntech-lab"

Lists virtual machines in a resource group.

Start-AzVM

Start-AzVM -ResourceGroupName "rg-jntech-lab" -Name "jntech-vm1"

Starts a virtual machine.

Stop-AzVM

Stop-AzVM -ResourceGroupName "rg-jntech-lab" -Name "jntech-vm1"

Stops a virtual machine.

Restart-AzVM

Restart-AzVM -ResourceGroupName "rg-jntech-lab" -Name "jntech-vm1"

Restarts a virtual machine.

Important points for AZ-104

  • AzCopy is a command-line utility for transferring data to and from Azure Storage.

  • --recursive includes files in subdirectories.

  • azcopy sync synchronizes differences; review deletion behavior before using it.

  • Set-AzStorageBlobContent uploads files using Azure PowerShell.

  • $ctx represents an Azure Storage context containing the required storage connection and authentication information.

  • <SAS> is a placeholder for a valid Shared Access Signature; replace it with an appropriately scoped SAS token. Do not include the angle brackets.

     

     

     

    Windows Networking Commands – AZ-104 Quick Revision

    Command

    Sample Command

    Purpose

    ipconfig

    ipconfig

    Displays IP configuration for network adapters.

    ipconfig /all

    ipconfig /all

    Displays detailed network settings, including DNS and MAC address.

    ipconfig /release

    ipconfig /release

    Releases the current DHCP-assigned IPv4 address.

    ipconfig /renew

    ipconfig /renew

    Requests a new DHCP IP address.

    ipconfig /flushdns

    ipconfig /flushdns

    Clears the local DNS resolver cache.

    ipconfig /displaydns

    ipconfig /displaydns

    Displays cached DNS records.

    ping

    ping google.com

    Tests connectivity and measures response time.

    tracert

    tracert google.com

    Shows the network hops taken to reach a destination.

    pathping

    pathping google.com

    Analyzes packet loss and latency across network hops.

    nslookup

    nslookup google.com

    Queries DNS to resolve a domain name.

    netstat -an

    netstat -an

    Displays network connections and listening ports numerically.

    netstat -ano

    netstat -ano

    Displays connections, listening ports, and associated process IDs.

    netstat -r

    netstat -r

    Displays the IPv4 and IPv6 routing tables.

    arp -a

    arp -a

    Displays the local ARP cache mapping IP addresses to MAC addresses.

    route print

    route print

    Displays the computer's IP routing table.

    route add

    route add 10.10.0.0 mask 255.255.0.0 192.168.1.1

    Adds a route to a network through a specified gateway.

    getmac

    getmac /v

    Displays MAC addresses of network adapters.

    hostname

    hostname

    Displays the computer's hostname.

    curl

    curl -I https://google.com

    Sends an HTTP request and displays response headers.

    telnet

    telnet server.example.com 443

    Tests TCP connectivity if the Telnet client is installed.

    Test-NetConnection

    Test-NetConnection google.com -Port 443

    Tests remote TCP connectivity and reports diagnostic details in PowerShell.

    Get-NetIPConfiguration

    Get-NetIPConfiguration

    Displays IP configuration using PowerShell.

    Get-NetAdapter

    Get-NetAdapter

    Lists network adapters and their status in PowerShell.

    Get-NetRoute

    Get-NetRoute

    Displays routing information in PowerShell.

    Get-NetTCPConnection

    Get-NetTCPConnection

    Displays current TCP connections in PowerShell.

    Resolve-DnsName

    Resolve-DnsName google.com

    Resolves DNS names using PowerShell.

    Get-DnsClientCache

    Get-DnsClientCache

    Displays cached DNS records in PowerShell.

    netsh

    netsh interface ip show config

    Displays or configures Windows network settings.

    netsh wlan show interfaces

    netsh wlan show interfaces

    Displays wireless connection details.

    netsh advfirewall show allprofiles

    netsh advfirewall show allprofiles

    Displays Windows Defender Firewall profile settings.

    Important AZ-104 exam distinctions

    Requirement

    Command

    Check VM IP address

    ipconfig /all

    Test basic connectivity

    ping <IP-address>

    Check DNS resolution

    nslookup <domain>

    Test a specific TCP port

    Test-NetConnection <host> -Port 443

    Check listening ports and connection states

    netstat -an

    Identify the process using a connection

    netstat -ano

    Find the process name from a PID

    tasklist /FI "PID eq 1234"

    Trace the route to a destination

    tracert <hostname>

    Clear DNS cache

    ipconfig /flushdns

    Inspect network routes

    route print

    Check network adapter status

    Get-NetAdapter

    Inspect DNS resolution details

    Resolve-DnsName <domain>

    Remember: ping tests ICMP connectivity, while Test-NetConnection -Port tests TCP connectivity to a specific port. A failed ping does not necessarily mean the destination is unreachable because ICMP may be blocked by a firewall or network security rule.

← Back to Articles