Advanced Search
Search Results
26 total results found
Create a Scheduled Task
To create a scheduled task in Windows Powershell that executes a Powershell Script. CREATE SCHEDULED TASK $action = New-ScheduledTaskAction -Execute "cd C:\path\to\script\location; ./script.ps1" $trigger = New-ScheduledTaskTrigger -At "8:15 pm" -Daily $pri...
Change Drive Letter in Powershell
Sourceshttps://devblogs.microsoft.com/powershell-community/changing-drive-letters-and-labels-via-powershell/https://chindara.medium.com/windows-10-powershell-to-assign-drive-letters-2dcb840191bb List all the disks. Get-Disk List all partitions for a specifi...
Lock Windows Workstation
In command prompt, run: Rundll32.exe user32.dll,LockWorkStation
Find and Replace with Regex
Regex to find date and time. Option 1: ([\d]{1,2})/([\d]{1,2})/([\d]{4}) in format mm/dd/yyyy Option 2: [0-9]{4}-[0-9]{2}-[0-9]{2}T in format yyyy-mm-dd Option 3: ([0-1]?[0-9]|2[0-3]):[0-5][0-9] in format HH:mm In Sublime Text Find and Replace (CMD+OPT+F) ...
Change Intune macOS Personal Ownership to Company
Get-MgDeviceManagementManagedDevice -All | Where-Object {$_.ManagedDeviceOwnerType -eq "unknown" -and $_.OperatingSystem -like "macOS"} | % { Update-MgDeviceManagementManagedDevice -ManagedDeviceId $_.Id -ManagedDeviceOwnerType company }
Prevent Spoofing of Executives
To add a disclaimer for incoming emails that bear the name of an executive, go to the Exchange Transport Rules and create a rule. https://admin.exchange.microsoft.com/#/transportrules Rule Conditions: The Message Header From Contains executive names AND T...