Skip to content

Instantly share code, notes, and snippets.

View adilio's full-sized avatar
Just a boy. Sitting in front of a console. Asking it to do stuff.

Adil Leghari adilio

Just a boy. Sitting in front of a console. Asking it to do stuff.
View GitHub Profile
@adilio
adilio / Windows10-Setup.ps1
Created October 25, 2018 23:12 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@adilio
adilio / Copy-SpotlightImages.ps1
Last active May 7, 2023 16:15
Copies Windows Spotlight Images
<#
Copy-SpotlightImages.ps1
20181018 - 4dilio
Improved by https://www.reddit.com/user/Lee_Dailey/
Makes a copy of Windows Spolight images for your lockscreen,
and saves them to your $env:USERPROFILE\Pictures\Spotlight directory.
If the directory doesn't exist, it is created. Any image larger than
100 KB is copied, as some images in this folder are not wallpaper.
Also, files are renamed with date-stamp, along with first 8 charaters
of filename. This is just to help in sorting.
@adilio
adilio / Set-Preliminaries.ps1
Last active October 3, 2018 02:02
Preliminary config for win servers
# AnisbleMe.ps1
# Preliminary conifguration for a windows host
# Make sure Network profile is Private
$InterfaceId = (Get-NetConnectionProfile | Select-Object -ExpandProperty InterfaceIndex)
Set-NetConnectionProfile -InterfaceIndex $InterfacId -NetworkCategory Private
Write-Output "Interface Id $InterfaceId Network Profile set to Private"
# Enable Remote Desktop
Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Set-NetFirewallRule -Enabled true -Profile Private, Domain
@adilio
adilio / Get-Appointment-via-EWS.ps1
Last active January 16, 2018 02:34
Get-Appointment-via-EWS
# Import the EWS Managed API
Import-Module 'C:\Program Files\Microsoft\Exchange\Web Services\2.2\Microsoft.Exchange.WebServices.dll'
# Set Exchange version, credentials, and other variables
$ExchangeVersion = [Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP2
$Service = [Microsoft.Exchange.WebServices.Data.ExchangeService]::new($ExchangeVersion)
$User = "MY-SERVICE-ACCOUNT"
$Password = Get-Content MySuperSecureStringPassword.txt | ConvertTo-SecureString
$Service.Credentials = [System.Net.NetworkCredential]::new($User, $Password)