full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/geeklearningio_gl-vsts-tasks-azure/Common/PowerShell3/VstsAzureHelpers/ImportFunctions.ps1 | ImportFunctions.ps1 | function Import-AzureModule {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[ValidateSet('Azure', 'AzureRM')]
[string[]]$PreferredModule)
Trace-VstsEnteringInvocation $MyInvocation
try {
Write-VstsTaskVerbose -Message "Env:PSModulePath: '$env:PSMODULEP... |
PowerShellCorpus/Github/geeklearningio_gl-vsts-tasks-azure/Common/PowerShell3/VstsAzureHelpers/InitializeFunctions.ps1 | InitializeFunctions.ps1 | function Add-Certificate {
[CmdletBinding()]
param([Parameter(Mandatory=$true)]$Endpoint)
# Add the certificate to the cert store.
$bytes = [System.Convert]::FromBase64String($Endpoint.Auth.Parameters.Certificate)
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Cer... |
PowerShellCorpus/Github/geeklearningio_gl-vsts-tasks-azure/Tests/PowerShell3/GeekLearning.VstsTasks.Azure.Tests/Run-Tests.ps1 | Run-Tests.ps1 | param(
[string]$SourceDir = $env:BUILD_SOURCESDIRECTORY,
[string]$TempDir = $env:TEMP
)
$ErrorActionPreference = "Stop"
$modulePath = Join-Path $TempDir Pester-master\Pester.psm1
if (-not(Test-Path $modulePath)) {
# Note: PSGet and chocolatey are not supported in hosted vsts build agent
... |
PowerShellCorpus/Github/geeklearningio_gl-vsts-tasks-azure/Tests/PowerShell3/GeekLearning.VstsTasks.Azure.Tests/SqlMultiDacpacDeployment.Tests.ps1 | SqlMultiDacpacDeployment.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here/Helpers.ps1"
$config = Get-TestsConfiguration -invocationCommandPath $MyInvocation.MyCommand.Path
Import-Module $config.taskLibPath -ArgumentList @{ NonInteractive = $true }
Describe "SqlMultiDacpacDeployment" {
Context "With correctly conf... |
PowerShellCorpus/Github/geeklearningio_gl-vsts-tasks-azure/Tests/PowerShell3/GeekLearning.VstsTasks.Azure.Tests/Helpers.ps1 | Helpers.ps1 | function Get-TestsConfiguration() {
param(
[Parameter(Mandatory=$true)][string]$invocationCommandPath
)
function ExtendJSON($base, $ext) {
$propNames = $($ext | Get-Member -MemberType *Property).Name
foreach ($propName in $propNames) {
if ($base.PSObject.Properties.Match($propName).Count) {
... |
PowerShellCorpus/Github/hyakuhei_ADCS-Notify/notify.ps1 | notify.ps1 | #Mail Message
$user = ""
$pass = ""
$from = "from@email"
$to = "to@email"
$subject "CA has outstanding certificate requests"
#SMTP Server
$server = "some.fqdn.here"
$port = 25
$timeout = 30000
function SendMail($msg){
$creds = New-Object System.Net.NetworkCredential($user,$pass)
$client = New-Obj... |
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_NewRepo_2017_4_26_17_47_17/.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/avitalb_DevLaunchScript/Interactive.ps1 | Interactive.ps1 | <#
.Synopsis
Sets up a Node.js Tools for Visual Studio development environment from this branch.
.Parameter code
[Optional] Launch instance of VS
.Parameter exp
[Optional] Update TS language service and launch experimental instance of VS
#>
[CmdletBinding()]
param(
[switch] $code,
... |
PowerShellCorpus/Github/tomansc_CS296N_Lab6Draft/packages/EntityFramework.6.0.0/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
# MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/tomansc_CS296N_Lab6Draft/packages/EntityFramework.6.0.0/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/tomansc_CS296N_Lab6Draft/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/tomansc_CS296N_Lab6Draft/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/tomansc_CS296N_Lab6Draft/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/tomansc_CS296N_Lab6Draft/packages/jQuery.2.2.0/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/tomansc_CS296N_Lab6Draft/packages/jQuery.2.2.0/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/tomansc_CS296N_Lab6Draft/packages/jQuery.2.2.0/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/tomansc_CS296N_Lab6Draft/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/tomansc_CS296N_Lab6Draft/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/packages/EntityFramework.6.0.0/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
# MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/packages/EntityFramework.6.0.0/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/packages/jQuery.2.2.0/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/packages/jQuery.2.2.0/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/packages/jQuery.2.2.0/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/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/tomansc_CS296N_Lab6Draft/CS296N_Lab6Draft/Toman296NLab6Draft/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/OPSTest_E2E_Provision_1488679541706/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.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 u... |
PowerShellCorpus/Github/aws-quickstart_quickstart-cicd-windows/demo-assets/DemoApp/SoccerTeamWeb/deletewebsite.ps1 | deletewebsite.ps1 | Import-Module WebAdministration
$iisAppPoolName = "soccerteamweb-app"
$iisAppName = "soccerteamweb"
#navigate to the sites root
cd IIS:\Sites\
#check if the site exists
if (Test-Path $iisAppName -pathType container)
{
Stop-WebSite $iisAppName
Remove-Website $iisAppName
}
#navigate to the app pools... |
PowerShellCorpus/Github/aws-quickstart_quickstart-cicd-windows/demo-assets/DemoApp/SoccerTeamWeb/installwebsite.ps1 | installwebsite.ps1 | Import-Module WebAdministration
$iisAppPoolName = "soccerteamweb-app"
$iisAppPoolDotNetVersion = "v4.0"
$iisAppName = "soccerteamweb"
$directoryPath = "C:\inetpub\wwwroot\soccerteamweb"
#stop the default web site so we can use port :80
Stop-WebSite 'Default Web Site'
#set the autostart property so we don't h... |
PowerShellCorpus/Github/aws-quickstart_quickstart-cicd-windows/scripts/New-ServerCertificateForELB.ps1 | New-ServerCertificateForELB.ps1 | [CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]$ServerCertificateName,
[Parameter(Mandatory=$true)]
[string]$RegionForELB
)
try {
$ErrorActionPreference = "Stop"
Start-Transcript -Path c:\cfn\log\New-ServerCertificateForELB.ps1.txt -Append
$ServerCertificate... |
PowerShellCorpus/Github/aws-quickstart_quickstart-cicd-windows/scripts/Install-DotNetBuildServer-Jenkins.ps1 | Install-DotNetBuildServer-Jenkins.ps1 | [CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]$JobName
)
try {
$ErrorActionPreference = "Stop"
Start-Transcript -Path c:\cfn\log\Install-DotNetBuildServer-Jenkins.ps1.txt -Append
Unblock-File -Path C:\cfn\downloads\jenkins.msi
$Arguments = "/q", "/l", "c:\cf... |
PowerShellCorpus/Github/aws-quickstart_quickstart-cicd-windows/scripts/Install-CodeDeploy.ps1 | Install-CodeDeploy.ps1 | try {
$ErrorActionPreference = "Stop"
Start-Transcript -Path c:\cfn\log\Install-CodeDeploy.ps1.txt -Append
Start-Process "C:\cfn\downloads\codedeploy-agent.msi" -ArgumentList '/quiet /l C:\cfn\log\host-agent-install-log.txt' -Wait
$codeDeployServiceName = "codedeployagent"
$codeDe... |
PowerShellCorpus/Github/aws-quickstart_quickstart-cicd-windows/scripts/Upload-FileToS3.ps1 | Upload-FileToS3.ps1 | [CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]$Source,
[Parameter(Mandatory=$true)]
[string]$Destination,
[Parameter(Mandatory=$false)]
[string]$ServerSideEncryptionMethod
)
function Get-S3BucketName {
param(
[Parameter(Mandatory=$true)]
[str... |
PowerShellCorpus/Github/jzachem_ServerQueryTool/iDRAC_PS_CIM_GUI.ps1 | iDRAC_PS_CIM_GUI.ps1 |
$session = 0
$session
# Quasi Manifest Constants
$MEDIATYPE_HDD = 0
$MEDIATYPE_SSD = 1
$BUSPROTOCOL_SATA = 5
$BUSPROTOCOL_SAS = 6
$BUSPROTOCOL_PCIe = 7
# End Quasi Manifest Constants
# Show the GUI or just stdout,stderr
$ShowGUI = 1 # 0 = No GUI, 1 = Show GUI
function CreateCIM... |
PowerShellCorpus/Github/Merhatt_TrueOrFalseOnline/TrueOrFalseOnline/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/Merhatt_TrueOrFalseOnline/TrueOrFalseOnline/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/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/JoinDomain.ps1 | JoinDomain.ps1 | Configuration JoinDomain
{
param
(
[string[]]$NodeName='localhost',
[Parameter(Mandatory)]
[string]$MachineName,
[Parameter(Mandatory)]
[string]$Domain,
[Parameter(Mandatory)]
[PSCredential]$Credential
)
#Import t... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/5.DependsOn/PWAConfig.ps1 | PWAConfig.ps1 | configuration PWA
{
param
(
# Target nodes to apply the configuration
[Parameter(Mandatory = $true)]
[string[]]$NodeName,
# Name of the website to create
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]$PSWASiteName,
... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/2.PullHTTPS/2.Config_HTTPSPullServer.ps1 | 2.Config_HTTPSPullServer.ps1 | configuration HTTPSPullServer
{
# Modules must exist on target pull server
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
Node s4
{
WindowsFeature DSCServiceFeature
{
Ensure = "Present"
Name = "DSC-Service"
}
WindowsFe... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/2.PullHTTPS/5.LCM_HTTPSPull.ps1 | 5.LCM_HTTPSPull.ps1 | [DSCLocalConfigurationManager()]
Configuration LCM_HTTPSPULL
{
param
(
[Parameter(Mandatory=$true)]
[string[]]$ComputerName,
[Parameter(Mandatory=$true)]
[string]$guid
)
Node $ComputerName {
Settings {
AllowModuleOv... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/1.LCM/1.LCM_Push_NewWay.ps1 | 1.LCM_Push_NewWay.ps1 | [DSCLocalConfigurationManager()]
Configuration LCMPUSH
{
Node $Computername
{
SEttings
{
AllowModuleOverwrite = $True
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Push'
}
}
}
$Computername = 's1','s2'
# Create the Computer.Meta.Mof in folder
LCMPush -OutputPa... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/1.LCM/1.LCM_Push_Oldway.ps1 | 1.LCM_Push_Oldway.ps1 | Configuration LCMPUSH
{
Node $Computername
{
LocalConfigurationManager
{
AllowModuleOverwrite = $True
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Push'
}
}
}
$Computername = 's1','s2'
# Create the Computer.Meta.Mof in folder
LCMPush -OutputPath c:\DSC\LCM
... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/1.Reset_LCM_Push.ps1 | 1.Reset_LCM_Push.ps1 | [DSCLocalConfigurationManager()]
Configuration LCM_Push
{
Node Target
{
Settings
{
AllowModuleOverwrite = $True
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Push'
}
}
}
LCM_Push -OutputPath C:\DSCSecureLCM
Set-DSCLocalCon... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/5.New_LCM_Push.ps1 | 5.New_LCM_Push.ps1 | [DSCLocalConfigurationManager()]
Configuration LCM_Push
{
Node Target
{
Settings
{
AllowModuleOverwrite = $True
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Push'
#CertificateID = ''
}
}
}
LCM_Push -OutputPath C:\DSCSecureLCM... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/3.Config_Credential.ps1 | 3.Config_Credential.ps1 |
$ConfigData = @{
AllNodes = @(
@{
NodeName='Target'
PSDscAllowPlainTextPassword=$True
}
)
}
Configuration DirTest {
param (
[pscredential]$credential
)
Node Target {
File DirTest1 {
DestinationPath = 'c:\DirTest'
... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/0.Demo.ps1 | 0.Demo.ps1 | # Reset Target computer to PULL for easier testing - works the same for Pull
ise C:\Scripts\DSCCamp\5.SecureCreds\1.Reset_LCM_Push.ps1
Get-DscLocalConfigurationManager -CimSession Target
Remove-DscConfigurationDocument -CimSession Target -Stage Current
# Credentials
ise C:\Scripts\DSCCamp\5.SecureCreds\2.config... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/2.config_Credentials.ps1 | 2.config_Credentials.ps1 | Configuration DirTest {
param (
[pscredential]$credential
)
Node Target {
File DirTest1 {
DestinationPath = 'c:\DirTest'
Type = 'Directory'
Ensure = 'Present'
Credential = $Credential
}
}
}
Dirtest -Credential... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/4.Config_Credential.ps1 | 4.Config_Credential.ps1 | $ConfigData = @{
AllNodes = @(
@{
NodeName='target'
CertificateFile = 'c:\cert\ClientAuth.cer'
#ThumbPrint = ''
}
)
}
Configuration DirTest {
param (
[pscredential]$credential
)
Node Target {
File DirTest1 {
... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/Old/2b.Config_credential.ps1 | 2b.Config_credential.ps1 | Configuration DirTest {
param (
[pscredential]$credential
)
Node S1 {
File DirTest1 {
DestinationPath = 'c:\DirTest'
Type = 'Directory'
Ensure = 'Present'
Credential = $Credential
}
}
}
Dirtest -Credential (Get-Credenti... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/Old/_M6-Demo.ps1 | _M6-Demo.ps1 | # 1.Parameterized configuration - REusable configurations
ise C:\Scripts\DSC1\Mod6\1.config_param.ps1
# 2. Credentials
ise C:\Scripts\DSC1\Mod6\2.config_Credentials.ps1 # Will Fail
ise C:\Scripts\dsc1\mod6\2a.config_data.psd1 # Configuration Data
ise C:\Scripts\dsc1\Mod6\2a.Config_credential.ps1
# Show it work... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/Old/2a.Config_credential.ps1 | 2a.Config_credential.ps1 | Configuration DirTest {
param (
[pscredential]$credential
)
Node S1 {
File DirTest1 {
DestinationPath = 'c:\DirTest'
Type = 'Directory'
Ensure = 'Present'
Credential = $Credential
}
}
}
Dirtest -Credential (Get-Credenti... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/3.Credentials/Old/2.config_Credentials.ps1 | 2.config_Credentials.ps1 | Configuration DirTest {
param (
[pscredential]$credential
)
Node S1 {
File DirTest1 {
DestinationPath = 'c:\DirTest'
Type = 'Directory'
Ensure = 'Present'
Credential = $Credential
}
}
}
Dirtest -Credential (Get-Credenti... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/4.Class Resources/cPSWAAuthorization/cPSWAAuthSetup.ps1 | cPSWAAuthSetup.ps1 | # Ise C:\pwa\cPSWAAuthorization\cPSWAAuthorization.psm1
New-ModuleManifest -Path C:\pwa\cPSWAAuthorization\cPSWAAuthorization.psd1 -RootModule cPSWAAuthorization.psm1 `
-Guid ([GUID]::NewGuid()) -ModuleVersion 1.0 -Author 'Jason Helmick' `
-Description 'PSWA Rule Authorization' -DscResourcesToExport 'cPSWA... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/4.Class Resources/cPSWAAuthorization/Examples/AuthOnly.ps1 | AuthOnly.ps1 | configuration Auth
{
param
(
# Target nodes to apply the configuration
[Parameter(Mandatory = $true)]
[string[]]$NodeName
)
# Import the module that defines custom resources
Import-DscResource -Module cPSWAAuthorization
Node $NodeName
... |
PowerShellCorpus/Github/PhillyPoSH_2016-08-Windows_PowerShell_DSC_Implementation_Best_Practices/4.Class Resources/cPSWAAuthorization/Examples/PSWASetup.ps1 | PSWASetup.ps1 | # Setup before demo
#Add DNS Zone and Record for DC
Add-DnsServerPrimaryZone -ComputerName DC -name Company.com -ReplicationScope Forest
Add-DnsServerResourceRecordA -ComputerName dc -name PSWA -ZoneName Company.com -IPv4Address 192.168.3.51
copy-item -path c:\pwa\* -Destination "\\DC\c$\Program Files\WindowsPo... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_4_24_10_58_22/.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/HyperMe1200_Ping-MultipleHosts/Ping-MultipleHosts.ps1 | Ping-MultipleHosts.ps1 | function Ping-MultipleHosts {
[cmdletbinding()]
param (
[parameter (Position = 0,
Mandatory = $True,
ParameterSetName = 'Comp',
ValueFromPipeline=$True)]
[Alias ('ComputerName','Name')]
[string[]]$Host... |
PowerShellCorpus/Github/tadgh_ProfileCleaner/src/ProfileCleaner.ps1 | ProfileCleaner.ps1 | #------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 2cb2f739-307e-423a-9cff-c5783412d1b5
# Source File: ..\Documents\SAPIEN\PowerShell Studio 2012\Projects\Profile Dumper\Profile Dumper.pfproj
#---------------------------------------------... |
PowerShellCorpus/Github/ZornitsaSerbezova_C-DB-Fundamentals/Databases Advanced - Entity Framework/IntroToEF/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/ZornitsaSerbezova_C-DB-Fundamentals/Databases Advanced - Entity Framework/IntroToEF/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/ZornitsaSerbezova_C-DB-Fundamentals/Databases Advanced - Entity Framework/CodeFirstOOP/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/ZornitsaSerbezova_C-DB-Fundamentals/Databases Advanced - Entity Framework/CodeFirstOOP/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/cons3rt_source-code-asset/scripts/install.ps1 | install.ps1 | # install.ps1
# Set the Error action preference when an exception is caught
$ErrorActionPreference = "Stop"
# Start a stopwatch to record asset run time
$stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
# Determine this script's parent directory
# For Powershell v2 use the following (default):
$scrip... |
PowerShellCorpus/Github/sampka_Get-ServerDNS/GetAllADDNS.ps1 | GetAllADDNS.ps1 |
$WindowsComputers = (Get-ADComputer -Filter {
(OperatingSystem -Like 'Windows*') -and (OperatingSystem -notlike '*Windows 10*')
}).Name|
Sort-Object
$ComputerCount = $WindowsComputers.count
"There are $ComputerCount computers to check"
$loop = 0
[STRING]$DNS = @()
foreach($Computer in $WindowsCo... |
PowerShellCorpus/Github/sampka_Get-ServerDNS/Get-ServerDNS.ps1 | Get-ServerDNS.ps1 | <#
.SYNOPSIS
Get-ServerDNS - Gathers DNS settings from computers.
.DESCRIPTION
This script gathers DNS settings from the specified computer(s)
.NOTES
File Name: Get-ServerDNS.ps1
Author: Karl Mitschke
Requires: Powershell V2
Created: 05/12/2010
Modified: 12/23/2011
.LINK
"ht... |
PowerShellCorpus/Github/Wintellect_Start-PowerShellPoint/Start-PowerShellPoint.ps1 | Start-PowerShellPoint.ps1 | #requires -version 2
# (c) 2010 by John Robbins\Wintellect – Do whatever you want to do with it
# as long as you give credit.
<#.SYNOPSIS
PowerShellPoint is the *only* way to do a presentation on PowerShell. All
PowerShell, all the time!
.DESCRIPTION
If you're doing a presentation on using PowerShell, t... |
PowerShellCorpus/Github/CincyPowerShell_AdvancedFunction/nofreespace.ps1 | nofreespace.ps1 |
#Turn this into an advanced function
# Part 1 - make things Variables turn them into parameters, and make it a working function you could share with your helpdesk
#This script returns a list of all the disks that have less thank 10% freespace from a computer
$disks = Get-WmiObject -ComputerName localhost -... |
PowerShellCorpus/Github/CincyPowerShell_AdvancedFunction/answer/get-freespace.ps1 | get-freespace.ps1 | Function {
Param (
[string]$Computername=localhost,
[int]$percentfree=10
)
$disks = Get-WmiObject -ComputerName $Computername -Class Win32_logicaldisk -Filter "Drivetype=3"
foreach ($disk in $disks){
$free = ($disk.FreeSpace/$disk.Size)*100
if ($free -ge $percentfree){
$OK = $true
}else... |
PowerShellCorpus/Github/jhoek_UncommonSense.Subtitles/Export-SubTitle.ps1 | Export-SubTitle.ps1 | function TimespanToSubsTime
{
Param
(
[Parameter(Mandatory)]
[System.TimeSpan]$TimeSpan
)
'{0:00}:{1:00}:{2:00},{3:000}' -f $TimeSpan.Hours, $TimeSpan.Minutes, $TimeSpan.Seconds, $TimeSpan.Milliseconds
}
<#
.Synopsis
Exports subtitle objects to text lines, ready f... |
PowerShellCorpus/Github/jhoek_UncommonSense.Subtitles/Update-SubTitle.ps1 | Update-SubTitle.ps1 | <#
.Synopsis
Updates subtitle objects by adding or subtracting the indicated amount of time from the start and stop times.
#>
function Update-SubTitle
{
[CmdletBinding()]
Param
(
[Parameter(Mandatory,ValueFromPipeLine)]
[PSObject]$SubTitle,
[int]$Hours,
... |
PowerShellCorpus/Github/jhoek_UncommonSense.Subtitles/Update-README.ps1 | Update-README.ps1 | . C:\users\jhoek\GitHub\Scripts\Get-HelpAsMarkDown.ps1
Set-Location C:\Users\jhoek\Documents\WindowsPowerShell\Modules\UncommonSense.Subtitles
Import-Module UncommonSense.Subtitles -Force
Get-Command `
-Module UncommonSense.Subtitles | `
Sort-Object -Property Noun,Verb | `
Get-HelpAsMarkDown `... |
PowerShellCorpus/Github/jhoek_UncommonSense.Subtitles/Add-SubtitlesToVideo.ps1 | Add-SubtitlesToVideo.ps1 | function Send-ItemToRecycleBin
{
Param
(
[Parameter(Mandatory)]
[string[]]$FileName
)
Add-Type -AssemblyName Microsoft.VisualBasic
$FileName | ForEach-Object {
if (Test-Path $_) {
[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile($_, 'OnlyErrorDi... |
PowerShellCorpus/Github/jhoek_UncommonSense.Subtitles/Import-SubTitle.ps1 | Import-SubTitle.ps1 | function SubsTimeToTimespan
{
Param
(
[Parameter(Mandatory)]
[string]$SubsTime
)
if ($SubsTime -notmatch '(\d\d):(\d\d):(\d\d),(\d\d\d)')
{
throw 'Not a valid timespan.'
}
$Hours = [int]$Matches[1]
$Minutes = [int]$Matches[2]
$Seconds = [int]$... |
PowerShellCorpus/Github/jhoek_UncommonSense.Subtitles/UncommonSense.SubTitles.Tests.ps1 | UncommonSense.SubTitles.Tests.ps1 | Import-Module UncommonSense.Subtitles -Force
Describe 'Import-SubTitle and Export-SubTitle' {
It 'Output of Export-SubTitle matches input of Import-SubTitle' {
$InputPath = Join-Path $PSScriptRoot 'input.srt'
$OutputPath = Join-Path $PSScriptRoot 'output.srt'
Get-Content -Path $Inpu... |
PowerShellCorpus/Github/metabrain_powershell-timelapse/timelapse.ps1 | timelapse.ps1 | ## Export-Screenshot to take a screenshot and save it to disk
#####################################################################################
## Usage:
## Export-Screenshot sshot.png
## Export-Screenshot screen.jpg (New-Object Drawing.Rectangle 0, 0, 640, 480)
## Start-TimeLapse "D:\Jogos\Football Manag... |
PowerShellCorpus/Github/metabrain_powershell-timelapse/WASP/Install.ps1 | Install.ps1 | if($PSVersionTable) {
Write-Host "You're running PowerShell $($PSVersionTable.PSVersion), so you don't need to Install this as a PSSnapin, you can use Import-Module (or Add-Module in CTP2) to load it. If you still want to install it as a PSSnapin, re-run this script with -Force"
if($args -notcontains "-Force")... |
PowerShellCorpus/Github/metabrain_powershell-timelapse/WASP/UnInstall.ps1 | UnInstall.ps1 | Remove-PSSnapin WASP
$rtd = [System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
set-alias installutil (resolve-path (join-path $rtd installutil.exe))
installutil /u (Join-Path (Split-Path $MyInvocation.MyCommand.Path) WASP.dll)
|
PowerShellCorpus/Github/SchneiderElectric-ConnectedHome_NuGetPublish/NuGetPublish.ps1 | NuGetPublish.ps1 | param (
[parameter(Mandatory=$true)]
[alias("p")]
[string]$ProjectFile,
[parameter(Mandatory=$true)]
[alias("n")]
[string]$ProjectName,
[alias("s")]
[string]$NugetSource = "https://www.nuget.org/api/v2/",
[alias("k")]
[string]$ApiKey = "",
[alias("c")]
[string... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_3_15_58_58/.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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/packages/Microsoft.AspNet.Providers.LocalDB.1.1/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-$project... |
PowerShellCorpus/Github/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/packages/EntityFramework.5.0.0/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/enelesmai_NET/SuperZapatos/packages/EntityFramework.5.0.0/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/enelesmai_NET/SuperZapatos/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/enelesmai_NET/SuperZapatos/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx |
PowerShellCorpus/Github/enelesmai_NET/SuperZapatos/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ... |
PowerShellCorpus/Github/enelesmai_NET/SuperZapatos/packages/jQuery.UI.Combined.1.8.24/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/sponte_Powershell.Deployment/build.ps1 | build.ps1 | if (!(Test-Path .\..\nuget)) {
New-Item -Path .\..\nuget -Type directory
}
.\NuGet.exe pack Powershell.Deployment.nuspec -OutputDirectory .\..\nuget
|
PowerShellCorpus/Github/sponte_Powershell.Deployment/tools/Install.ps1 | Install.ps1 | param($installPath, $toolsPath, $package, $project)
function Install-Item {
param(
$template,
$installPath,
$project
)
$deploymentFolder = $project.ProjectItems.Item("Deployment")
if($deploymentFolder -eq $null) {
throw "Deployment folder does not exist, aborting installation"
}
$ite... |
PowerShellCorpus/Github/sponte_Powershell.Deployment/templates/UpdateConfiguration.ps1 | UpdateConfiguration.ps1 | [CmdletBinding()]
param(
[string] $environmentConfigurationFilePath = (Join-Path (Split-Path -parent $MyInvocation.MyCommand.Definition) "deployment_configuration.json" ),
[string] $productConfigurationFilePath = (Join-Path (Split-Path -parent $MyInvocation.MyCommand.Definition) "configuration.xml" )
)
$script... |
PowerShellCorpus/Github/sponte_Powershell.Deployment/templates/start.ps1 | start.ps1 | [CmdletBinding()]
param(
[string] $environmentConfigurationFilePath = (Join-Path (Split-Path -parent $MyInvocation.MyCommand.Definition) "deployment_configuration.json" ),
[string] $productConfigurationFilePath = (Join-Path (Split-Path -parent $MyInvocation.MyCommand.Definition) "configuration.xml" )
)
$script... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.