Skip to content

Demystify things and share ideas I am working with everyday

Notifications You must be signed in to change notification settings

qliu95114/demystify

Repository files navigation

Demystify things and share ideas I am working with Everyday

Things are related to Azure Platform

This repository contains various scripts and samples that can be used to enhance your Azure infrastructure and streamline your network operations. From analyzing network packets and logs to automating tasks, these resources aim to simplify your Azure VM management and network troubleshooting.

Contents

  1. AzureSpeedStorage: Explore a Terraform sample that demonstrates how to create storage accounts in different Azure regions.
  2. PS_Azure(Library): Discover a set of PowerShell scripts that can assist you in automating common Azure tasks. This script showcases the power and flexibility of PowerShell for managing your Azure environment.
  3. ADX for Storage Analytics Logs: Learn how to leverage Azure Data Explorer (ADX) to analyze Storage Analytics logs with ease. By following a few simple steps, you can gather logs from customers and other sources without the need for complex log configuration.
  4. ADX for Network Trace PCAPs: Explore the capabilities of ADX in analyzing network trace PCAPs. This functionality enables you to gather network traces from customers and efficiently analyze them using ADX's powerful querying capabilities.
  5. ADX for NSGFlowLogV2: Discover how ADX can be utilized to analyze NSGFlowLogV2, allowing you to obtain raw JSON logs from customers and other sources without the need for extensive log configuration. ADX simplifies the process of extracting valuable insights from network flow logs.
  6. ADX for Random Text Logs: Learn how ADX can be used to analyze various types of random text logs, such as Linux secure logs and DNS fail logs. By leveraging ADX's query language, you can gain valuable insights from these logs and identify potential issues in your environment.
  7. Linux_bash: Access a post-boot script designed specifically for Azure VMs running Linux. This script provides a set of useful commands and configurations to optimize your Linux-based VMs.
  8. Folder network\pcap2kusto: Utilize the pcap2kusto.ps1 script to import PCAP files into Azure Data Explorer (Kusto). This enables you to perform advanced analysis on network packet captures and gain deeper visibility into your network traffic.
  9. Folder network\mergecapfiles: Combine multiple PCAP files into a single file using the mergecapfiles.ps1 script. This simplifies the management and analysis of network packet captures by consolidating them into a single, unified file.
  10. Script network\get-MicrosoftIpAddressRange.ps1: which helps you find Microsoft Azure and Office 365 IP ranges and details using public data files. This script simplifies the process of identifying and managing IP ranges associated with Microsoft services.
  11. (ExternalLink) Azure file storage: Diagnose Script on Azure File Storage

Things are NOT related to Azure Platform

  1. connectivityscript: This script is specifically designed for cloud environments and allows you to perform network connectivity tests across your infrastructure.

  2. pingmesh: Find the pingmesh script for both Linux and Windows environments within the respective folders.

  3. ps_mediaencoder : Powershell script with ffmpeg

  4. How to install Windows Terminal on Windows Server 2022/2019

    1. Go to MS STORE link
    2. Search Microsoft.UI.Xaml.2.7_8wekyb3d8bbwe and Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe
    3. Download Microsoft.UI.Xaml.2.7_7.2208.15002.0_x64__8wekyb3d8bbwe.appx
    4. Downlaod Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe
    5. Download Windows Terminal(latest)
    6. Go to download folder
       Add-AppxPackage -Path C:\setup\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x64__8wekyb3d8bbwe.Appx
       Add-AppxPackage -Path C:\setup\Microsoft.UI.Xaml.2.7_7.2208.15002.0_x64__8wekyb3d8bbwe.Appx
       Add-AppxPackage -Path C:\setup\Microsoft.WindowsTerminal_Win11_1.15.2875.0_8wekyb3d8bbwe.msixbundle
      
  5. How to get temperature

    WMIC version

    wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CriticalTripPoint, CurrentTemperature
    

    Powershell version

    $a=Get-CimInstance -Namespace root/wmi -ClassName MsAcpi_ThermalZoneTemperature | select CriticalTripPoint, CurrentTemperature , InstanceName
    foreach ($line in $a) { write-output "$($line.InstanceName),$(($line.CriticalTripPoint-2732)/10),$(($line.CurrentTemperature-2732)/10)"}
     ACPI\ThermalZone\CPUZ_0,128,71
     ACPI\ThermalZone\GFXZ_0,128,30
     ACPI\ThermalZone\EXTZ_0,128,41
     ACPI\ThermalZone\LOCZ_0,128,47
     ACPI\ThermalZone\BATZ_0,128,23
     ACPI\ThermalZone\CHGZ_0,128,45
     ACPI\ThermalZone\PCHZ_0,128,0
  6. Windows 11 Setup Bypass Registery

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig]
    "BypassTPMCheck"=dword:00000001
    "BypassRAMCheck"=dword:00000001
    "BypassSecureBootCheck"=dword:00000001
    '``
    
  7. On Windows how to treat BIOS time as UTC timezone

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
    "RealTimeIsUniversal"=dword:00000001
    
  8. Fun Apple II Video Game in 1983 http://loderunnerwebgame.com/game/

  9. How to convert PDF to JPG,PNG

    1. Download ImageMagick from the official website: ImageMagick Download
    2. Download Ghostscript from the official website: Ghostscript Download
    3. Run in Command Prompt
    magick convert -density 200 <pathofpdffile> <pathofjpgfile or pathofpngfile>
    magick convert -density 200 -colorspace CMYK <pathofpdffile> <pathofjpgfile or pathofpngfile>
    
    >batch convert for all the files start with 2024*.pdf, replace the extension and use .png instead
    for %a in (2024*.pdf) do (magick convert -density 150 -colorspace CMYK %a %~na.png)