### Example .NET SDK Output Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/includes/dotnet10-sdk-version.md This is an example of the output you should see if .NET 10.0 SDK is installed. If no version starting with '10' is listed, you need to install it. ```console 9.0.100 [C:\Program Files\dotnet\sdk] 10.0.100 [C:\Program Files\dotnet\sdk] ``` -------------------------------- ### Run the setup script Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/troubleshoot-network-security-issues/includes/2-set-up-troubleshooting-environment.md Execute the setup script to create the example topology. This script automates the deployment of resources needed for the troubleshooting exercises. ```bash bash networking/setup.sh ``` -------------------------------- ### Run the setup script Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/cloud-hybrid-connectivity/includes/2-setup-environment.md Execute the setup script to create the example topology and all necessary Azure resources. This script may take some time to complete. ```powershell networking/setup.ps1 ``` -------------------------------- ### Clone the setup script from GitHub Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/troubleshoot-network-security-issues/includes/2-set-up-troubleshooting-environment.md Clone the setup script repository to your local environment. This script contains the necessary commands to create the example topology for troubleshooting. ```bash git clone https://github.com/MicrosoftDocs/mslearn-troubleshoot-network-security-issues networking ``` -------------------------------- ### Example .NET SDK Version Output Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/includes/dotnet7-sdk-version.md This is an example of the output you should expect when running the `dotnet --list-sdks` command if .NET 7.0 is installed. ```console 6.0.308 [C:\Program Files\dotnet\sdk] 7.0.100 [C:\Program Files\dotnet\sdk] 7.0.102 [C:\Program Files\dotnet\sdk] ``` -------------------------------- ### Example .NET SDK Output Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/includes/dotnet9-sdk-version.md This is an example of the output you should see when running the `dotnet --list-sdks` command, indicating that .NET 9.0 is installed. ```console 8.0.100 [C:\Program Files\dotnet\sdk] 9.0.100 [C:\Program Files\dotnet\sdk] ``` -------------------------------- ### Install Go Package Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/develop-ai-enabled-apps-using-github-copilot-sdk/includes/3-what-github-copilot-sdk.md Use go get to install the GitHub Copilot SDK for Go applications. ```bash go get github.com/github/copilot-sdk/go ``` -------------------------------- ### Clone the setup script repository Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/troubleshoot-routing-traffic-control-load-balancing/includes/1a-create-troubleshooting-environment.md Clone the GitHub repository that contains the setup scripts for the exercise environment. This script is required to create the example topology. ```bash git clone https://github.com/MicrosoftDocs/mslearn-troubleshoot-connectivity-issues-virtual-machines networking ``` -------------------------------- ### Playwright Test Example: Get Started Link Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/advocates/build-with-playwright/includes/5-understand-test-specification.md This test navigates to a URL, clicks a 'Get started' link, and asserts that a specific heading becomes visible. It showcases interaction with elements and visibility assertions. ```typescript test('get started link', async ({ page }) => { await page.goto('https://playwright.dev/'); // Click the get started link. await page.getByRole('link', { name: 'Get started' }).click(); // Expects page to have a heading with the name of Installation. await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible(); }); ``` -------------------------------- ### Start the Sample Application Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/student-evangelism/api-management/includes/3-exercise-api-management.md Run the sample application locally after installing its dependencies. Access it via http://localhost:3000. ```bash npm start ``` -------------------------------- ### Install Connected Machine agent silently on Windows Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/manage-azure-arc-enabled-servers-scripting/includes/2-connect-hybrid-machines-azure-deployment-script.md Use this command to silently install the agent and create a setup log file. Check the log directory (%ProgramData%\AzureConnectedMachineAgent\log) if the agent fails to start. ```powershell msiexec.exe /i AzureConnectedMachineAgent.msi /qn /l*v "C:\Support\Logs\Azcmagentsetup.log" ``` -------------------------------- ### Create Databricks End-to-End Tests Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-databricks/implement-development-lifecycle-processes-in-azure-databricks/includes/4-implement-testing-strategy.md Simulate complete data workflows from start to finish to validate that your entire pipeline produces expected results. This example includes setup, execution, verification, and cleanup steps. ```python def test_daily_processing_pipeline(): """Validate complete daily data processing workflow.""" # Setup: Create test input files test_date = "2024-01-15" setup_test_input_files(test_date) # Execute: Run the complete pipeline run_daily_pipeline(test_date) # Verify: Check final output table result = spark.sql(f""" SELECT COUNT(*) as row_count, SUM(amount) as total_amount FROM production.daily_summary WHERE process_date = '{test_date}' """) row = result.first() assert row.row_count == 1000, f"Expected 1000 rows, got {row.row_count}" assert abs(row.total_amount - 50000.00) < 0.01 # Cleanup: Remove test data cleanup_test_data(test_date) ``` -------------------------------- ### Basic Parallel Processing Example Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/explore-azure-automation-devops/includes/11-examine-checkpoint-parallel-processing.md This example shows how to start multiple Azure VMs concurrently. vm0 and vm1 will start at the same time, and vm2 will start only after both vm0 and vm1 have begun. ```PowerShell Parallel { Start-AzureRmVM -Name $vm0 -ResourceGroupName $rg Start-AzureRmVM -Name $vm1 -ResourceGroupName $rg } Start-AzureRmVM -Name $vm2 -ResourceGroupName $rg ``` -------------------------------- ### Complete Program.cs Top Section Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/language/dotnet-files/includes/5-exercise-paths.md This snippet shows the initial setup of the Program.cs file, including getting the current directory, defining the stores directory path, and calling the FindFiles function. ```csharp var currentDirectory = Directory.GetCurrentDirectory(); var storesDirectory = Path.Combine(currentDirectory, "stores"); var salesFiles = FindFiles(storesDirectory); foreach (var file in salesFiles) { Console.WriteLine(file); } ``` -------------------------------- ### Clone and Setup Load Balancer Environment Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/azure/host-domain-azure-dns/resources/design-doc.md Clone the repository and execute the setup script to create a load-balanced environment with a public IP address. This is used to set up the final exercise. ```bash git clone https://github.com/GeekEffect/load-balancer-setup.git cd load-balancer-setup bash setup.sh ``` -------------------------------- ### Example GET Request for Blob Stats Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/data-ai-cert/secure-azure-storage-account/includes/3-storage-account-keys.md This is an example of a GET request to retrieve statistics for a blob resource. It demonstrates the basic structure of a REST API call to Azure Storage. ```http GET http://myaccount.blob.core.windows.net/?restype=service&comp=stats ``` -------------------------------- ### Navigate to SQL Setup Directory Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-data-ai/query-relational-data/includes/6-exercise-perform-query.md Change the current directory to the 'sql' folder within the cloned repository to access the setup script. ```bash cd dp-900/sql ``` -------------------------------- ### MicroK8s Installation Confirmation on Linux Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/azure/intro-to-kubernetes/includes/5-exercise-kubernetes-functionality.md Example output indicating a successful MicroK8s installation on Linux. ```output 2020-03-16T12:50:59+02:00 INFO Waiting for restart... microk8s v1.17.3 from Canonical✓ installed ``` -------------------------------- ### Start SAP HANA GUI Installer Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/implement-deploy-sap-hana-azure-large-instances/includes/6-exercise-install-hana-hana-large-instances.md Navigate to the SAP HANA installation directory and execute this command to launch the graphical installer for SAP HANA. ```bash ./hdblcmgui ``` -------------------------------- ### Execute Setup Script for Azure Environment Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/azure/host-domain-azure-dns/includes/6-exercise-create-alias-records.md Navigate to the cloned repository and execute the setup script to create the necessary Azure resources, including VMs and a load balancer. ```bash cd mslearn-host-domain-azure-dns chmod +x setup.sh ./setup.sh ``` -------------------------------- ### Basic Minimal API Setup Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/aspnetcore/introduction-to-aspnet-core/includes/3-how-aspnet-core-works.md Sets up a minimal API that listens for HTTP GET requests at the '/hello' URL and responds with 'Hello, World!'. It uses WebApplicationBuilder to configure the app and MapGet to define the route and handler. ```csharp var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapGet("/hello", () => "Hello, World!"); app.Run(); ``` -------------------------------- ### Minimal Voice Live SDK Session Setup Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-data-ai/develop-voice-live-agent/includes/3-voice-live-sdk.md This example shows the minimal configuration required to authenticate and establish a Voice Live session. It includes setting modalities, input/output audio formats, and turn detection parameters. ```python import asyncio from azure.core.credentials import AzureKeyCredential from azure.ai.voicelive.aio import connect from azure.ai.voicelive.models import ( RequestSession, Modality, InputAudioFormat, OutputAudioFormat, ServerVad, ServerEventType ) API_KEY = "your-api-key" ENDPOINT = "your-endpoint" MODEL = "gpt-4o" async def main(): async with connect( endpoint=ENDPOINT, credential=AzureKeyCredential(API_KEY), model=MODEL, ) as conn: session = RequestSession( modalities=[Modality.TEXT, Modality.AUDIO], instructions="You are a helpful assistant.", input_audio_format=InputAudioFormat.PCM16, output_audio_format=OutputAudioFormat.PCM16, turn_detection=ServerVad( threshold=0.5, prefix_padding_ms=300, silence_duration_ms=500 ), ) await conn.session.update(session=session) # Process events async for evt in conn: print(f"Event: {evt.type}") if evt.type == ServerEventType.RESPONSE_DONE: break asyncio.run(main()) ``` -------------------------------- ### Install a Windows Server Feature Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/manage-windows-server-settings-use-powershell-cmdlets/includes/3-manage-server-roles-services.md Use the Install-WindowsFeature cmdlet to install specific roles, services, or features on a Windows Server. This example installs the network load balancing feature. ```powershell Install-WindowsFeature "nlb" ``` -------------------------------- ### Example .NET SDK Output Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/includes/dotnet6-sdk-version.md This is an example of the output you might see when checking for installed .NET SDKs. Look for a version beginning with '6'. ```console 3.1.100 [C:\program files\dotnet\sdk] 5.0.100 [C:\program files\dotnet\sdk] 6.0.100 [C:\program files\dotnet\sdk] ``` -------------------------------- ### Example Repository-Wide Instructions Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/configure-customize-github-copilot-visual-studio-code/includes/3-customize-copilot-responses-instruction-files.md Use `.github/copilot-instructions.md` to define general coding guidelines for an entire repository. These instructions are automatically applied to all prompts. ```markdown # Project coding guidelines - Use PascalCase for class names and public members. - Prefix private fields with an underscore (e.g., _logger). - Follow the repository pattern for all data access operations. - Use async/await for I/O-bound operations. - Include error handling with try-catch blocks for all external API calls. - Add XML documentation comments on all public methods and classes. ``` -------------------------------- ### Initialize database with sample data Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/azure/manage-secrets-java-applications-zero-trust/includes/3-exercise-code-java-application-secrets.md This SQL script inserts a sample item into the database when the application starts. ```sql insert into item (details) values ('This is a item from the database'); ``` -------------------------------- ### Test Website Installation with wget Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/azure/intro-to-kubernetes/includes/5-exercise-kubernetes-functionality.md Use `wget` to connect to the pod's IP address and download the default index page, testing the web server installation. ```bash wget ``` -------------------------------- ### Verify Azure CLI installation Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/create-azure-resources-by-using-azure-cli/includes/3-install-azure-cli.md Check your Azure CLI version to confirm a successful installation. The version numbers may differ from the example. ```azurecli az version ``` ```output { "azure-cli": "2.65.0", "azure-cli-core": "2.65.0", "azure-cli-telemetry": "1.1.0", "extensions": {} } ``` -------------------------------- ### Create WebApplicationBuilder and Build App Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/aspnetcore/build-your-first-aspnet-core-web-app/includes/3-exercise-create-project.md Initializes the host configuration and builds the application instance. ```csharp var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); ``` -------------------------------- ### Navigate and Run Setup Script with PowerShell Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/includes/wwl/test-azure-synapse-lab.md After cloning the repository, navigate to the exercise folder and execute the setup script using PowerShell. This script provisions Azure Synapse Analytics resources. ```powershell cd dp-203/Allfiles/labs/01 ./setup.ps1 ``` -------------------------------- ### List Installed .NET SDKs Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/includes/dotnet8-sdk-version.md Run this command to check if the .NET 8.0 SDK is installed. Ensure a version starting with '8' is listed in the output. ```dotnetcli dotnet --list-sdks ``` -------------------------------- ### Example .NET SDK Version Output Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/language/fsharp-first-steps/includes/4-set-up-development-environment.md This is an example of the output you should see when verifying the .NET SDK installation. The specific version number may differ. ```console 9.0.201 ``` -------------------------------- ### Clone setup script from GitHub Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/cloud-hybrid-connectivity/includes/2-setup-environment.md Use this command to clone the repository containing the setup script for the exercise environment. ```powershell git clone https://github.com/MicrosoftDocs/mslearn-cloud-hybrid-connectivity networking ``` -------------------------------- ### Install PostgreSQL Client and Go Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/azure/migrate-linux-postgres/includes/3-configure-linux-application-workload.md Install the PostgreSQL client tools and the Go programming language on the virtual machine. These are required for database interaction and application development. ```bash sudo apt-get install -y postgresql-client golang-go ``` -------------------------------- ### Example: Restore /etc/fstab from Backup Source: https://github.com/microsoftdocs/learn/blob/main/learn-pr/wwl-azure/implement-business-continuity-disaster-recovery-backup/includes/3-backup-restore-operating-system-type-ii-skus.md This example demonstrates restoring the /etc/fstab file from a backup located at /osbackups/hostname/backup.tar.gz. ```bash #tar -xvf /osbackups/hostname/backup.tar.gz etc/fstab ```