This file contains hidden or 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
choco install firefox -y | |
choco install 7zip -y | |
choco install putty -y | |
choco install notepadplusplus.install -y | |
choco install nuget.commandline -y | |
choco install git -y | |
choco install kdiff3 -y | |
choco install gitextensions -y | |
choco install vim -y | |
choco install fiddler4 -y |
This file contains hidden or 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-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop | |
Enable-MicrosoftUpdate | |
Install-WindowsUpdate -AcceptEula | |
cinst GoogleChrome | |
cinst PowerShell4 | |
cinst webpi | |
cinst notepadplusplus |
This file contains hidden or 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-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop | |
Enable-MicrosoftUpdate | |
Install-WindowsUpdate -AcceptEula | |
choco install cccp | |
choco install vlc | |
choco install powershell4 |
This file contains hidden or 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
## FYI: These scripts are now maintained in a proper repository: | |
## https://github.com/alastairtree/deploy-websites-with-powershell | |
## Intro: Simple powershell script to install (or replace) a local website and app pool | |
## Usage: CreateSite.ps1 [WebsiteName] [AppPoolName] [Port] [Path] ([domain\user] [password]) | |
## Note : These scripts require local admin priviliges! | |
# Load IIS tools | |
Import-Module WebAdministration | |
sleep 2 #see http://stackoverflow.com/questions/14862854/powershell-command-get-childitem-iis-sites-causes-an-error |
This file contains hidden or 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
$path = "C:\Sites\Website123" | |
$user = "domain\user" | |
$acl = Get-Acl $path | |
$arguments = $user, "ReadAndExecute", "ContainerInherit, ObjectInherit", "None", "Allow" | |
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $arguments | |
$acl.SetAccessRule($accessRule) |
This file contains hidden or 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-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-RemoteDesktop | |
Enable-MicrosoftUpdate | |
Install-WindowsUpdate -AcceptEula | |
cinst dotnet4.5.1 | |
cinst firefox | |
cinst 7zip | |
cinst putty |
This file contains hidden or 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
# at an PS> prompt with sufficient admin credentials | |
Restart-Computer ServerName -force | |
# or | |
# Restart-Computer "ServerName1", "ServerName2" -force | |
# More info https://mcpmag.com/articles/2012/04/10/how-to-restart-computers-remotely-via-powershell.aspx |
This file contains hidden or 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
public static class RetryHelper | |
{ | |
private static ILog logger = LogManager.GetLogger(); //use a logger or trace of your choice | |
public static void RetryOnException(int times, TimeSpan delay, Action operation) | |
{ | |
var attempts = 0; | |
do | |
{ | |
try |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="IE=edge" http-equiv="X-UA-Compatible"> | |
<meta content="width=device-width, initial-scale=1.0" name="viewport"> | |
<title>[TITLE]</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<style> |
This file contains hidden or 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 KillTheService($ServiceName) | |
{ | |
$service = Get-Service $ServiceName -ErrorAction SilentlyContinue | |
if (!$service) | |
{ | |
"Could not find service $ServiceName" | |
} | |
else | |
{ |
OlderNewer