• Home
  • Blog
  • Projects
  • Profile

AI Security Skills Challenge - Week 1: Defender for Cloud Deployment Mastery

August 4, 2025

Project page

GitHub - Week 1

Week 1 Overview

This week focused on mastering Microsoft Defender for Cloud deployment through three distinct approaches, building a solid security infrastructure foundation to support AI integration in subsequent weeks. The primary goal was to establish comprehensive deployment expertise while preparing for Week 2’s modern unified security operations platform.

Planned Activities

Deployment Mastery Approaches

  • Azure Portal Deployment: Comprehensive learning path with visual interface and detailed explanations
  • Modular Infrastructure-as-Code: PowerShell + Bicep templates for controlled automation
  • Complete Automation: Enterprise-ready single-command deployment
  • Regional Deployment Configuration: East US deployment for complete AI security coverage and Week 2 compliance

Infrastructure Foundation

  • Baseline security policies and monitoring configuration
  • Defender for Cloud plans enablement across all subscription services
  • Virtual machine deployment for testing and validation scenarios
  • Just-in-Time (JIT) access policies implementation
  • Microsoft Sentinel integration for SIEM capabilities

Documentation and Validation

  • Deployment comparison guide with practical recommendations
  • Week 2 bridge validation for modern unified security operations readiness
  • Automated decommission scripts for lab cleanup
  • Learning resources compilation and organization

Key Deliverables

1. Three-Approach Deployment Mastery

Status: [COMPLETE]

  • Azure Portal Guide: 45-60 minute guided learning experience with maximum educational value
  • Modular IaC Guide: 15-20 minute structured automation with step-by-step control
  • Complete Automation: 5-10 minute enterprise-ready single-command deployment

2. Infrastructure-as-Code Foundation

Status: [COMPLETE]

01 - Defender for Cloud Deployment Mastery/
├── infra/                                         # Bicep templates and parameters
│   ├── main.bicep                                 # Main orchestration template
│   ├── main.parameters.json                       # Environment configuration
│   ├── foundation.parameters.json                 # Foundation infrastructure parameters
│   └── modules/                                   # Modular Bicep components
│       ├── security/                              # Security-focused modules
│       ├── monitoring/                            # Monitoring and logging modules
│       └── compute/                               # Virtual machine deployment modules
└── scripts/                                       # Automated deployment and management
    ├── Deploy-Complete.ps1                       # Complete automation deployment
    ├── Deploy-InfrastructureFoundation.ps1       # Foundation infrastructure
    ├── Deploy-DefenderPlans.ps1                  # Defender plan configuration
    ├── Deploy-SecurityFeatures.ps1               # Security feature enablement
    ├── Deploy-VirtualMachines.ps1                # Test VM deployment
    ├── Deploy-Sentinel.ps1                       # Sentinel integration
    ├── Remove-DefenderInfrastructure.ps1         # Decommission script
    └── templates/                                 # Configuration templates
        ├── jit-policy-windows.json               # Windows JIT access policy
        └── jit-policy-linux.json                 # Linux JIT access policy

3. Week 2 Bridge Validation Framework

Status: [COMPLETE]

  • Unified security operations readiness assessment
  • UEBA (User and Entity Behavior Analytics) availability validation
  • Regional compliance verification for East US deployment
  • Modern security operations platform integration testing

4. Deployment Comparison Matrix

Status: [COMPLETE]

ApproachLearning ValueDeployment SpeedEnterprise ReadyBest Use Case
Azure Portal⭐⭐⭐⭐⭐⭐⭐⭐⭐Educational, one-time deployments
Modular IaC⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐Production environments, controlled automation
Complete Automation⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐Enterprise deployment, CI/CD integration

Lessons Learned

What Worked Well

GitHub Copilot as an Iterative Development Partner: GitHub Copilot (primarily using the Claude 4 model in Agent mode) proved to be a valuable collaborative partner in an iterative development process for building deployment scripts and Infrastructure-as-Code templates. Rather than accepting initial suggestions blindly, I developed a workflow where I would ask Copilot to generate initial Bicep module structures, PowerShell script frameworks, and JSON configuration templates, which I would then refine through multiple iterations based on review and testing. This iterative approach allowed me to leverage AI acceleration while maintaining technical accuracy and alignment with Azure best practices.

AI-Assisted Project Structuring Through Refinement: Using GitHub Copilot in VS Code to organize the modular project structure was very effective when paired with good prompting strategy. I would tell Copilot what I wanted to achieve, and it would make an effort to create it just as I asked. Sometimes I needed to tweak my prompts to get the outcome I wanted, but this is all part of the learning experience to make the best use of Ai as a collaborative partner.

Iterative Script Testing and Validation: GitHub Copilot’s ability to generate test scripts and validation functions significantly accelerated development, but only through careful iteration and validation. The AI would run comprehensive test scenarios, including edge cases I might have overlooked. The iterative process of generating, testing, and refining validation scripts proved much faster than manual development while maintaining quality standards. When I wanted to, I would let Copilot go wild with it’s testing logic and strategy, or if I wanted more careful control I would have it pause after each test for review and validation or correction.

Collaborative Documentation Development: The AI assistance was particularly valuable for generating structured documentation templates, but required active collaboration to maintain consistency across multiple deployment guides. Through iterative prompting and refinement, Copilot helped standardize formatting and generate comparison tables. After establishing successful patterns through this iterative process, I leveraged Copilot to create style guides that could be used to maintain consistency in future content development.

AI as a Project Manager Relationship: One of the most effective approaches I developed was treating GitHub Copilot like a skilled project team member that I could delegate specific tasks to, rather than expecting it to understand broader project context automatically. I would break down complex deliverables into discrete, well-defined tasks and delegate them with clear requirements and success criteria. For example, I would ask Copilot to “create a PowerShell script that validates Defender for Cloud deployment with specific error handling for these five scenarios” rather than asking for a general validation script. After receiving the initial deliverable, I would review it like any project output, providing specific feedback and requesting revisions until the result met my standards. This project management approach proved far more effective than trying to get perfect results on the first attempt, and it helped me maintain quality control while leveraging AI acceleration.

Challenges Encountered

Hybrid Infrastructure Requirements: As I was building out the automated deployments, one of the most significant challenges was discovering that not all Microsoft Defender for Cloud configuration options are available through Infrastructure-as-Code approaches (Azure CLI or REST API). Critical security features like certain advanced threat protection settings and some compliance configurations still require Azure Portal interaction or REST API calls not yet supported in Bicep. This necessitated a hybrid approach where the foundational infrastructure could be automated, but final configuration steps required manual portal intervention or custom PowerShell scripts using Azure REST APIs.

AI Hallucination and Outdated Recommendations: One of the most time-consuming challenges was dealing with GitHub Copilot’s tendency to suggest implementation steps and code strategies based on outdated information or documentation. The AI would frequently recommend deprecated PowerShell cmdlets and configuration approaches that were no longer considered best practices or even correct. This became particularly problematic when working with rapidly evolving services like Microsoft Defender for Cloud, where features and configuration methods change frequently. I had to develop a systematic approach of explicitly prompting the AI to “research the most recent Microsoft Learn documentation and ensure you are implementing the most modern approach” for each significant recommendation. Even with these prompts, I found myself spending considerable time manually testing and modernizing the AI’s suggestions, often requiring multiple revision cycles to achieve current best practices. This challenge ultimately reinforced the importance of robust prompting strategy and careful human review of all AI-generated technical content, especially when working with actively developed cloud services.

AI Content Creation Insights

Iterative Prompt Engineering for Technical Accuracy: Working with AI tools for generating technical content revealed the critical importance of iterative prompt refinement rather than accepting initial outputs. Early attempts at generating Azure-specific scripts required multiple rounds of refinement to achieve accuracy. The key breakthrough came from developing a systematic approach: start with broad prompts to establish structure, then progressively add technical constraints and Azure-specific requirements through follow-up iterations. This iterative refinement process dramatically improved output quality while maintaining human oversight of technical accuracy.

AI as a Collaborative Research Partner: GitHub Copilot served as an excellent collaborative partner for discovering and quickly implementing Azure PowerShell cmdlets and Bicep resource properties, but required active validation and iteration. Rather than blindly accepting suggestions, I developed a workflow where Copilot would propose relevant commands and parameters, which I would then validate against official documentation and test in controlled environments. This collaborative approach accelerated research while maintaining technical reliability.

Managing AI Context and Consistency Challenges: One of the primary challenges was maintaining context across the entire project when working with AI assistance. While Copilot excelled at generating isolated scripts and components, ensuring consistency across the broader deployment framework required significant human oversight and iterative refinement. I learned to break complex tasks into smaller, more focused prompts while maintaining overall architectural coherence through manual integration and validation.

The Foundation Knowledge Advantage: The most important insight from working with AI throughout this project is that AI tools are most effective when you already have a solid understanding of what you want to achieve and the underlying technologies involved. For instance, using AI to create PowerShell scripts is far more productive when paired with an understanding of PowerShell fundamentals, syntax patterns, and module capabilities. This foundational knowledge allowed me to quickly spot issues in AI-generated code, guide the AI toward appropriate solutions, and avoid what is commonly called “vibe coding” - blindly accepting AI suggestions without understanding their implications. The combination of existing technical knowledge with AI acceleration proved exponentially more valuable than either approach alone, enabling me to save significant time on manual coding and research while maintaining quality and accuracy standards.

Process Improvements

Project Restructuring Based on Week 1-2 Bridge Analysis: The most significant process improvement emerged from developing the Week 1 to Week 2 bridge validation framework. This exercise revealed that the original 12-week structure was overly ambitious and didn’t align with logical technology progression. By analyzing the dependencies between Defender for Cloud foundation and the advanced AI security operations planned for Week 2, I identified opportunities to restructure the entire project.

From 12-Week to 9-Week Focused Learning Path: The bridge analysis showed that several weeks could be consolidated into more logical learning phases. Rather than treating each technology as an isolated week, the restructured approach groups related technologies into coherent phases:

  • Phase 1: Security Infrastructure Foundations (Weeks 1-3) - Build comprehensive security baseline
  • Phase 2: Data Governance & Analytics (Weeks 4-5) - Implement governance frameworks
  • Phase 3: Advanced Analytics & AI Development (Weeks 6-7) - Deploy AI workloads securely
  • Phase 4: Applied AI & Enterprise Delivery (Weeks 8-9) - Customer-ready solutions

Realistic Time Investment Optimization: The original structure assumed unrealistic time commitments for working professionals. The restructured approach targets 8-12 hours per week, making the program sustainable alongside full-time work while maintaining comprehensive learning outcomes.

Enhanced Regional Strategy: The Week 1-2 bridge revealed the critical importance of regional deployment planning for AI security features. This insight led to formalizing East US as the deployment region for the entire program, as there are currently some regional dependencies with some Azure Ai solutions, ensuring all advanced features are available throughout the learning journey.

Next Steps

Week 2 will focus on AI integration and enhanced security operations, building upon the solid foundation established this week. The restructured project timeline ensures a logical progression from foundational security infrastructure to advanced AI-integrated security operations.

Week 2 Preview

  • Modern unified security operations platform deployment
  • AI integration with enhanced security operations
  • User and Entity Behavior Analytics (UEBA) implementation
  • Advanced threat detection and response automation
  • Security Copilot integration preparation

Resources & References

Project References

  • Week 1 GitHub Repository
  • Azure Portal Deployment Guide
  • Modular IaC Deployment Guide
  • Complete Automation Guide
  • Week 1-2 Bridge Validation

Leveraged Technologies

  • Microsoft Defender for Cloud
  • Azure Bicep
  • Azure PowerShell
  • Microsoft Sentinel
  • GitHub Copilot

This post is part of the AI Security Skills Challenge series. View the complete project overview and follow along with the weekly progress updates.

  • Defender for Cloud
  • Infrastructure as Code
  • Bicep
  • PowerShell
  • Automation
  • Security

Related

  • Microsoft Sentinel Infrastructure as Code - Automation Framework Overview
  • Microsoft Sentinel-as-Code
  • AI Security Skills Challenge - Week 0: Project Setup & Administration
© Tech Portfolio - Marcus Jacobson 2025