Skip to content

Instantly share code, notes, and snippets.

View zbalkan's full-sized avatar
💻
back again

Zafer Balkan zbalkan

💻
back again
View GitHub Profile
@zbalkan
zbalkan / Export ADS.ps1
Last active July 21, 2019 14:03
A simple function to export NTFS Alternate Data Streams (ADS) of a specified file as symbolic links.
function Export-ADS (){
[CmdletBinding()]
param (
$Path
)
process {
Get-Item $Path -Stream * |
Select-Object -Property Stream -Skip 1 |
ForEach-Object {
$item = Get-Item $Path
# 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
function New-RemoteScheduledTask {
[CmdletBinding()]
param (
# Hostname to create the task on
[string]
$Hostname,
# Credentials for connecting to the host
[System.Management.Automation.PSCredential]
$Credential,
@zbalkan
zbalkan / Boxstarter_Win10.ps1
Last active August 27, 2020 10:59
My default Boxstarter script
# 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
# 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