This file contains 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
# Set proxy settings if behind an enterprise proxy by using these in PS profile | |
[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://proxy:port') | |
[system.net.webrequest]::defaultwebproxy.credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials | |
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true | |
# Set proxy settings for git | |
git config --global https.proxy http://username:password@proxy:port | |
git config --global http.sslVerify false | |
# Type the command to install Chocolatey |
This file contains 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
# Windows settings | |
# TODO: Add Win10 bloatware cleanup | |
# Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess | |
# Set-TaskbarOptions -Size Large -UnLock -Dock Bottom -Combine Never -AlwaysShowIconsOn | |
# Enable-RemoteDesktop | |
# Disable-GameBarTips | |
# Disable-BingSearch | |
# Install-WindowsUpdate | |
# Chocolatey Packages |
This file contains 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 New-RemoteScheduledTask { | |
[CmdletBinding()] | |
param ( | |
# Hostname to create the task on | |
[string] | |
$Hostname, | |
# Credentials for connecting to the host | |
[System.Management.Automation.PSCredential] | |
$Credential, |
This file contains 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
# Windows settings | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess | |
Set-TaskbarOptions -Size Large -UnLock -Dock Bottom -Combine Never -AlwaysShowIconsOn | |
Enable-RemoteDesktop | |
Install-WindowsUpdate | |
# Chocolatey Packages | |
# Libraries | |
cinst dotnetfx | |
cinst dotnetcore-sdk |
This file contains 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 Export-ADS (){ | |
[CmdletBinding()] | |
param ( | |
$Path | |
) | |
process { | |
Get-Item $Path -Stream * | | |
Select-Object -Property Stream -Skip 1 | | |
ForEach-Object { | |
$item = Get-Item $Path |
This file has been truncated, but you can view the full file.
This file contains 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 localhost | |
127.0.0.1 localhost | |
51.75.66.169 vps607578.ovh.net vps607578 | |
127.0.1.1 vps607578.ovh.net vps607578 | |
127.0.1.1 vps607578 vps607578 | |
# NSABlocklist begins here | |
127.0.0.1 108.61.165 | |
127.0.0.1 130.117.50.166 |
This file contains 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 | |
Sends an email message using existing Exchange Server with user's credential. | |
.DESCRIPTION | |
The Send-MailMessage2 cmdlet sends an email message from within Windows PowerShell. It utilizes Autodiscovery feature of Exchange Server. | |
.EXAMPLE | |
Send an email from one user to another: | |
PS C:\>Send-MailMessage2 -To "User01 <user01@example.com>" -Subject "Test mail" |
This file contains 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
Add-Type -Assembly System.Windows.Forms | |
$script:MainForm = New-Object System.Windows.Forms.Form | |
$script:MainForm.Text = '' | |
$script:MainForm.Width = 600 | |
$script:MainForm.Height = 400 | |
$script:MainForm.AutoSize = $false | |
$script:MainForm.TopMost = $true | |
$script:MainForm.FormBorderStyle = 'None' | |
$script:MainForm.WindowState = 'Maximized' | |
$script:MainForm.BackColor = 'Black' |
This file contains 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
#Requires -RunAsAdministrator | |
#Requires -Version 5 | |
<# | |
.Synopsis | |
Activates Windows via KMS | |
.DESCRIPTION | |
It's a drop in replacement for slmgr scripts | |
.EXAMPLE | |
Start-WindowsActivation -Verbose # Activates the local computer | |
.EXAMPLE |
This file contains 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
# Logging | |
$LogCommandHealthEvent = $true | |
$LogCommandLifecycleEvent = $true | |
# Culture | |
Set-Culture -CultureInfo en-us | |
[Console]::InputEncoding = [System.Text.Encoding]::UTF8 | |
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
# Modify Get-History alias, like history command in bash |
OlderNewer