I hereby claim:
- I am adilio on github.
- I am adilio (https://keybase.io/adilio) on keybase.
- I have a public key ASAA457_y7Q9ce12VjfS7_kOWi4Bl_bLrqIZvqVA3RzStAo
To claim this, I am signing this object:
# 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) |
# 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 |
################## | |
# 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 |
<# | |
Write-Log.ps1 | |
20181027 - 4dilio | |
Simple function to write to a log file. | |
You MUST define $Log in your script. | |
#> | |
function Write-Log { | |
[CmdletBinding()] | |
param( |
@echo off | |
if "%1%" == "precustomization" ( | |
echo No pre-customization tasks to run | |
) else if "%1%" == "postcustomization" ( | |
echo Running post-customization tasks | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f | |
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f | |
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f | |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f | |
netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes |
# Run this script in an elevated prompt, and quit and reload Slack after | |
$slackBaseDir = "C:\Program Files\Slack\" | |
$installations = Get-ChildItem $slackBaseDir -Directory | Where-Object { $_.Name.StartsWith("app-") } | |
$version = $installations | Sort-Object { [version]$_.Name.Substring(4) } | Select-Object -Last 1 | |
Write-Output "Choosing highest present Slack version: $version" | |
$customContent = @' | |
// First make sure the wrapper app is loaded |
# Author: Colin Andress | |
# Modified by: adilio | |
# Github Link: https://github.com/Column01 | |
Write-Output 'Getting Windows User and Slack version' | |
$user = $env:UserName | |
if (Test-Path -Path "C:\Users\$user\AppData\Roaming\Slack\storage\slack-settings") { | |
$json = Get-Content "C:\Users\$user\AppData\Roaming\Slack\storage\slack-settings" | Out-String | ConvertFrom-Json | |
} | |
else { | |
Write-Output 'Unable to find the slack version info. Is slack installed from the windows store? Make sure it is from the slack website!' |
I hereby claim:
To claim this, I am signing this object:
Stop-Service nexus | |
#Backup SSL Configuration | |
if(-not (Test-Path C:\nexusbackup)){ | |
New-Item C:\nexusbackup -ItemType Directory | |
} | |
if(Test-Path C:\ProgramData\nexus\etc\ssl\keystore.jks){ | |
Copy-Item C:\ProgramData\nexus\etc\ssl\keystore.jks C:\nexusbackup | |
} |