OSDeploy | Sune Thomsen
TwitterLinkedInWindows 365 CommunityMVP ProfileGitHub
  • Home
  • Blog
    • Microsoft Intune
      • How to migrate BitLocker key(s) from all fixed drives to Microsoft Entra ID.
      • Migrate Bitlocker Recovery Key(s) to Azure AD with Proactive Remediation
      • Migrate imported GPOs to Intune with Group Policy analytics (preview)
      • Group Policy analytics (preview) made a bit easier with PowerShell
      • Analyze on-premises GPOs with MEM Group Policy Analytics (preview)
    • Virtual Machine
      • Fix the Hyper-V virtual switches after updating to Windows 11 (22H2)
    • 🆕Windows 365
      • 🆕Windows 365 Boot: Why User-Driven Mode?
      • 🆕Enhancing Security With Intune MAM (preview) for Windows 365
      • The Concept of Windows 365 Switch
      • The Concept of Windows 365 Boot
      • The Concept of Windows 365 Frontline
      • Move Cloud PCs to a new Azure Region or Azure Network Connection
      • Windows 365 End-User Experience (Tips & Tricks) – Part 4. Windows 365 app and Cloud PC reporting
      • Windows 365 End-User Experience (Tips & Tricks) – Part 3. Multimedia Redirection
      • Windows 365 End-User Experience (Tips & Tricks) – Part 2. Teams Optimization, SSO, and Localization
      • Windows 365 End-User Experience (Tips & Tricks) – Part 1. Connection experience
      • How to Configure Windows 365 Azure AD Join Single Sign-on (SSO)
      • Keep Windows 365 current and stay current with Windows Autopatch
      • Provide the end-users with a localized Windows 365 Cloud PC experience
      • How to configure Windows 365 Enterprise Azure AD join
      • How to secure Windows 365 using a FIDO2 security key
      • Prevent sensitive information from being captured on Windows 365 CPCs
      • Manage local administrator rights on Windows 365 Cloud PCs.
      • How to create a custom image for Windows 365 Enterprise Cloud PCs
      • How to reprovision existing Cloud PC (Windows 365) to Windows 11
      • How to configure Windows 365 Enterprise in Microsoft Endpoint Manager
  • Archive
    • Deployment
      • OSDCloud: The ZTI Way
      • OSDBuilder: WinPE Customization
    • Microsoft Configuration Manager
      • ConfigMgr: Run "All" Client Actions During OSD
      • ConfigMgr: WIM Your Applications Like a Boss
      • ConfigMgr: Deploy UWP Applications During OSD
      • ConfigMgr: Building a Basic LAB Environment
        • Part 1 - Installing Windows 10 (1909) on the Host
        • Part 2 - The Host and Hyper-V Configuration
        • Part 3 - Setting up the Domain Controller
          • Active Directory
          • DHCP
          • DNS
        • Part 4 - Setting up Microsoft Endpoint Configuration Manager
          • Prerequisites
          • SQL
        • Part 5 - Setting up Discovery Methods and Boundaries
        • Part 6 - Setting up Software Update Point
      • ConfigMgr: Splash Screen for Driver and BIOS Update
      • ConfigMgr: Global Conditions for Dell WD15 Dock Detection
    • Microsoft Intune
      • Block personally owned devices in Intune with enrollment restrictions
      • Remove Windows 10 built-in apps with Intune & Microsoft Store for Business Apps
    • Windows
      • Win10: Multi-Language Toast Notifications
        • Toast Notification: Low Disk Space
  • Links
    • Blogs
    • Microsoft
    • Scripts
Powered by GitBook
On this page
  • BEFORE YOU BEGIN
  • LOW DISK SPACE
  • ConfigMgr Preparations

Was this helpful?

  1. Archive
  2. Windows
  3. Win10: Multi-Language Toast Notifications

Toast Notification: Low Disk Space

PreviousWin10: Multi-Language Toast NotificationsNextBlogs

Last updated 5 years ago

Was this helpful?

BEFORE YOU BEGIN

If you have not read my original blog on , I recommend that you do so before reading any further.

LOW DISK SPACE

Now that I have successfully used awesome Toast Notifications script for our Driver Dynamic Driver and BIOS Update process, I could also see other usage for this script! So here comes one of our latest uses of Toast Notifications.

Martin’s Blog:

I will not be deep-diving into the details, so please read my previous blog or Martin’s blog above if you want detailed information about Toast Notifications.

Let´s get started - We have for a long time been using collections in ConfigMgr that exclude devices with less than 5GB of free disk space from Applications/Program install and Windows Updates, these collections trigger a clean up script to run on these devices.

We want to make our end users aware that when they have less than 5GB of free disk space left on (C:), it has some consequences and that they can do clean up on their device themselves.

I have decided to use Toasted Notifications for this awareness purpose which allows users to remind them later or to click on a clean up button which will lead them to the Storage Sense in settings.

The only difference from my previous Toast Notification used for the Driver Dynamic Driver and BIOS Update process, is that the text and option for action in the *.XML has changed to the below value.

<Option Name="Action" Value="ms-settings:storagesense" />

If you can't make it work with "Software Center" as the app for toast notifications, make sure you haven't deleted or hidden the original Software Center shortcut!

ConfigMgr Preparations

We must configure a device collection in ConfigMgr that collect devices with less than 5GB of disk space. If not already done, the first thing we need to do here is extend our Hardware Inventory Class -> Logical Disk (SMS_LogicalDisk) with Free Space (MB) otherwise we will not be able to measure for free disk space on our devices. Just follow these few steps:

Step 1. Select Administration in the ConfigMgr console and go to Client Settings

Step 2. Open the Default Client Settings

Step 3. Select Hardware Inventory and click Set Classes…

Step 4. Scroll down to Logical Disk (SMS_LogicalDisk) and tick the checkbox for Free Space (MB).

Step 5. Now wait for the devices to run Hardware Inventory Cycle (Default 7 days)

Once Hardware Inventory has finished run its cycle we will be able to see Free Space (MB) in the resource explorer for any given device.

We will now be able to create a device collection that collects devices based on free disk space. Just follow these few steps:

Step 1. Create a new Device Collection and add a query rule

Step 2. Set the following configuration in the query properties

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceID = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.FreeSpace < 5120 and SMS_G_System_LOGICAL_DISK.DeviceID = "C:"

That's all, folks! We are now ready to deploy the Toast Notification to our newly created collection to inform our end users to clean up their device. Nice!

Now go out and impress your boss and colleagues!

For further information on how to deploy a Toast Notification with ConfigMgr, please take a look at my previous blog post on .

A special thanks go to ! If you have any questions regarding this topic, feel free to reach out to me. I am most active on !

Multi-Language Toast Notification
Martin
Twitter
Multi-Language Toast Notifications
Martin Bengtsson
https://bit.ly/35o4sz4
Toast Notification - Low Disk Space
Settings - Storage Sense
ConfigMgr - Administration
ConfigMgr - Default Client Settings
ConfigMgr - Hardware Inventory Classes
ConfigMgr - Resource Explorer
ConfigMgr - Collection