Skip to content

Instantly share code, notes, and snippets.

@jermdavis
jermdavis / SolrInstall-SIF-Extension.psm1
Last active November 23, 2021 13:29
A Sitecore Install Framework extension to install a development instance of Solr - Further detail at: https://blog.jermdavis.dev/posts/2017/solr-installs-with-sif
##
## private functions
##
#
# If necessary, download a file and unzip it to the specified location
#
function downloadAndUnzipIfRequired
{
Param(
@akshaysura
akshaysura / Install MongoDB 3.2.7 as a Windows Service using Windows PowerShell
Last active September 30, 2019 19:47
Use this PowerShell script to install MongoDB
$mongoDbPath = "$env:SystemDrive\MongoDB"
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg"
$url = "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.2.7.zip"
$zipFile = "$mongoDbPath\mongo.zip"
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-3.2.7"
if ((Test-Path -path $mongoDbPath) -eq $True)
{
write-host "Seems you already installed MongoDB"
exit
@markembling
markembling / hosts.ps1
Created August 24, 2009 13:38
Powershell script for adding/removing/viewing entries to the hosts file.
#
# Powershell script for adding/removing/showing entries to the hosts file.
#
# Known limitations:
# - does not handle entries with comments afterwards ("<ip> <host> # comment")
#
$file = "C:\Windows\System32\drivers\etc\hosts"
function add-host([string]$filename, [string]$ip, [string]$hostname) {