full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/OctopusDeploy_OctopusDeploy-Api/REST/PowerShell/Variables/GetVariablesFromVariableSet.ps1
GetVariablesFromVariableSet.ps1
##Config $OctopusAPIkey = ""#Octopus API Key $OctopusURL = ""#Octopus URL $variableSetName = "Whatever" #Name of the variable set $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } ##Process $VariableSet = (Invoke-WebRequest "$OctopusURL/api/libraryvariablesets?contentType=Variables" -Headers $header).con...
PowerShellCorpus/Github/OctopusDeploy_OctopusDeploy-Api/REST/PowerShell/Variables/GetVariableValueFromADeployment.ps1
GetVariableValueFromADeployment.ps1
##CONFIG $OctopusURL = "" #Octopus URL $OctopusAPIKey = "" #Octopus API Key $DeploymentID = "" #ID of the deployment you want to get the variable from. E.g. Deployments-41 $VariableName = "" #Variable name ##PROCESS## $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $variable = ((invoke-webrequest $Octop...
PowerShellCorpus/Github/OctopusDeploy_OctopusDeploy-Api/REST/PowerShell/Variables/MigrateVariableSetVariablesToProject.ps1
MigrateVariableSetVariablesToProject.ps1
$baseUri = "http://octopus.url" # <-- Update this to the base URL to your Octopus server(i.e. not including 'app' or 'api' $apiKey = "API-xxxxxxxxxxxxxxxxxxxxxxxxxx" # <-- Update this to your API key $headers = @{"X-Octopus-ApiKey" = $apiKey} $libraryVariableSetId = "LibraryVariableSets-1" # <-- Update this to the I...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Add-AccessRule.ps1
Add-AccessRule.ps1
function Add-Accessrule { <# .SYNOPSIS Adds a rule to an Acl. .DESCRIPTION Adds a rule to an Acl. Accepts Pipeline input (from Acls) and adds an array of AccessRules to the Acl, before returning it. This makes it possible to make it part of a Access-Rule Pipeline construct. .PARAMETER InputObj...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Invoke-Runspace.ps1
Invoke-Runspace.ps1
#region Source $source = @" using System; using System.Collections; using System.Management.Automation; namespace Netzwerker.Shell { /// <summary> /// A parameter Class to automate parameterized parameterization. /// This class models a ParameterName / ParameterValue pair used when invoking comma...
PowerShellCorpus/Github/FriedrichWeinmann_functions/New-Shortcut.ps1
New-Shortcut.ps1
#region Library $source = @" using System; using System.Collections; using System.IO; using System.Runtime.InteropServices; namespace Netzwerker { namespace FileSystem.NTFS { public static class FileSystem { #region Create Symbolic Link [DllImport("kernel32...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Encrypt-Credential.ps1
Encrypt-Credential.ps1
function Encrypt-Credential { <# .SYNOPSIS Encrypts and writes to file a set of credentials using Windows Security of any chosen account. .DESCRIPTION This function stores a set of encrypted credentials in a file, for any task running under a specified user to use. This is accomplished by ... ...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Expand-Object.ps1
Expand-Object.ps1
function Expand-Object { <# .SYNOPSIS A comfortable replacement for Select-Object -ExpandProperty. .DESCRIPTION A comfortable replacement for Select-Object -ExpandProperty. Allows extracting properties with less typing and more flexibility: Preferred Properties: By defining a list of...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Remove-Null.ps1
Remove-Null.ps1
function Remove-Null { <# .SYNOPSIS Removes null and empty objects. .DESCRIPTION Filters out all objects that are either null or empty. Useful to insert into a pipeline. This includes empty strings, empty collections, null-values, psobjects without properties, hashtables without values/bna...
PowerShellCorpus/Github/FriedrichWeinmann_functions/New-AccessRule.ps1
New-AccessRule.ps1
function New-AccessRule { <# .SYNOPSIS Creates a new FileSystem AccessRule. .DESCRIPTION Creates a new FileSystem AccessRule, which can be added to an Acl. Defaults to: - Modify Permissions - To Object and all children .PARAMETER Name Alias: user, username, samaccountname, al...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Convert-TimeZone.ps1
Convert-TimeZone.ps1
function Convert-TimeZone { <# .SYNOPSIS Converts a DateTime object from one Timezone to another. .DESCRIPTION Converts a DateTime object from one Timezone to another. .PARAMETER Date Default: Get-Date The DateTime-object(s) to convert. .PARAMETER From Default: Local Timez...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Set-Shell.ps1
Set-Shell.ps1
$__source = @" using System; using System.Drawing; using System.Runtime.InteropServices; namespace Netzwerker.Shell.Console { public static class ConsoleHelper { [DllImport("kernel32")] private static extern bool SetConsoleIcon(IntPtr hIcon); /// <summary> /// Sets...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Invoke-AddressResolutionProtocol.ps1
Invoke-AddressResolutionProtocol.ps1
#region Source Code Add-Type @" namespace Netzwerker.Network.Diagnostics { using System; using System.Collections.Generic; using System.ComponentModel; using System.Management.Automation; using System.Net; using System.Net.NetworkInformation; using System.Runtime.InteropServices; ...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Send-Ping.ps1
Send-Ping.ps1
#region Network Library $source = @" using System; using System.Net; using System.Net.NetworkInformation; namespace FWN { namespace Network { public class PingReply { public IPAddress address; public int RoundtripTime; public PingReply(IPAddre...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Test-ADGroupMembership.ps1
Test-ADGroupMembership.ps1
function Test-ADGroupMembership { <# .SYNOPSIS Tests whether a given AD Principal is member of a given group. .DESCRIPTION Tests whether a given AD Principal is member of a given group. .PARAMETER InputObject Alias: user, username, samaccountname, computer, cn, group, dn The object t...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Import-ModuleExchange.ps1
Import-ModuleExchange.ps1
function Import-ModuleExchange { <# .SYNOPSIS Sets up a full connection to any on-premise Exchange Server starting 2010. .DESCRIPTION This function establishes a connection with an Exchange Server, by importing a session from the remote powershell hosted in the IIS service. However, this functi...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Get-TechnetRepository.ps1
Get-TechnetRepository.ps1
#region Type $source = @" using System; namespace Netzwerker.Utility { public class TNGalleryElement { public string Title; public string Author; public Uri Link; public string Summary; public string[] Tags; public int Stars; public int Do...
PowerShellCorpus/Github/FriedrichWeinmann_functions/Test-CommandHelp.ps1
Test-CommandHelp.ps1
function Test-CommandHelp { <# .SYNOPSIS Tests the help of a command. .DESCRIPTION This function performs a pester test on the help of a given function. It will test, whether all pieces of help best practices require are available. .PARAMETER Command ParSet: Info The command tha...
PowerShellCorpus/Github/nippe_PowerShell-snippets/Get-FileTypeStatistics.ps1
Get-FileTypeStatistics.ps1
# From Brad Wilson dir -r | %{ [System.IO.Path]::GetExtension($_) } | sort | group
PowerShellCorpus/Github/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/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...
PowerShellCorpus/Github/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $compilerPackageName = 'Microsoft.Net.Compilers' $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $libDirectory = Join-Path $installPath 'lib\net45' $packageDirectory = Split-Path $installPath $compilerPackage = Get-Chil...
PowerShellCorpus/Github/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory = Join-Path $projectRoot 'bin' $targetDirectory = Join-Path $binDirectory $roslynSubFolder if (Te...
PowerShellCorpus/Github/GreyFlyDev_FinanceAssistantWebApp/FinanceAssistantWebApp/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/dindenver_PowershellInventory/DM-Inventory-OpsSystems.ps1
DM-Inventory-OpsSystems.ps1
# ********************************************************************************** # # Script Name: Inventory-OpsSystems.ps1 # Version: 1.4 # Author: Aaron O and Dave M # Date Created: 11-16-2015 # _______________________________________ # # MODIFICATIONS: # Date Modified: 11-17-2015 # Modified By: Dave m ...
PowerShellCorpus/Github/dindenver_PowershellInventory/DM-Merge-InventoryData.ps1
DM-Merge-InventoryData.ps1
# ********************************************************************************** # # Script Name: Merge-InventoryData.ps1 # Version: 1.0 # Author: Dave M # Date Created: 12/9/15 # _______________________________________ # # MODIFICATIONS: # Date Modified: N/A # Modified By: N/A # Reason for modification:...
PowerShellCorpus/Github/pt3r0nura_MyRepo/packages/EntityFramework.5.0.0-rc/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' } if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 ))) { $thisModuleManifest = 'EntityFramework.PS3.psd1' } else { $thisModuleManifest = 'EntityFramework.psd1' } $thisModule...
PowerShellCorpus/Github/pt3r0nura_MyRepo/packages/EntityFramework.5.0.0-rc/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project) { $appDomain = [AppDomain]::CreateDomain( 'EntityFramework.PowerShell', $null, (New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' })) ...
PowerShellCorpus/Github/pt3r0nura_MyRepo/packages/Microsoft.AspNet.Providers.LocalDB.1.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$projectNa...
PowerShellCorpus/Github/pt3r0nura_MyRepo/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/pt3r0nura_MyRepo/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/pt3r0nura_MyRepo/LessonProject/packages/EntityFramework.5.0.0-rc/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' } if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 ))) { $thisModuleManifest = 'EntityFramework.PS3.psd1' } else { $thisModuleManifest = 'EntityFramework.psd1' } $thisModule...
PowerShellCorpus/Github/pt3r0nura_MyRepo/LessonProject/packages/EntityFramework.5.0.0-rc/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project) { $appDomain = [AppDomain]::CreateDomain( 'EntityFramework.PowerShell', $null, (New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' })) ...
PowerShellCorpus/Github/pt3r0nura_MyRepo/LessonProject/packages/Microsoft.AspNet.Providers.LocalDB.1.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$projectNa...
PowerShellCorpus/Github/pt3r0nura_MyRepo/LessonProject/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/pt3r0nura_MyRepo/LessonProject/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/agaro1121_Powershell/uTorrentPostScript.ps1
uTorrentPostScript.ps1
param ( [string]$u = "", [string]$p = "", [string]$port = "" ) <######################### Iniitial Setup ######################### Step 1: uTorrent -> Options -> Preferences -> Advanced -> Web UI Enable Web UI create custom username/password Step 2: uTorrent -> Options -> Preferences -> Adva...
PowerShellCorpus/Github/emiLanghi_Practicos-Plataforma-de-Desarrollo-.NET/TP - Net/packages/jQuery.1.9.1/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/emiLanghi_Practicos-Plataforma-de-Desarrollo-.NET/TP - Net/packages/jQuery.1.9.1/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/emiLanghi_Practicos-Plataforma-de-Desarrollo-.NET/TP - Net/packages/jQuery.1.9.1/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/emiLanghi_Practicos-Plataforma-de-Desarrollo-.NET/TP - Net/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...
PowerShellCorpus/Github/emiLanghi_Practicos-Plataforma-de-Desarrollo-.NET/TP - Net/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/Sitecore_PowerShell-Script-Library/hardening/harden.ps1
harden.ps1
import-module WebAdministration $app_title = "Sitecore v6.5 Hardening Script" $version = 0.1 $a = (Get-Host).UI.RawUI $a.WindowTitle = "$app_title v" + $version $a.ForegroundColor = "yellow" $sites = dir IIS:\sites\* Set-Variable selectedSite "unknown" -scope global Set-Variable selectedSiteId 0 -scope glob...
PowerShellCorpus/Github/Sitecore_PowerShell-Script-Library/install/install.ps1
install.ps1
#parameters resolved via configuration: $scriptRoot = Split-Path (Resolve-Path $myInvocation.MyCommand.Path) [xml]$Config = get-content ($scriptRoot + "\install.config") $baseStorageUrl = $Config.InstallSettings.BaseStorageUrl #Download the versions meta data file $clnt = new-object System.Net.WebClient $clnt...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_LOGINUpdate.ps1
tests_LOGINUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "LOGIN_Update.jar" $ObjectName = "LOGIN.API.TST.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -check -te...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_StatisticsList.ps1
tests_StatisticsList.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "STATISTICS_List.jar" $ObjectName = "JAVA.API.SCRI.1" $FolderName = "API.TESTS.TARGET" AddToATestCaseSuiteFullWithKeywordChecks $JavaBin "-commit -fr_name '*'" 0 "" "Erro...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_VARA.Update.ps1
tests_VARA.Update.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "VARA_Update.jar" $ObjectNameSQL = "JAVA.API.VARA.SQL.GEN.1" $ObjectNameSECSQL = "JAVA.API.VARA.SECSQL.GEN.1" $ObjectNameSQLI = "JAVA.API.VARA.SQLI.GEN.1" $ObjectNameSECSQL...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_ObjectMove.ps1
tests_ObjectMove.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "OBJECTS_Move.jar" $ObjectName1 = "JAVA.API.SCRI.MOVE.1" $ObjectName2 = "JAVA.API.JOBS.MOVE.1" $ObjectName3 = "JAVA.API.JOBF.MOVE.1" $FolderNameSource = "API.TESTS.TARGET" ...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_ObjectRename.ps1
tests_ObjectRename.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "OBJECTS_Rename.jar" $ObjectName1 = "JAVA.API.SCRI.RENAME.1" $ObjectName1New = "JAVA.API.SCRI.RENAME.1.RENAMED" $ObjectName2 = "JAVA.API.JOBS.RENAME.1" $ObjectName3 = "JA...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_SYNCUpdate.ps1
tests_SYNCUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "SYNC_Update.jar" $ObjectName = "JAVA.API.SYN.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -check -te...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_JOBPUpdate.ps1
tests_JOBPUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "JOBP_Update.jar" $ObjectNameStd = "JAVA.API.JOBP.STD" $ObjectNameFE = "JAVA.API.JOBP.FE" $ObjectNameIF = "JAVA.API.JOBP.IF" $FolderName = "API.TESTS.TARGET" # Creating ...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/cli_lib.ps1
cli_lib.ps1
$JAVACMD = "java -jar" $AUTHPARAMS = "-C 100 -L ARA -D ARA -W ARA -H AETestHost" $BINREPO = "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-Repository" $Global:TestCaseArray = @() function AddToATestCaseSuiteFullWithKeywordChecks { $Binary = $args[0] $Cmd = $args[1] $Ret = $args[2] $Keyw...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_ObjectDelete.ps1
tests_ObjectDelete.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "OBjECTS_Delete.jar" AddToATestCaseSuiteFull $JavaBin "-commit -name 'JAVA.API.JOBS.JOBS_WIN.1' -folder 'API.TESTS.TARGET' -f_incsub" 0 AddToATestCaseSuiteFull $JavaBin "-c...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_USERGROUPUpdate.ps1
tests_USERGROUPUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "USERGRP_Update.jar" $ObjectName = "MYUSER.GRP.API/AUTOMIC" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_JOBSRAUpdate.ps1
tests_JOBSRAUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "JOBS_RA_Update.jar" $ObjectName = "JAVA.API.JOBS.RA.FTP.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_AgentManagement.ps1
tests_AgentManagement.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "AGENTS_Management.jar" AddToATestCaseSuiteFullWithKeywordChecks $JavaBin "-commit -f_name '.*' -f_title '.*' -f_type '.*' -f_category '.*'" 0 "" "Error" #AddToATestCas...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_VARA.SQLUpdate.ps1
tests_VARA.SQLUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "VARA_SQL_Update.jar" $ObjectNameSQL = "JAVA.API.VARA.SQL.1" $ObjectNameSECSQL = "JAVA.API.VARA.SECSQL.1" $ObjectNameSQLI = "JAVA.API.VARA.SQLI.1" $ObjectNameSECSQLI = "J...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_SCRIUpdate.ps1
tests_SCRIUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "SCRI_Update.jar" $ObjectName = "JAVA.API.SCRI.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -check -tem...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_ObjectDuplicate.ps1
tests_ObjectDuplicate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "OBJECTS_Duplicate.jar" $ObjectName = "JAVA.API.JOBF.TEST.ABC.1" $ObjectNameDup = "JAVA.API.JOBF.TEST.ABC.2" $FolderName = "API.TESTS.TARGET" # Creating an object AddTo...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_EVENTUpdate.ps1
tests_EVENTUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "EVENT_Update.jar" $ObjectNameEVNTCONS = "JAVA.API.EVNT.CONS.1" $ObjectNameEVNTDB = "JAVA.API.EVNT.DB.1" $ObjectNameEVNTFILE = "JAVA.API.EVNT.FILE.1" $ObjectNameEVNTTIME ...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_CALLUpdate.ps1
tests_CALLUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "CALL_Update.jar" $ObjectNameSTD = "JAVA.API.CALL.1" $ObjectNameMAIL = "JAVA.API.MAIL.1" $ObjectNameALARM = "JAVA.API.ALARM.1" $FolderName = "API.TESTS.TARGET" # Creatin...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/_RunAllTests.ps1
_RunAllTests.ps1
$QAPATH = "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests" . "$QAPATH\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $QAPATH Get-Childitem -Path $CurrentPath -Filter tests_*.ps1 | % { Write-Host "`n`n +++ Running: $($_.Name) +++" cd $QAPATH & .\$($_.Name) } cd $QAPATH
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_CALEUpdate.ps1
tests_CALEUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "CALE_Update.jar" $ObjectName = "JAVA.API.CALE.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -check -tem...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_STORAGEUpdate.ps1
tests_STORAGEUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "STORAGE_Update.jar" $ObjectName = "JAVA.API.STORE.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -chec...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_USERUpdate.ps1
tests_USERUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "USER_Update.jar" $ObjectName = "MYUSER.API/AUTOMIC" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -check -...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_CONNUpdate.ps1
tests_CONNUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "CONN_Update.jar" $ObjectNameSQL = "JAVA.API.CONN.SQL.1" $ObjectNameRA = "JAVA.API.CONN.FTP.1" $ObjectNameRESTV3 = "JAVA.API.CONN.RESTV3.1" $ObjectNameSOAPV3 = "JAVA.API....
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_JOBFUpdate.ps1
tests_JOBFUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "JOBF_Update.jar" $ObjectName = "JAVA.API.JOBF.TEST.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -check...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_VARA.STATICUpdate.ps1
tests_VARA.STATICUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "VARA_STATIC_Update.jar" $ObjectName = "JAVA.API.VARA.STATIC.GEN.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" ...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_TaskOperations.ps1
tests_TaskOperations.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "TASKS_Operations.jar" $ObjectName = "JAVA.API.SCRI.1" $FolderName = "API.TESTS.TARGET" AddToATestCaseSuiteFullWithKeywordChecks $JavaBin "-commit -fr_name '*'" 0 "" "Err...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_JOBSUpdate.ps1
tests_JOBSUpdate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "JOBS_Update.jar" $ObjectName = "JAVA.API.JOBS.RANDOM.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -che...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_ObjectExecute.ps1
tests_ObjectExecute.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "OBJECTS_Execute.jar" $ObjectName = "JAVA.API.SCRI.RUN.1" $FolderName = "API.TESTS.TARGET" # Creating an object AddToATestCaseSuiteFull "OBjECTS_Create.jar" "-commit -ch...
PowerShellCorpus/Github/brendanSapience_UC4-Automic-AE-CLI-Binary-QA-Tests/tests_ObjectCreate.ps1
tests_ObjectCreate.ps1
. "C:\Users\brend\Documents\git\work\UC4-Automic-AE-CLI-Binary-QA-Tests\cli_lib.ps1" $CurrentPath = $PSScriptRoot cd $BINREPO $JavaBin = "OBjECTS_Create.jar" AddToATestCaseSuiteFull $JavaBin '-commit -check -template "JOBS.WIN" -name "JAVA.API.JOBS.JOBS_WIN.1" -folder "API.TESTS.TARGET"' 0 AddToATestCaseSuit...
PowerShellCorpus/Github/foremann_Utilities/BuildLaptop.ps1
BuildLaptop.ps1
<#Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression #> #Restart shell once you run above and comment it out, continue script below mkdir c:\git mkdir c:\git\personal mkdir c:\git\collab mkdir c:\scripts mkdi...
PowerShellCorpus/Github/markwragg_Powershell-XKCD/psake.ps1
psake.ps1
# PSake makes variables declared here available in other scriptblocks # Init some things Properties { # Find the build folder based on build system $ProjectRoot = $ENV:BHProjectPath if(-not $ProjectRoot) { $ProjectRoot = $PSScriptRoot } $Verbose = @{} if($ENV:BHCommitMess...
PowerShellCorpus/Github/markwragg_Powershell-XKCD/deploy.psdeploy.ps1
deploy.psdeploy.ps1
# Generic module deployment. # This stuff should be moved to psake for a cleaner deployment view # ASSUMPTIONS: # folder structure of: # - RepoFolder # - This PSDeploy file # - ModuleName # - ModuleName.psd1 # Nuget key in $ENV:NugetApiKey # Set-BuildEnvironment from BuildHelpers module ...
PowerShellCorpus/Github/markwragg_Powershell-XKCD/build.ps1
build.ps1
function Resolve-Module { [Cmdletbinding()] param ( [Parameter(Mandatory)] [string[]]$Name ) Process { foreach ($ModuleName in $Name) { $Module = Get-Module -Name $ModuleName -ListAvailable Write-Verbose -Message "Resolving M...
PowerShellCorpus/Github/markwragg_Powershell-XKCD/xkcd/Public/Get-xkcd.ps1
Get-xkcd.ps1
Function Get-XKCD{ <# .SYNOPSIS Gets the details of the comics @ http://xkcd.com/. Optionally can download the comic images. .DESCRIPTION The Get-XKCD cmdlet gets the details of one or more comics from the XKCD API: https://xkcd.com/json.html. This includes title, number, image URL, alt text, day, month, y...
PowerShellCorpus/Github/markwragg_Powershell-XKCD/Tests/Default.Tests.ps1
Default.Tests.ps1
# PSScriptAnalyzer tests $Scripts = Get-ChildItem “$PSScriptRoot\..\” -Filter ‘*.ps1’ -Recurse | Where-Object {$_.name -NotMatch ‘tests.ps1’ -and $_.name -NotMatch 'build.ps1'} $Modules = Get-ChildItem “$PSScriptRoot\..\” -Filter ‘*.psm1’ -Recurse $Rules = Get-ScriptAnalyzerRule If ($Modules.count -gt 0) { D...
PowerShellCorpus/Github/markwragg_Powershell-XKCD/Tests/XKCD.tests.ps1
XKCD.tests.ps1
$moduleName = 'XKCD' $projectRoot = Resolve-Path "$PSScriptRoot\.." $moduleRoot = Split-Path (Resolve-Path "$projectRoot\$moduleName\$moduleName.psm1") Import-Module "$(Resolve-Path "$projectRoot\$moduleName\$moduleName.psm1")" Describe 'Unit Tests' { Context 'Parameter Input Tests' { It 'Get-...
PowerShellCorpus/Github/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/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...
PowerShellCorpus/Github/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/packages/EntityFramework.6.1.3/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Initialize-EFConfiguration $project Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' Write-Host Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma...
PowerShellCorpus/Github/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $compilerPackageName = 'Microsoft.Net.Compilers' $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $libDirectory = Join-Path $installPath 'lib\net45' $packageDirectory = Split-Path $installPath $compilerPackage = Get-Chil...
PowerShellCorpus/Github/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $roslynSubFolder = 'roslyn' if ($project -eq $null) { $project = Get-Project } $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory = Join-Path $projectRoot 'bin' $targetDirectory = Join-Path $binDirectory $roslynSubFolder if (Te...
PowerShellCorpus/Github/LiviuSosu_Aldebaran-Apps/RobotAPIs/RobotAPIs/packages/Newtonsoft.Json.6.0.4/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json" $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindow.Caption -eq "Package Manager Con...
PowerShellCorpus/Github/mcvic1rj_UsefulSnippets/Add-NetworkLocation.ps1
Add-NetworkLocation.ps1
function Add-NetworkLocation { param( [string]$name, [string]$targetPath ) # Get the basepath for network locations $shellApplication = New-Object -ComObject Shell.Application $nethoodPath = $shellApplication.Namespace(0x13).Self.Path # Only create if the local p...
PowerShellCorpus/Github/mcvic1rj_UsefulSnippets/Invoke-JenkinsAPI.ps1
Invoke-JenkinsAPI.ps1
$root = 'http://it-hdjenkins:8080/api/json' $user = "un" $pass= "api" $secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential($user, $secpasswd) $result = Invoke-RestMethod $root -Headers @{"Authorization" = "Basic "+[System.Convert]::ToBas...
PowerShellCorpus/Github/jrh0617_Canvas-to-SQL-Server-Powershell/terms.ps1
terms.ps1
Import-Module CanvasFunctions ### Set procedure variables $table_name = "CANVAS_terms" $server_name = "SETON-SQL3" $db_name = "canvas_sync" $api_key = "3925~lTUMZwIlZTksziBGPfzcyWgFD107hHGqs6CInmD9HTqsoaPmEdCIHygBw13XeQ4j" $headers = @{"Authorization"="Bearer "+$api_key} $account = 1 ### Initialize the SQL ...
PowerShellCorpus/Github/jrh0617_Canvas-to-SQL-Server-Powershell/enrollments.ps1
enrollments.ps1
Import-Module CanvasFunctions ### Set procedure variables $server_name = "SETON-SQL3" $db_name = "canvas_sync" $api_key = "3925~lTUMZwIlZTksziBGPfzcyWgFD107hHGqs6CInmD9HTqsoaPmEdCIHygBw13XeQ4j" $headers = @{"Authorization"="Bearer "+$api_key} ### Grab all the courses from database. Put it into $courses Imp...