Skip to content

Instantly share code, notes, and snippets.

@developerprofiles
developerprofiles / bootstrap-windows-jenkins-slave.ps1
Created March 1, 2021 12:26 — forked from cbittencourt/bootstrap-windows-jenkins-slave.ps1
PowerShell script to setup jenkins JNLP agent as a Windows Service
param(
[string]$jenkinsMasterbaseUrl,
[string]$nodeName,
[string]$privateKey,
[string]$workspaceRootFolder
)
$ErrorActionPreference = "Stop"
Function Install-JenkinsBuildAgent {
<#
.SYNOPSIS
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager
.DESCRIPTION
Adapted from: http://stackoverflow.com/questions/7162604/get-cached-credentials-in-powershell-from-windows-7-credential-manager
.PARAMETER TargetName
The name of the target login informations in the Windows Credential Manager
@developerprofiles
developerprofiles / InstallVs2010_Shell.ps1
Created March 2, 2021 10:31 — forked from IlyaFinkelshteyn/InstallVs2010_Shell.ps1
Install Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package
if ((Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -eq "Microsoft Visual Studio 2010 Shell (Isolated) - ENU"}) -ne $null)
{
Write-Host "Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package already installed."
}
else
{
Measure-command {
Write-Host "Downloading Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package..."
$exePath = "$($env:USERPROFILE)\VSIsoShell.exe"
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/1/9/3/1939AD78-F8E8-4336-83F3-E2470F422C62/VSIsoShell.exe', $exePath)
@developerprofiles
developerprofiles / user-profile.psm1
Created March 4, 2021 08:13 — forked from crshnbrn66/user-profile.psm1
PowerShell functions to create a new user profile
<#
.Synopsis
Rough PS functions to create new user profiles
.DESCRIPTION
Call the Create-NewProfile function directly to create a new profile
.EXAMPLE
Create-NewProfile -Username 'testUser1' -Password 'testUser1'
.NOTES
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif)
@developerprofiles
developerprofiles / ssh_keys_authentication.sh
Created March 7, 2021 13:05 — forked from fernandoaleman/ssh_keys_authentication.sh
How to install SSH Keys for authentication without password
# Create ssh private and public keys on your local machine
ssh-keygen -t rsa
# Set permissions on your private key
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
# Copy the public key to the server
scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys
@developerprofiles
developerprofiles / powershell-non-domain-remoting.md
Created March 26, 2021 16:19 — forked from cmcginty/powershell-non-domain-remoting.md
Windows Powershell Remoting into Non-Domain Joined System

Powershell Remoting to a Non-Domain Host

  1. From an admin shell, enable PS remoting on the machine you wish to access:
New-ItemProperty -Name LocalAccountTokenFilterPolicy `
  -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System `
  -PropertyType DWord -Value 1

Enable-PsRemoting -Force

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@developerprofiles
developerprofiles / portainer.md
Created March 27, 2021 14:48 — forked from SeanSobey/portainer.md
Portainer Setup on Windows 10

Portainer on Windows 10

Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.

Using host.docker.internal

This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost is depricated since docker version 3.2.1, but older versions may use this instead).

Please note:

@developerprofiles
developerprofiles / Defalut.nuspec
Created April 24, 2021 17:39 — forked from kulmam92/Defalut.nuspec
Create Nuget package for SSIS using MSBuild
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>_Dummy</id>
<version>1.0.0</version>
<authors>DBA</authors>
<owners>SpeakSQL</owners>
<licenseUrl>http://a.c</licenseUrl>
<projectUrl>http://a.c</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
@developerprofiles
developerprofiles / enable-iis-windows-10.ps1
Created May 4, 2021 16:38 — forked from yetanotherchris/enable-iis-windows-10.ps1
Powershell script to enable all IIS, MSMQ and WCF features on Windows 8 and 10.
Import-Module Dism
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HealthAndDiagnostics