Skip to content

Instantly share code, notes, and snippets.

View ahmed-mokhtar-hassanein's full-sized avatar

Ahmed Mokhtar Hassanein ahmed-mokhtar-hassanein

View GitHub Profile
@ahmed-mokhtar-hassanein
ahmed-mokhtar-hassanein / mousemove.ps1
Created September 25, 2022 16:35 — forked from MatthewSteeples/mousemove.ps1
Powershell Script to keep the mouse moving
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
$Pos = [System.Windows.Forms.Cursor]::Position
$x = ($pos.X % 500) + 1
$y = ($pos.Y % 500) + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
Start-Sleep -Seconds 10
}
# Show message box popup.
Add-Type -AssemblyName System.Windows.Forms
$result = [System.Windows.Forms.MessageBox]::Show("My message", "Window Title", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::None)
# Show input box popup.
Add-Type -AssemblyName Microsoft.VisualBasic
$inputText = [Microsoft.VisualBasic.Interaction]::InputBox("Enter some value:", "Window Title", "Default value")
# Show an Open File Dialog and return the file selected by the user.
function Read-OpenFileDialog([string]$InitialDirectory, [switch]$AllowMultiSelect)
@ahmed-mokhtar-hassanein
ahmed-mokhtar-hassanein / Compact all PST files.au3
Created May 20, 2022 21:50 — forked from rickupton/Compact all PST files.au3
Automatically compact all Microsoft Outlook PST data files using an AutoIT script
;//Compact all PST files.au3
;//Rick Upton, November 1, 2015
;//http://www.rickupton.com | http://gb.rickupton.com
;//
;//This AutoIT script is a slightly modified version of code posted here: http://superuser.com/questions/836758/bulk-compaction-of-700gb-of-pst-files
;//The purpose of this code is to automatically compact all Outlook PST files on a Windows PC.
;//
;//Using a PowerShell script, open the Mail control panel and then run this script using the following two commands:
;//Show-ControlPanelItem Mail*
;//Start-Process "C:\Compact all PST files.au3" -Wait
@ahmed-mokhtar-hassanein
ahmed-mokhtar-hassanein / Rick Startup.ps1
Created May 20, 2022 21:46 — forked from rickupton/Rick Startup.ps1
Compact and backup all Microsoft Outlook PST data files using a PowerShell script
# Rick Startup.ps1
# Rick Upton, November 1, 2015
# http://www.rickupton.com | http://gb.rickupton.com
#
# This script:
# 1) Compacts Microsoft Outlook personal storage table (PST) data files.
# 2) Backs up PST data files into a date and time stamped folder.
# 3) Launches multiple applications.
#
# To set this script up to launch every time you log into Windows: