Enhancing IT Administration with New PowerShell Scripts
In the ever-evolving landscape of IT management, administrators play a crucial role in ensuring the seamless operation of both human and technological resources within organizations. Recognizing this, Microsoft is committed to simplifying the tasks faced by IT admins by phasing out outdated features and promoting modern solutions. Recently, the tech giant has unveiled new PowerShell scripts designed to streamline specific operations for IT administrators.
These newly developed PowerShell scripts enable admins to efficiently view, export, and delete users’ Windows settings backup data via the Microsoft Graph windowsSetting APIs. While similar functionalities existed previously, they required direct interaction with Graph APIs, a process that many found cumbersome.
Among the notable scripts released are:
- View-WindowsBackup.ps1: This script provides the ability to view and export backup data effortlessly.
- Delete-WindowsBackup.ps1: This script allows for the irreversible deletion of backup data, complete with confirmation prompts and detailed information about the items set for deletion.
To utilize these scripts, the following commands can be executed:
Get-WindowsBackup
Get-WindowsBackup -UserId [email protected]
Remove-WindowsBackup -UserId [email protected]
It is important to note that viewing and exporting one’s own data does not require specialized permissions. However, executing the other two commands necessitates holding the Microsoft 365 Backup Administrator role.
Before running these scripts, users should ensure they meet the following prerequisites:
- Windows PowerShell 5.1 or PowerShell 7
- The Microsoft.Graph.Authentication module, which will be installed automatically upon the first execution
- Internet access to login.microsoftonline.com and graph.microsoft.com (port 443)
Microsoft encourages users to take advantage of these tools by installing them from the PowerShell Gallery using the following command:
Install-Module WindowsBackupAdmin -Scope CurrentUser
It is essential to keep in mind that these scripts are built on Microsoft Graph beta APIs, which are subject to change and may potentially disrupt existing functionalities. Additionally, the scripts include the Microsoft.Graph.Authentication module as a runtime dependency sourced from PowerShell Gallery, ensuring that no third-party code is involved in their operation.