Created
May 11, 2012 16:02
-
-
Save litodam/2660632 to your computer and use it in GitHub Desktop.
PS1 script to use a starting point
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
$scriptDir = (split-path $myinvocation.mycommand.path -parent) | |
Set-Location $scriptDir | |
#check if the snapin was registered... | |
if ((Get-PSSnapin -Registered | ?{$_.Name -eq "MySnapin"}) -eq $null) { | |
Write-Host "SnapIn not installed." -ForegroundColor Red | |
return | |
} | |
if ((Get-PSSnapin | ?{$_.Name -eq "MySnapin"}) -eq $null) { | |
Add-PSSnapin MySnapin | |
} | |
# your stuff here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment