Skip to content

Instantly share code, notes, and snippets.

@srazzaque
srazzaque / startMongoRs.ps1
Last active December 22, 2015 14:49
Replica set starter for Windows 7 (PowerShell)
# Mongo replica set starter for use in Windows 7 (Powershell 3.x)
Write-Host "Mongo Replica Set Starter"
Write-Host "WARNING: Will delete rs1/2/3 directories and 1/2/3.log files in the current directory."
$replSet = "m101"
$curDir = (Get-Location).Path + "\"
function Start-MongoRS ($logPath, $dataDir, $portNo) {
$lp = $curDir + $logPath