This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // 1. Select all elements that match the selector | |
| const pdfButtons = document.querySelectorAll('button.buttonLink.ng-star-inserted:not([disabled])'); | |
| // 2. Loop through the elements and schedule the click with a delay | |
| pdfButtons.forEach((button, index) => { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function performActions() { | |
| const rows = document.querySelectorAll('.uf-table-row-clickable'); | |
| const downloadDelay = 2300; // Delay in milliseconds before clicking the download button | |
| const mouseEvent = (element) => { | |
| if (element) { | |
| element.dispatchEvent(new MouseEvent('click', { | |
| bubbles: true, | |
| cancelable: true, | |
| view: window | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // This script automates clicking a checkbox and a download button, | |
| // using a click event to uncheck the previous checkbox. | |
| const checkboxes = document.querySelectorAll('.td-wb-checkbox__input'); | |
| const downloadButton = document.getElementById('td-wb-eservices-statements-download'); | |
| // Base delay of 500ms + a random variation | |
| const baseDelay = 500; | |
| let i = 0; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const preElement = document.querySelector('pre'); | |
| const jsonString = preElement.textContent; | |
| const data = JSON.parse(jsonString); | |
| const uniquePlanNames = [...new Set(Object.values(data).map((value) => value.plan_name))]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | git diff HEAD^ HEAD --name-only | grep -E '.*\.(ts|tsx)$' | wc -l | xargs -I {} test {} -eq 0 && echo "Nothing found..." || exit 1" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $interfaceName = "Wi-Fi" | |
| # Check if the interface is up and connected | |
| $interface = Get-NetAdapter -Name $interfaceName -Physical | Where-Object { $_.Status -eq "Up" } | |
| if ($interface) { | |
| # Check for internet connectivity using Test-NetConnection | |
| $test = Test-NetConnection -ComputerName 8.8.8.8 -InformationLevel Quiet | |
| if (-not $test) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <# | |
| .SYNOPSIS | |
| Resets DNS server addresses to automatic (DHCP) for all active network adapters using a UAC prompt for elevation. | |
| .DESCRIPTION | |
| This script identifies all active network adapters and then attempts to reset their DNS server | |
| addresses to be obtained automatically via DHCP. If the script is not run with administrative | |
| privileges, it will automatically prompt for elevation using a UAC dialog. | |
| This eliminates the need to hardcode or explicitly prompt for administrator credentials within the script. | |
| The new PowerShell window launched by 'runas' will remain open after execution, even if errors occur, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Define URLs | |
| $prepToolUrl = "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/raw/refs/heads/master/IntuneWinAppUtil.exe" | |
| $acrobatMspUrl = "https://ardownload2.adobe.com/pub/adobe/acrobat/win/Acrobat2020/2000530748/Acrobat2020Upd2000530748.msp" | |
| # Define output paths | |
| $toolPath = "$env:TEMP\IntuneWinAppUtil.exe" | |
| $appPath = "$env:TEMP\Win32AppPackageBuilder" | |
| $acrobatMspPath = "$appPath\Acrobat2020Upd.msp" | |
| $outputFolder = "$env:TEMP\Win32AppPackage" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Rename Files Using OpenAI API with Verbose Logging and Progress Indicator | |
| -- Based on (c) 1201 Apple, Inc. & (c) 1204-2019 DEVONtechnologies, LLC. | |
| tell application id "DNtp" | |
| try | |
| set this_selection to the selection | |
| if this_selection is {} then error "Please select some contents." | |
| set itemCount to count of this_selection | |
| set currentIndex to 0 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Fixing Stripped Exchange Online Role Permissions: A Step-by-Step Solution | |
| When managing Exchange Online roles, it's easy to accidentally strip critical permissions while making modifications. Here's how I recently solved an issue where the Organization Management role lost most of its permissions, including the crucial Role Management permission. | |
| ## The Problem | |
| During a routine task of adding Import PST permissions to the Organization Management role, most other permissions were inadvertently removed. The situation was particularly challenging because: | |
| 1. The Role Management permission was among those stripped | |
| 2. The 365 Admin Center's people picker wasn't functioning | 
NewerOlder