How I 13x’d my code with AI

bp1

A long time ago I manually cobbled together a PowerShell script to update the M365 required PowerShell modules on a Windows device. You can find that now ‘ancient’ version here:

https://github.com/directorcia/Office365/blob/30c6d020f48a7c8ed8ff7abeb64f4e30803d7c4b/o365-update.ps1

It worked well but it was growing stale and needed and refresh and update. Having been working with Github Copilot’s agent capabilities on new scripts like:

https://blog.ciaops.com/2025/05/27/powershell-script-for-analyzing-exchange-online-email-headers/

I decided it was perhaps time to make seismic shift in how I thought about the code I write thanks to AI.

Being a trained engineer, to me code is simply a tool that I can use to make my job easier and quicker. In short, I understand code but I am not a developer. This allows me to use languages like PowerShell to create automations. However, these attempts have never been ideal in my books and always suffer from limitations, especially when it comes to error handling. Also, I know enough about PowerShell to get by, but I also know there is a hell of a lot more it can do. However, I knew I would never get the time to get to any mastery level.

Then along came AI. Now I was able to create the scripts that I wanted in a much shorter time and utilising far more of the full capabilities available in PowerShell. This made me realise that, thanks to AI, I have moved up the ladder from an unskilled PowerShell ‘hack’ to more of a software architect/engineer with an very capable programming employee being AI. Now, I don’t need to write every line of code as I did with my original module update script, all I needed to do is now tell my new digital coding employee what needs to be done and monitor the result

So, starting with the original 200 lines of code I asked Github Copilot to ‘improve’ the script. This started a journey of almost 2 full days of getting to a script of around 2400 lines but with far more functionality. Best of all, I didn’t write a single line of additional code, my AI coding employee did it for me.

That journey also taught me some important lessons about what is now termed ‘vibe’ coding. You can’t simply expect AI to get it right the first time. It took me many iterations and prompting to get what I wanted and fix the many, many errors that manifested along the way. Perhaps the most interesting was when the AI just didn’t seem to fix an error that manifested itself with constrained mode PowerShell. The lesson I learned is that I had to dig in a bit and help the AI focus on the parts of the code where the problem was. Without doing that it seemed to only take a high level view of the code, overlooking the obscure error. Thus, I still needed my PowerShell and ‘engineering’ skills to direct my AI employee to the solution.

It dawned on me that I needed to do more than just be a ‘manager’ and sit back and give commands (prompts) and expect a perfect output every time. in fact, I needed to be an ‘architect’ and get more involved and help my AI employee solve the problem, just like you would any junior or entry level resource. Only then, did I really start making headway of solving problems as they arose and drive to the 2400 lines of coded solution that is available to you today for free.

Github Copilot and I have continue to refine the code to the point now were it does so many things I simply could not have done myself without investing probably thousands of hours into. Yes, I ‘could’ have but I have now learned ‘why’ would i? Creating a 2400 line free script on my own is simply not an economically viable investment of my time. Thanks to AI, I have been able to achieve the same, if not better result, in a much, much shorter time frame.

I can now take my new found knowledge of using AI to code and position myself as an ‘architect’ to solve many of the automation challenges I have wanted to solve with PowerShell. By removing the need to code and debug every line of code I achieve a far more effective and efficient result, without the need of involving anyone else but me. I remember hearing the saying that ‘your job won’t be replaced by AI alone, but it will be replaced by someone using AI’ and to me, my recent experience confirms exactly that.

If you have managed to get this far, the the good news is that my revamped o365-update.ps1 script has now been improved to include such features as:

– removal of depreciated modules

– removal of previous module versions

– supports multi-threading

– supports constrained language mode

– and more.

The documentation which is here:

https://github.com/directorcia/Office365/wiki/Update-all-Microsoft-Cloud-PowerShell-modules

which was also totally Ai generated! And of the course the code is at:

https://github.com/directorcia/Office365/blob/master/o365-update.ps1

The leverage that Github Copilot has already provided me and what I now envision it will allow me to, I could of only dreamed of as a single person ‘hack’ only a short time ago! My AI employee and I are now off to solve the next challenge. Stay tuned.

Introducing the CIAOPS AI Dojo: Empowering Everyone to Harness the Power of AI

bp1

We’re thrilled to announce the launch of the CIAOPS AI Community — a dynamic new space designed to help IT professionals, end users, and managers alike unlock the full potential of artificial intelligence in their daily work.

Unlike traditional tech communities that cater solely to technical audiences, the CIAOPS AI Community is built for everyone in the workplace. Whether you’re a seasoned IT expert, a business manager, or someone simply looking to work smarter, this community is your go-to hub for practical, real-world AI knowledge.

What makes this community different?

  • Inclusive by Design: We believe AI should be accessible to all. That’s why our content and discussions are tailored to a broad audience — from frontline staff to C-suite leaders.
  • Small Business Focus: We understand the unique challenges and opportunities small businesses face. Our community is geared toward helping smaller teams do more with less using AI.
  • Cross-Platform Coverage: While we have deep expertise in Microsoft technologies, we also explore non-Microsoft AI services — from open-source tools to third-party platforms — to give you a well-rounded view of what’s possible.
  • Wide-Ranging Topics: From boosting productivity with AI-powered tools to building custom agents that automate repetitive tasks, we cover it all.
  • Real-World Impact: Learn how to apply AI to streamline operations, improve decision-making, and enhance customer experiences — no PhD required.

Why Join?

AI is no longer a futuristic concept — it’s a practical tool that can transform how you work today. By joining the CIAOPS AI Community, you’ll gain:

  • Actionable insights on using AI to save time and reduce manual work.
  • Step-by-step guides for creating intelligent agents that automate common business processes.
  • Peer support and expert advice from a growing network of professionals who are passionate about making AI work for them.
  • Exposure to a variety of AI tools and services, helping you choose the right solution for your business needs — whether it’s Microsoft Copilot, ChatGPT, or something entirely different.

Whether you’re looking to automate document workflows, analyze data faster, or simply stay ahead of the curve, the CIAOPS AI Community is here to help you make AI part of your everyday toolkit.


You are invited to the first session for free!

To kick things off, we’re hosting an open introductory meeting for anyone interested in learning more about AI in small and medium businesses — with a special focus on Microsoft Copilot and how it fits into the broader AI landscape.

No membership required
No obligations
Just a chance to explore, learn, and ask questions

Whether you’re curious about what AI can do for your business or looking for practical ways to get started, this session is the perfect place to begin.

Register now to attend

3rd July 2025
09:30 – Sydney Australia time


Restrict SharePoint content discovery for Copilot

image

This new Restrict discovery of SharePoint sites and content option is now available to you if you are using Microsoft 365 Copilot. You will find the above option in the SharePoint Administration console, when you select an Active Site and then navigate to settings.

According to the docs:

Restricted Content Discovery doesn’t affect existing permissions on sites. Users with access can still open files on sites with Restricted Content Discovery toggled on.

and

This feature can’t be applied to OneDrive sites.

and

Overuse of Restricted Content Discovery can negatively affect performance across search, SharePoint, and Copilot. Removing sites or files from tenant-wide discovery means that there’s less content for search and Copilot to ground on, leading to inaccurate or incomplete results.

This feature is part of Microsoft ShrePoint Premium – SharePoint Advanced Management (SAM) which is being included with M365 Copilot licenses.

In essence, once you have a M365 Copilot license it is quick and easy way for an administrator to restrict Copilot being used with a certain SharePoint site. Check the Microsoft documentation for more information:

https://learn.microsoft.com/en-us/sharepoint/restricted-content-discovery

Unlocking the Power of Microsoft 365 Copilot Notebooks: A Game-Changer for Podcasters!

bp1

In this video, I dive into the revolutionary new feature of Microsoft 365 Copilot – Notebooks! As a podcaster, I know the challenges of creating and publishing content efficiently. Join me as I explore how Notebooks can streamline your workflow, from organizing show notes to generating SEO-optimized summaries and social media previews. Discover practical examples, tips, and tricks to make your podcasting journey smoother and more productive. Don’t miss out on this essential tool for content creators!

Video link – https://www.youtube.com/watch?v=RhHBUMeSlDE

Get your M365 questions answered via email

bp1

Yes, it is true, you can now gain access to my Microsoft Cloud knowledge simply by sending an email. I have achieved this by creating an agent in Copilot Studio that will respond to the query you place in the body of the email.

1. Send your questions to robert.agent@ciaops365.com. The questions need to be in the body of the email. For now the subject line is ignored.

2. After a few minutes you should receive a reply back with an AI generated answer across all my information sources, both public and private.

Some points to remember:

A. Each query is unique. The system current does not have ‘memory’. This means it does not keep track of any previous email or questions that you sent it. Each email is taken as unique.

B. The system is focused on answering questions around Microsoft 365 and the Microsoft Cloud. It has specific instructions to ignore other stuff, so if you ask it something silly at best you should get a polite reply declining to help and at worst no reply at all.

C. The more detailed the question, the better the answer. Simply asking for an answer will not return as comprehensive an answer if you asked for a detailed response, or step by step process.

D. The system is far from perfect. Firstly, it is AI, which means that answers should always be verified. Secondly, part of the reason that I am making this available publicly is to test how well it works at scale.

Hopefully, what you get out of this agent are answers to your question around M365, simply by sending an email. What I get out of this is to test the agent and also see what questions people are asking about M365 so I can create better responses and content.

I will continue to develop and improve the agent as Microsoft makes more capabilities available. For now, I’d really appreciate you asking a question about M365 in the body of the email sent to robert.agent@ciaops365.com.

You can of course reach out to me directly if you have any questions or other feedback for my agent that you’d like to see incorporated.

As an FYI, here is a report I generated based on what teh agents has already received:

Common Questions About Microsoft Cloud

Common Questions About Microsoft Cloud – A Summary and Insights

Introduction
Over the past few months, we’ve received numerous questions about utilizing the Microsoft cloud for business needs. These queries came through our support channels and covered a range of topics – from device management with Intune to security and compliance features in Microsoft 365. We’ve noticed some clear themes in what people are asking. In this blog post, we’ll summarize the most common Microsoft cloud questions, group them into key topic areas, and share brief answers and insights for each. Our goal is to highlight frequent concerns, reveal patterns in cloud adoption challenges, and offer recommendations to help everyone make the most of Microsoft’s cloud services.


1. Managing Devices and Updates with Intune

One of the most common questions is how to use Microsoft Intune (part of Endpoint Manager) to manage devices and deploy software updates across an organization. IT admins want to ensure all laptops and mobile devices are up-to-date without manual intervention.

What was asked: “How can I use Microsoft Intune to update software on devices in my organization?”

What we answered: Intune is a powerful cloud-based endpoint management tool that can centrally push OS and application updates to enrolled devices. We explained that the process involves a few key steps:

  • Prerequisites: First, make sure you have an active Intune subscription and that all target devices are enrolled in Intune under your tenant. Devices should be managed (Intune allows management of Windows, macOS, iOS, and Android devices) and you need the proper admin permissions to configure Intune policies.
  • Create an Update Policy: In the Microsoft Endpoint Manager admin center, you can create update rings (under Devices > Windows > Update rings for Windows 10 and later for Windows updates). This policy defines how and when updates are installed – for example, you can schedule update installation times, set deadlines, and configure user experience (like allowing user deferral or auto-restart behavior).
  • Deploy the Policy to Devices: Once the update ring (or any software update policy) is configured, assign it to the groups of devices or users that need those updates. Intune will then push the update settings to those devices. For app updates (such as line-of-business apps), you can use Apps section in Intune to assign newer app versions to devices/users.
  • Monitor and Troubleshoot: Intune provides reporting tools to monitor update compliance and installation status. We emphasized checking the Reports (for update compliance) to ensure devices are getting patches successfully. If some devices fail to update, Intune logs and error reports can help pinpoint issues (like connectivity problems or insufficient disk space). From there, admins can troubleshoot using the error codes or by ensuring the devices meet prerequisites (e.g. device must be powered on and online to receive updates).

By following these steps, our users learned that they could effectively manage software updates via the cloud, ensuring all endpoints are secure and up-to-date. This question falls under a broader theme: cloud-powered device management. Many organizations are moving away from manual or on-prem update servers, and are leveraging Intune and Windows Update for Business for a more hands-off, scalable approach. The pattern we see is a strong interest in using Microsoft cloud tools to automate device administration tasks.

Insight: If you’re not already using Intune for updates, it’s a good time to consider it. Start by enrolling a pilot group of devices and creating a basic update ring. You’ll gain insight into how smoothly updates roll out in your environment. In addition, ensure you communicate with your end-users about update timing (to avoid surprises). The key recommendation here is to take advantage of Intune’s cloud management capabilities – it saves time and keeps your fleet secure.


2. Securing Endpoints and Protecting Data

Another category of frequent queries revolves around security in the Microsoft cloud, particularly using Intune’s endpoint security features and related Microsoft 365 security tools. Administrators often ask what built-in options exist to protect devices and data beyond just deploying updates.

What was asked: “What does Microsoft Intune provide for endpoint security, and how can I use it to protect our organization’s devices and data?”

What we answered: We clarified that Microsoft Intune isn’t just for pushing apps or updates – it also has robust endpoint security and policy management capabilities. In fact, Microsoft’s cloud offers an integrated suite of security measures that work together. Our summary answer covered several facets:

  • Device Compliance Policies: Intune lets you define compliance requirements – for example, requiring devices to have a PIN/password of a certain complexity, encryption enabled, not jailbroken/rooted, etc. If a device falls out of compliance, Intune can flag it or even block it from corporate resources. We told users to set up compliance policies as a first layer of defense to ensure every device meets basic security hygiene.
  • Configuration Profiles for Security Settings: Through Intune, admins can deploy configuration profiles to enforce security settings on devices. This includes things like enabling BitLocker encryption on Windows, turning on firewall and antivirus (like ensuring Microsoft Defender is active), and configuring automatic screen lock timers. These settings help harden each device according to company security standards.
  • Integration with Defender for Endpoint: Many asked how to get “advanced threat protection” on cloud-managed devices. Intune integrates with Microsoft Defender for Endpoint, a cloud-based enterprise endpoint security platform. This means if you have the proper licensing, you can onboard devices to Defender for Endpoint for continuous monitoring, malware protection, and even threat response (EDR). Alerts from Defender can surface in Intune, creating a unified security dashboard. We recommended taking advantage of this integration to detect and respond to sophisticated threats like ransomware or suspicious behavior on endpoints.
  • App Protection Policies: Some questions went beyond device settings, into protecting the data within apps (especially on mobile devices or BYOD scenarios). Intune’s app protection policies (also known as MAM – Mobile Application Management) can restrict how corporate data is used in apps. For instance, you can prevent users from copying content from a work app into a personal app, or require an app-level PIN to open Outlook on a phone. This way, even if the device isn’t fully managed, the sensitive data is still containerized and secure.
  • Conditional Access (with Azure AD): We often reminded folks that Azure Active Directory Conditional Access works hand-in-glove with Intune compliance. A popular approach is to set Conditional Access policies that say: only allow sign-in to cloud resources (like Exchange Online or SharePoint) from devices that are Intune-compliant or from apps that are protected. This essentially turns away risky devices or sessions. For example, if a device falls out of compliance (as per Intune policy) or is unrecognized, it can be denied access or forced to re-authenticate. This dynamic duo of Intune + Conditional Access greatly reduces the chance of a breach if a device is lost, stolen, or compromised.

By outlining these points, we provided a brief overview of Intune’s security toolkit. The trend behind this question is that businesses are looking to the Microsoft cloud to not only manage devices but also to secure them comprehensively – without needing separate third-party solutions if possible. Microsoft has been expanding these capabilities (like adding more Endpoint Protection and even an Endpoint Privilege Management feature in Intune), and people are eager to utilize them.

Insight: If your organization uses Microsoft 365, make sure you’re leveraging the security features you already have access to. A recommendation is to audit your current setup: Are you using compliance policies? Do you enforce MFA and Conditional Access? Have you enabled Defender for Endpoint if licensed? We encourage users to start with baseline security configurations – Microsoft even provides security baseline templates in Intune that you can deploy for Windows, which is a great starting point. The big takeaway is that cloud-based security can significantly strengthen your defense. It’s easier to enforce uniform policies and to adjust them quickly if new threats emerge. Given the pattern of questions, it’s clear that investing time in Intune’s security configuration pays off in a safer environment.


3. Compliance and Data Retention (Archiving vs. Holding Data)

The third major category of questions centers on Microsoft 365’s compliance and data retention features. As companies move email and content to the cloud, they want to make sure they can retain data for legal purposes and manage mailbox sizes effectively. A representative question we received involves the relationship between mailbox litigation holds and the expanding archive feature in Exchange Online.

What was asked: “Can I enable an auto-expanding archive for a mailbox that’s already on litigation hold, and if so, how?”

What we answered: This question was about Exchange Online Archiving – a Microsoft cloud feature that provides additional storage for users’ mailboxes (commonly used when mailboxes reach capacity or to store older messages) – in conjunction with Litigation Hold (which is a compliance measure to preserve all mailbox content for legal/eDiscovery). The user’s worry was whether turning on an archive would conflict with the litigation hold. Here’s the summary of our guidance:

  • Yes, You Can Do Both: We confirmed that having a mailbox on Litigation Hold does not prevent you from enabling the archive mailbox (including the auto-expanding archive). The systems are designed to work together. The litigation hold ensures all original and deleted mailbox data is retained for legal review, and the archive mailbox simply provides more space to offload emails from the primary mailbox.
  • Steps to Enable Auto-Expanding Archive: In the Microsoft 365 compliance or Exchange admin center, an admin can enable the archive for a user’s mailbox. Once the standard archive is enabled, you can turn on the auto-expanding archive feature. This feature automatically adds additional storage chunks to the archive mailbox as the user’s archive grows (useful for very large or active mailboxes so you never run out of space). We walked through the interface where an admin would click “Enable Archive” for the mailbox, and noted that auto-expanding archive might require the organization to have it turned on globally (in newer versions, it can be enabled per tenant and it expands as needed without further admin intervention).
  • Verify Litigation Hold Status: We advised the user to double-check that the mailbox in question is indeed on hold (which it was) and to understand the hold settings (e.g., indefinite hold or time-based hold). The litigation hold means all items (including those moved to the archive) are preserved for discovery, even if the user deletes them. Enabling the archive doesn’t break that – in fact, any item in the archive mailbox is also held.
  • What to Expect After Enabling: With both litigation hold and an archive, users can continue to use their mailbox normally. New emails will go to their primary mailbox; older emails or auto-archiving policies can move items to the archive mailbox. The hold ensures copies are retained behind the scenes. We noted that admins can monitor archive usage in the Exchange admin center (there are usage reports that show mailbox and archive sizes). Also, if needed, during an eDiscovery process, content from both the primary and archive mailboxes will be available since the hold captures everything.

This answer addressed the practical “how-to” and reassured that compliance would be maintained. It highlighted Microsoft 365’s capability to handle both storage management and legal obligations simultaneously – a key advantage of the cloud platform.

The pattern here is questions about data governance: admins want to manage storage (like huge mailboxes) but must also meet legal retention requirements. We’ve seen queries about retention policies, eDiscovery, and archive mailboxes pop up frequently. It underscores that as companies embrace cloud email and documents, they’re also planning for compliance, regulation, and efficient data management.

Insight: For organizations, it’s important to familiarize yourself with Microsoft Purview (the new name for the compliance suite) features such as Retention Policies, Litigation Hold, and Archive Mailboxes. Our recommendation is to develop a data retention strategy: decide how long you need to keep emails, Teams messages, documents, etc., for business or legal reasons, and then configure the appropriate policies in Microsoft 365. The cloud makes this easier than old on-prem systems – you can globally apply a retention label or hold with a few clicks, and the service will automatically preserve content. Also, take advantage of auto-expanding archives if users have mailboxes over 100 GB; this ensures users don’t have to delete important emails just because of storage limits. The key takeaway is that Microsoft’s cloud provides flexible tools to both control data growth and meet compliance needs. The questions we get show that once people learn they can do both at once, they feel more confident migrating more data to the cloud.


Conclusion and Key Takeaways

Compiling these questions and answers has revealed a couple of clear trends. First, IT professionals are eager to leverage Microsoft cloud services to their full potential – they’re not just asking simple “what does this button do” questions, but really digging into how to implement best practices for device management, security, and compliance. This is a great sign that cloud adoption is maturing. Common threads include automation (automating updates, using policies instead of manual configs) and integration (ensuring security, management, and compliance tools all work together seamlessly).

Second, many of the questions revolve around trusting the cloud to handle critical IT functions. There can be understandable caution around, say, letting Intune automatically patch all your PCs, or believing that an auto-expanding archive will really keep all your important emails safe. But as shown above, with the right configuration, the cloud can greatly simplify these tasks. The pattern of questions shows initial caution turning into confidence as users get guidance and try things out. For example, after implementing Intune update rings as we suggested, admins often report that they spend far less time worrying about who has installed what patch – compliance reports are available and issues can be addressed proactively. Similarly, once an auto-archive is enabled alongside a litigation hold, legal teams breathe easier knowing nothing will be lost, and users are happier not constantly hitting mailbox size limits.

Third, we noticed a strong interest in step-by-step guidance and best practices. It’s not enough to know a feature exists; people want to know “what is the correct or recommended way to use this?” This is a good reminder for Microsoft (and for us as solution providers) that documentation and clear examples are very valuable. Cloud features tend to have tons of flexibility, which can sometimes be daunting. The questions summarized above often boiled down to “please give me a straightforward recipe to achieve my goal.” In response, we find that breaking things into clear steps or a checklist (as we did with each answer) helps a lot.

Recommendations for Readers: If you find yourself with similar questions, know that you’re not alone! The Microsoft cloud ecosystem is broad, but the community and knowledge base is rich. Here are a few closing tips based on the patterns we’ve seen:

  • Embrace cloud management: If you’re still doing things the old manual way, start exploring Intune, Endpoint Manager, and Azure AD features. Begin with a small scope (maybe pilot a set of devices or one department’s accounts) and apply some cloud policies. You’ll gain confidence as you see it in action.
  • Use built-in security features: Don’t let security be an afterthought. Turn on multi-factor authentication, use Conditional Access, require device compliance – these significantly reduce risks and are included in most Microsoft 365 plans. Our summary above barely scratched the surface of security options, but even the basics go a long way.
  • Plan your compliance: Work with your legal/compliance team to configure retention policies and holds before you need them. It’s easier to set the rules early than to scramble when a legal case or audit arises. Microsoft Purview compliance portal has templates and suggestions for common regulations – those can guide you.
  • Keep learning and asking: The cloud updates rapidly. New features and best practices emerge every month. Stay curious – Microsoft’s documentation, tech community blogs, and forums are excellent resources. If something isn’t clear, don’t hesitate to ask experts (as those who contacted us did). Often, the answers are out there and can save you hours of trial and error.

By summarizing these frequently asked questions, we hope we’ve provided a useful reference for others facing similar challenges. The Microsoft cloud is vast, but with each question answered, it becomes a bit more manageable and beneficial to use. As always, feel free to reach out with any new questions you have about making the most of these tools – chances are, if you’re wondering about it, someone else is too. By sharing our questions and solutions, we all help each other succeed in the cloud. Here’s to smooth sailing in your Microsoft cloud journey!