full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xSSLSettings_RequireCert.ps1 | Sample_xSSLSettings_RequireCert.ps1 | configuration Sample_xSSLSetting_RequireCert
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration
Node $NodeName
{
xSSLSe... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xIisHandler_Remove32Bit.ps1 | Sample_xIisHandler_Remove32Bit.ps1 | configuration Sample_RemoveSome32BitHandlers
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $Nod... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xWebsite_WithSSLFlags.ps1 | Sample_xWebsite_WithSSLFlags.ps1 | configuration Sample_xWebsite_NewWebsite
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost',
# Name of the website to create
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String]$WebSiteName,
# Source P... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xWebsite_NewWebsiteFromConfigurationData.ps1 | Sample_xWebsite_NewWebsiteFromConfigurationData.ps1 | Configuration Sample_xWebsite_FromConfigurationData
{
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
# Dynamically find the applicable nodes from configuration data
Node $AllNodes.where{$_.Role -eq 'Web'}.NodeName
... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xIisServerDefaults.ps1 | Sample_xIisServerDefaults.ps1 | configuration Sample_IISServerDefaults
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $NodeName
... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xWebsite_NewWebsite.ps1 | Sample_xWebsite_NewWebsite.ps1 | configuration Sample_xWebsite_NewWebsite
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost',
# Name of the website to create
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String]$WebSiteName,
# Source P... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Examples/Sample_xWebsite_RemoveDefault.ps1 | Sample_xWebsite_RemoveDefault.ps1 | configuration Sample_xWebsite_StopDefault
{
param
(
# Target nodes to apply the configuration
[string[]]$NodeName = 'localhost'
)
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration, PSDesiredStateConfiguration
Node $NodeNa... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xSSLSettings.Tests.ps1 | MSFT_xSSLSettings.Tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xSSLSettings'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git')
... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xIISFeatureDelegation.tests.ps1 | MSFT_xIISFeatureDelegation.tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xIISFeatureDelegation'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tes... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xWebApplication.Tests.ps1 | MSFT_xWebApplication.Tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xWebApplication'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xIISHandler.tests.ps1 | MSFT_xIISHandler.tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xIISHandler'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git')
... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xWebsite.Tests.ps1 | MSFT_xWebsite.Tests.ps1 | $Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xWebsite'
#region HEADER
[String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests')))... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xWebAppPool.Tests.ps1 | MSFT_xWebAppPool.Tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xWebAppPool'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git')
... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Unit/MSFT_xWebVirtualDirectory.tests.ps1 | MSFT_xWebVirtualDirectory.tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xWebVirtualDirectory'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Test... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xIISFeatureDelegation.config.ps1 | MSFT_xIISFeatureDelegation.config.ps1 | configuration MSFT_xIISFeatureDelegation_AllowDelegation
{
Import-DscResource -ModuleName xWebAdministration
xIisFeatureDelegation AllowDelegation
{
SectionName = 'security/authentication/anonymousAuthentication'
OverrideMode = 'Allow'
}
}
configuration MSFT_xIISFeatureDeleg... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebsiteDefaults.config.ps1 | MSFT_xWebsiteDefaults.config.ps1 | [string] $originalValue = (Get-WebConfigurationProperty `
-PSPath 'MACHINE/WEBROOT/APPHOST' `
-Filter 'system.applicationHost/sites/virtualDirectoryDefaults' `
-Name 'allowSubDirConfig').Value
if ($originalValue -eq "true")
{
$env:PesterVirtualDirectoryDefaults = "false"
}
else
{
$env:Pe... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebAppPoolDefaults.Integration.Tests.ps1 | MSFT_xWebAppPoolDefaults.Integration.Tests.ps1 | $Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xWebAppPoolDefaults'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResour... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebAppPool.config.ps1 | MSFT_xWebAppPool.config.ps1 | $rules = @{
Name = 'PesterAppPool'
Ensure = 'Present'
state = 'Stopped'
autoStart = 'false'
managedRuntimeVersion = 'v2.0'
managedPipelineMode = 'Classic'
startMode ... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebsite.Integration.Tests.ps1 | MSFT_xWebsite.Integration.Tests.ps1 | $Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xWebsite'
#region HEADER
[String] $moduleRoot = Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))
if ( (-not (Test-Path -Path (Join-Path -Path $moduleRoot -ChildPath 'DSCResource.Tests')))... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xIISHandler.config.ps1 | MSFT_xIISHandler.config.ps1 | configuration MSFT_xIISHandler_RemoveHandler
{
Import-DscResource -ModuleName xWebAdministration
xIisHandler TRACEVerbHandler
{
Name = 'TRACEVerbHandler'
Ensure = 'Absent'
}
}
configuration MSFT_xIISHandler_AddHandler
{
Import-DscResource -ModuleName xWebAdministration... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebsite.config.ps1 | MSFT_xWebsite.config.ps1 | configuration MSFT_xWebsite_Config
{
Import-DscResource -ModuleName xWebAdministration
xWebsite WebBindingInfo
{
Name = 'foobar'
Ensure = 'absent'
PhysicalPath = "$env:temp\WebBindingInfo"
}
}
|
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebsiteDefaults.Integration.Tests.ps1 | MSFT_xWebsiteDefaults.Integration.Tests.ps1 | $Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xWebsiteDefaults'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests.gi... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebAppPool.Integration.tests.ps1 | MSFT_xWebAppPool.Integration.tests.ps1 | <#
.Synopsis
Template for creating DSC Resource Integration Tests
.DESCRIPTION
To Use:
1. Copy to \Tests\Integration\ folder and rename MSFT_x<ResourceName>.Integration.tests.ps1
2. Customize TODO sections.
3. Create test DSC Configurtion file MSFT_x<ResourceName>.config.ps1 from integration... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xWebAppPoolDefaults.config.ps1 | MSFT_xWebAppPoolDefaults.config.ps1 | [string] $constPsPath = 'MACHINE/WEBROOT/APPHOST'
[string] $constAPDFilter = 'system.applicationHost/applicationPools/applicationPoolDefaults'
[string] $constSiteFilter = 'system.applicationHost/sites/'
[string] $originalValue = (Get-WebConfigurationProperty -pspath $constPsPath -filter $constAPDFilter -name manag... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xIISFeatureDelegation.Integration.Tests.ps1 | MSFT_xIISFeatureDelegation.Integration.Tests.ps1 | $global:DSCModuleName = 'xWebAdministration'
$global:DSCResourceName = 'MSFT_xIISFeatureDelegation'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tes... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xIISMimeTypeMapping.config.ps1 | MSFT_xIISMimeTypeMapping.config.ps1 | configuration MSFT_xIISMimeTypeMapping_Config
{
Import-DscResource -ModuleName xWebAdministration
xIIsMimeTypeMapping AddMimeType
{
Extension = '.PesterDummy'
MimeType = 'text/plain'
Ensure = 'Present'
}
}
configuration MSFT_xIISMimeTypeMapping_AddMimeType
{
I... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xIISHandler.Integration.Tests.ps1 | MSFT_xIISHandler.Integration.Tests.ps1 | $Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xIISHandler'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResource.Tests... |
PowerShellCorpus/Github/theJasonHelmick_ITEdge/DSC/xWebAdministration/1.9.0.0/Tests/Integration/MSFT_xIISMimeTypeMapping.Integration.Tests.ps1 | MSFT_xIISMimeTypeMapping.Integration.Tests.ps1 | $Global:DSCModuleName = 'xWebAdministration'
$Global:DSCResourceName = 'MSFT_xIISMimeTypeMapping'
#region HEADER
if ( (-not (Test-Path -Path '.\DSCResource.Tests\')) -or `
(-not (Test-Path -Path '.\DSCResource.Tests\TestHelper.psm1')) )
{
& git @('clone','https://github.com/PowerShell/DscResour... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/echo.ps1 | echo.ps1 | [CmdletBinding()]
param()
Trace-VstsEnteringInvocation $MyInvocation
try {
#Read message and log it.
$echovar = Get-VstsInput -Name echovar
Write-Host ("$echovar")
} finally {
Trace-VstsLeavingInvocation $MyInvocation
}
|
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 | LongPathFunctions.ps1 | ########################################
# Private functions.
########################################
function ConvertFrom-LongFormPath {
[CmdletBinding()]
param([string]$Path)
if ($Path) {
if ($Path.StartsWith('\\?\UNC')) {
# E.g. \\?\UNC\server\share -> \\server\share
... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/OutFunctions.ps1 | OutFunctions.ps1 | # TODO: It would be better if the Out-Default function resolved the underlying Out-Default
# command in the begin block. This would allow for supporting other modules that override
# Out-Default.
$script:outDefaultCmdlet = $ExecutionContext.InvokeCommand.GetCmdlet("Microsoft.PowerShell.Core\Out-Default")
########... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 | ServerOMFunctions.ps1 | <#
.SYNOPSIS
Gets a credentials object that can be used with the TFS extended client SDK.
.DESCRIPTION
The agent job token is used to construct the credentials object. The identity associated with the token depends on the scope selected in the build/release definition (either the project collection build/release ... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/FindFunctions.ps1 | FindFunctions.ps1 | <#
.SYNOPSIS
Finds files or directories.
.DESCRIPTION
Finds files or directories using advanced pattern matching.
.PARAMETER LiteralDirectory
Directory to search.
.PARAMETER LegacyPattern
Proprietary pattern format. The LiteralDirectory parameter is used to root any unrooted patterns.
Separate multiple... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 | LocalizationFunctions.ps1 | $script:resourceStrings = @{ }
<#
.SYNOPSIS
Gets a localized resource string.
.DESCRIPTION
Gets a localized resource string and optionally formats the string with arguments.
If the format fails (due to a bad format string or incorrect expected arguments in the format string), then the format string is retur... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/InputFunctions.ps1 | InputFunctions.ps1 | $script:secureInputs = @{ }
<#
.SYNOPSIS
Gets an endpoint.
.DESCRIPTION
Gets an endpoint object for the specified endpoint name. The endpoint is returned as an object with three properties: Auth, Data, and Url.
The Data property requires a 1.97 agent or higher.
.PARAMETER Require
Writes an error to the ... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/TraceFunctions.ps1 | TraceFunctions.ps1 | <#
.SYNOPSIS
Writes verbose information about the invocation being entered.
.DESCRIPTION
Used to trace verbose information when entering a function/script. Writes an entering message followed by a short description of the invocation. Additionally each bound parameter and unbound argument is also traced.
.PARAM... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 | LoggingCommandFunctions.ps1 | $script:loggingCommandPrefix = '##vso['
$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"?
New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }
New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' }
New-Object psobject -Property @{ Token = "`... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/Echo/ps_modules/VstsTaskSdk/ToolFunctions.ps1 | ToolFunctions.ps1 | <#
.SYNOPSIS
Asserts that a path exists. Throws if the path does not exist.
.PARAMETER PassThru
True to return the path.
#>
function Assert-Path {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$LiteralPath,
[Microsoft.PowerShell.Commands.TestPathType]$PathT... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/getassembly.ps1 | getassembly.ps1 | [CmdletBinding()]
param()
# This script opens a specific file selected from the Source Control Explorer, then finds a
# specific section and reads the semantic versioning from it.
# The section is expected in the following form:
# [assembly: SectionName("Major.minor.patch.build")]
Trace-VstsEnteringInvoc... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 | LongPathFunctions.ps1 | ########################################
# Private functions.
########################################
function ConvertFrom-LongFormPath {
[CmdletBinding()]
param([string]$Path)
if ($Path) {
if ($Path.StartsWith('\\?\UNC')) {
# E.g. \\?\UNC\server\share -> \\server\share
... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/OutFunctions.ps1 | OutFunctions.ps1 | # TODO: It would be better if the Out-Default function resolved the underlying Out-Default
# command in the begin block. This would allow for supporting other modules that override
# Out-Default.
$script:outDefaultCmdlet = $ExecutionContext.InvokeCommand.GetCmdlet("Microsoft.PowerShell.Core\Out-Default")
########... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 | ServerOMFunctions.ps1 | <#
.SYNOPSIS
Gets a credentials object that can be used with the TFS extended client SDK.
.DESCRIPTION
The agent job token is used to construct the credentials object. The identity associated with the token depends on the scope selected in the build/release definition (either the project collection build/release ... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/FindFunctions.ps1 | FindFunctions.ps1 | <#
.SYNOPSIS
Finds files or directories.
.DESCRIPTION
Finds files or directories using advanced pattern matching.
.PARAMETER LiteralDirectory
Directory to search.
.PARAMETER LegacyPattern
Proprietary pattern format. The LiteralDirectory parameter is used to root any unrooted patterns.
Separate multiple... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 | LocalizationFunctions.ps1 | $script:resourceStrings = @{ }
<#
.SYNOPSIS
Gets a localized resource string.
.DESCRIPTION
Gets a localized resource string and optionally formats the string with arguments.
If the format fails (due to a bad format string or incorrect expected arguments in the format string), then the format string is retur... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/InputFunctions.ps1 | InputFunctions.ps1 | $script:secureInputs = @{ }
<#
.SYNOPSIS
Gets an endpoint.
.DESCRIPTION
Gets an endpoint object for the specified endpoint name. The endpoint is returned as an object with three properties: Auth, Data, and Url.
The Data property requires a 1.97 agent or higher.
.PARAMETER Require
Writes an error to the ... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/TraceFunctions.ps1 | TraceFunctions.ps1 | <#
.SYNOPSIS
Writes verbose information about the invocation being entered.
.DESCRIPTION
Used to trace verbose information when entering a function/script. Writes an entering message followed by a short description of the invocation. Additionally each bound parameter and unbound argument is also traced.
.PARAM... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 | LoggingCommandFunctions.ps1 | $script:loggingCommandPrefix = '##vso['
$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"?
New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }
New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' }
New-Object psobject -Property @{ Token = "`... |
PowerShellCorpus/Github/AlvaroGCachon_TFS2015CustomTasks/GetAssembly/ps_modules/VstsTaskSdk/ToolFunctions.ps1 | ToolFunctions.ps1 | <#
.SYNOPSIS
Asserts that a path exists. Throws if the path does not exist.
.PARAMETER PassThru
True to return the path.
#>
function Assert-Path {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$LiteralPath,
[Microsoft.PowerShell.Commands.TestPathType]$PathT... |
PowerShellCorpus/Github/silverl_boxstarter/workstation-bootstrap.ps1 | workstation-bootstrap.ps1 | Set-ExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtension
Install-WindowsUpdate -acceptEula
Update-ExecutionPolicy RemoteSigned
Enable-RemoteDesktop
Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Server -All
cinst 7zip
cinst adb
cinst autohotkey
c... |
PowerShellCorpus/Github/vmwaredevcenter-stage_prepare_vra_template.ps1-7.0.1/snippet.ps1 | snippet.ps1 | #==============================================
# Generated On: 08/03/2016
# Generated By: Gary Coburn
# Automation Specialist
# Organization: VMware
# Twitter: @coburnGary
# Install bootstrap, java, and gugent
#==============================================
#----------------------------------------------
#===... |
PowerShellCorpus/Github/kedonov_VPRepoTesting_fr-BE/.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 ur... |
PowerShellCorpus/Github/rakravmca_TLRManagement/SampleWebsite/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/rakravmca_TLRManagement/SampleWebsite/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_1485648342669/.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/par-texx_RebootSGCS/RestartSGCS.ps1 | RestartSGCS.ps1 | <#
.NAME
Restart SGCS
.SYNOPSIS
Restarts the SGCS service.
.DESCRIPTION
This script requests the service ticket number for the reboot, the performs a stop/start of the LS Gate Control Service.
.PARAMETER
-Debug
.EXAMPLE
RestartSGCS.ps1
.EXAMPLE
RestartSGCS.ps1 -Debug
#>
[CmdletBinding()]
... |
PowerShellCorpus/Github/tasgray_TelstraCheck/TelstraCheck.ps1 | TelstraCheck.ps1 | # --------------------------------------------------------------
#
# TelstraCheck.ps1
#
# --------------------------------------------------------------
#
# Using delegated administrator credentials, checks each
# tenant and determines if syndicated with Telstra. Results
# are displayed in a gridview for easy ... |
PowerShellCorpus/Github/OPSTest_E2E_Provision_1488661540042/.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/Skatterbrainz_cm_healthcheck/Export-CM-Healthcheck.ps1 | Export-CM-Healthcheck.ps1 | #requires -version 4
<#
.SYNOPSIS
Export-CM-Healthcheck.ps1 reads the output from Get-CM-Inventory.ps1 to generate a
final report using Microsoft Word (2010, 2013, 2016)
.DESCRIPTION
Export-CM-Healthcheck.ps1 reads the output from Get-CM-Inventory.ps1 to generate a
final report using Microsoft ... |
PowerShellCorpus/Github/Skatterbrainz_cm_healthcheck/Get-CM-Inventory.ps1 | Get-CM-Inventory.ps1 | #requires -RunAsAdministrator
#requires -version 4
<#
.SYNOPSIS
Get-CM-Inventory.ps1 collects SCCM hierarchy and site server data
.DESCRIPTION
Get-CM-Inventory.ps1 collects SCCM hierarchy and site server data
and stores the information in multiple XML data files which are then
processed using ... |
PowerShellCorpus/Github/reallyspeed_posh/client.ps1 | client.ps1 | [CmdletBinding()]
param(
[string]$serverip="127.0.0.1",
[int]$port=15000
)
function send-msg ($message, $port, $server) {
# Create IP Endpoint
#$endpoint = New-Object System.Net.IPEndPoint $address, $port
# Create Socket
write-host connecting to $server`:$port
$endpoint = new-object System.Net.I... |
PowerShellCorpus/Github/reallyspeed_posh/server.ps1 | server.ps1 | [CmdletBinding()]
param(
[int]$port=15000
)
$Global:clients = [hashtable]::Synchronized(@{})
$Global:client_threads = [hashtable]::Synchronized(@{})
$Global:remove_client_queue = [System.Collections.Queue]::Synchronized((New-Object System.collections.queue))
$Global:message_queue = [System.Collections.Queue... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/IntegrationTests.PowerOnRun2.ps1 | IntegrationTests.PowerOnRun2.ps1 | Param
(
[Parameter(Position=0, Mandatory=$true)][System.Collections.ArrayList]$FilesToTest, #InTestVSVersionMajor, ExeToRunForTests, fileToTest
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)]$VmName,
[Parameter(Position=0)]$CountOfMachinesToStart ... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/IntegrationTests.CopyLogs.ps1 | IntegrationTests.CopyLogs.ps1 | Param
(
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)][String[]]$ViServerData,
[Parameter(Position=0, Mandatory=$true)][String[]]$GuestCredentials,
[Parameter(Position=0)]$ArtifactsDir
)
<#ScriptPrologue#> Set-StrictMode -Version Latest; $Err... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/IntegrationTests.PowerOnRun.ps1 | IntegrationTests.PowerOnRun.ps1 | Param
(
[Parameter(Position=0, Mandatory=$true)][String[]]$FilesToTest,
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)]$VmName,
[Parameter(Position=0)]$CountOfMachinesToStart = 1,
[Parameter(Position=0)]$NUnitIncludeCategory = "", # Empty by ... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/IntegrationTests.ps1 | IntegrationTests.ps1 | Param
(
[Parameter(Position=0)]$NUnitCpu = $null, # Inherit from current runtime by default
[Parameter(Position=0)]$NUnitRuntime = $null, # Inherit from current runtime by default
[Parameter(Position=0, Mandatory=$true)][System.Collections.ArrayList]$FilesToTest, #InTestVSVersionMajor, ExeToRunFo... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/IntegrationTests.PowerOff.ps1 | IntegrationTests.PowerOff.ps1 | Param
(
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)][String[]]$ViServerData #"server_adress", "login", "pass"
)
<#ScriptPrologue#> Set-StrictMode -Version Latest; $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
functio... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/PowerOn.ps1 | PowerOn.ps1 | Param
(
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)]$VmName,
[Parameter(Position=0, Mandatory=$true)][String[]]$ViServerData,
[Parameter(Position=0)]$CountOfMachinesToStart=1
)
<#ScriptPrologue#> Set-StrictMode -Version Latest; $ErrorAction... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/RunTests.ps1 | RunTests.ps1 | Param
(
[Parameter(Position=0)]$NUnitCpu = $null, # Inherit from current runtime by default
[Parameter(Position=0)]$NUnitRuntime = $null, # Inherit from current runtime by default
[Parameter(Position=0)]$NUnitIncludeCategory = "", # Empty by default. Use "," separator to provide several categories
... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/VirtualEnvironment.ps1 | VirtualEnvironment.ps1 | param
(
[Parameter(Position=0, Mandatory=$true)]$VmName,
[Parameter(Position=0, Mandatory=$true)]$cloneName,
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)]$ViServerAddress,
[Parameter(Position=0, Mandatory=$true)]$ViServerLogin,
[Param... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/CloneStartVM.ps1 | CloneStartVM.ps1 | # TODO: TC start build when host has enough free memory. No immediate need for implementing this, since we can reduce agents quantity to meet worst scenario
# Requires PowerCLI installed
# https://my.vmware.com/web/vmware/details?productId=285&downloadGroup=VSP510-PCLI-510
#get-vmhost | get-member -MemberType proper... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/StopDeleteVM.ps1 | StopDeleteVM.ps1 | param
(
[Parameter(Position=0, Mandatory=$true)]$cloneNamePattern,
[Parameter(Position=0, Mandatory=$true)][String[]]$ViServerData #"server_adress", "login", "pass"
)
<#ScriptPrologue#> Set-StrictMode -Version Latest; $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
functi... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/ViServer.Connect.ps1 | ViServer.Connect.ps1 | param
(
[Parameter(Position=0, Mandatory=$true)]$ViServerAddress,
[Parameter(Position=0, Mandatory=$true)]$ViServerLogin,
[Parameter(Position=0, Mandatory=$true)]$ViServerPasword
)
<#ScriptPrologue#> Set-StrictMode -Version Latest; $ErrorActionPreference = [System.Management.Automation.ActionPrefer... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/build/TestProduct/Impl/InTest/GetAssembliesToTest.ps1 | GetAssembliesToTest.ps1 | Param
(
#[Parameter(Position=0)]$ApplicationDescriptorAssembly = "JetBrains.${ProductName}.${ProductName}Product", #"JetBrains.ReSharper.Product.VisualStudio.Core", # JetBrains.dotTrace.VS , JetBrains.dotCover.VisualStudio
[Parameter(Position=0)]$ProductBinariesDir="C:\Work\TeamCity-extensions\Platform\lib"
... |
PowerShellCorpus/Github/JetBrains_integration-tests-vm-scripts/Platform/Tools/PowerShell/JetCmdlet/Load-JetCmdlet.ps1 | Load-JetCmdlet.ps1 | # Loads the JetCmdlet module with our cmdlets
# TODO: bootstrap by compiling the module on-demand
<#ScriptPrologue#> Set-StrictMode -Version Latest; $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
$DllRelpath = "bin/Debug/JetCmdlet.dll"
# Rootdir of the cmdlet project — one with t... |
PowerShellCorpus/Github/DuFace_PoShWarp/PoShWarp.Tests.ps1 | PoShWarp.Tests.ps1 | ##
## Unit tests for the PoShWarp PowerShell module.
## URL: https://github.com/DuFace/PoShWarp
## Copyright (c) 2014 Kier Dugan
##
## Prerequisite modules --------------------------------------------------------
Import-Module .\PoShWarp.psm1 -Force
## Enviroment setup -------------------------------------... |
PowerShellCorpus/Github/icequ60914_AzurePowerShell/ADEPrereqScript.ps1 | ADEPrereqScript.ps1 | # Notes: The original version is here: https://github.com/Azure/azure-powershell/blob/dev/src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/Scripts/AzureDiskEncryptionPreRequisiteSetup.ps1
# Ching-Yi Lin modified the login method (2017/3)
Param(
[Parameter(Mandatory = $true,
... |
PowerShellCorpus/Github/icequ60914_AzurePowerShell/updateVMSize.ps1 | updateVMSize.ps1 | # Purpose: Update a VM Size
# Date: 2016/11/26
# Connect the Azure subscription with tenant ID
$yourAssociatedSubscriptionTenantId = 'your tenant id'
$yourSubscriptionName = 'your subscription'
$selectSubscription = Get-AzureRmSubscription -SubscriptionName $yourSubscriptionName -TenantId $yourAssociatedSubscrip... |
PowerShellCorpus/Github/icequ60914_AzurePowerShell/addNICtoVM.ps1 | addNICtoVM.ps1 | # Purpose: Add a NIC to an Azure VM
# Date: 2016/11/26
# Notes:
# Virtual machines with multiple network interfaces and virtual machines with a single network interface
# are not supported in the same availability set, also a virtual machine having a single network interface
# cannot be updated to have multiple... |
PowerShellCorpus/Github/tarwn_AutomatedDBDeploymentTalk/Demo1/ApplyDatabaseUpdates.ps1 | ApplyDatabaseUpdates.ps1 |
param (
[parameter(Mandatory=$true)]
[string]
$UpdatesFile,
[parameter(Mandatory=$true)]
[string]
$Server,
[parameter(Mandatory=$true)]
[string]
$Database,
[string]
$AdminUserName,
[string]
$AdminPassword,
[switch]
$Trusted
)
$ErrorActionP... |
PowerShellCorpus/Github/tarwn_AutomatedDBDeploymentTalk/Demo1/CreateDatabaseUpdates.ps1 | CreateDatabaseUpdates.ps1 |
param (
[parameter(Mandatory=$true)]
[string]
$UpdatesFolder,
[parameter(Mandatory=$true)]
[string]
$UpdatesFile
)
$ErrorActionPreference = "Stop"
try{
$path = (Get-Location).Path
#database updates
$outputPath = "$path\$UpdatesFile"
$stream = [System.IO.Strea... |
PowerShellCorpus/Github/tarwn_AutomatedDBDeploymentTalk/Demo2/SetMaintenanceMode.ps1 | SetMaintenanceMode.ps1 |
param (
[parameter(Mandatory=$true)]
[string]
$Notes,
[parameter(Mandatory=$true)]
[string]
$Server,
[parameter(Mandatory=$true)]
[string]
$Database,
[parameter(Mandatory=$true)]
[string]
$AdminUserName,
[parameter(Mandatory=$true)]
[string]
$... |
PowerShellCorpus/Github/tarwn_AutomatedDBDeploymentTalk/Demo3/SqlRestore.ps1 | SqlRestore.ps1 |
param (
[parameter(Mandatory=$true)]
[string]
$Server,
[parameter(Mandatory=$true)]
[string]
$Database,
[parameter(Mandatory=$true)]
[string]
$AdminUserName,
[parameter(Mandatory=$true)]
[string]
$AdminPassword,
[parameter(Mandatory=$true)]
[string... |
PowerShellCorpus/Github/tech-at-agoda_meetup-2017-05-13/CreateUserAccountsS3AndCDNThenSendEmail.ps1 | CreateUserAccountsS3AndCDNThenSendEmail.ps1 | $TCUser="techatagoda"
$TCPassword="xxx"
$S3Region="ap-southeast-1"
$S3AccessKey="zzz"
$S3SecretKey="yyy"
$baseUri = "http://octopus01.southeastasia.cloudapp.azure.com"
$apiKey = "API-aaa"
$TeamCityServerUrl="http://teamcity01.southeastasia.cloudapp.azure.com"
#========================
Import-Module "C:\Pro... |
PowerShellCorpus/Github/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/asterixorobelix_cSharp/PersonalWebsiteRedo/PersonalWebsite/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1 | install.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'
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory... |
PowerShellCorpus/Github/baileye_vmFromSpecializedVHD/create.ps1 | create.ps1 | # We'll use a couple of variable here, fill these with your own values
$subscriptionId = '' # Your SubscriptionId
$storageAccountName = '' # Storage account name where your custom image is and where your VM vhd will go
$sourceImageUri = '' # custom VM image blob uri, ex: 'https://vmcapturetest.blob.core.windows.net... |
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_1489413938258/.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/diablomnky_scripts/Powershell/SharedMailboxPermissions.ps1 | SharedMailboxPermissions.ps1 | $users = import-csv %USERPROFILE%\UserMailboxes.csv
foreach($alias in $users)
{
Get-Mailbox $alias.user | Get-MailboxPermission | where {($_.IsInherited -eq $false) -and ($_.user.tostring() -ne $alias.user) -and ($_.user.tostring() -ne "NT AUTHORITY\SELF")}| Select Identity,User | Export-Csv -NoTypeInformation -... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/UninstallPrograms.ps1 | UninstallPrograms.ps1 | # Uninstall applications via powershell
$programs = @(<arrayOfPrograms>)
foreach ($program in $programs)
{
$app = Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name = $program"
$app.Uninstall()
} |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/ServerRemediation.ps1 | ServerRemediation.ps1 | # Edit this variable to the user account to be used to connect to the servers
$userAcct = <domainAdmin>
# Edit the FilePath to the actual location of the remediation scripts
$updateScript = <\path\to\file>
# Path to list of unreachable servers
$manualServers = <\path\to\file>
$SecureString = Read-Host -AsSecureSt... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/CustomerMailboxReport-byOU.ps1 | CustomerMailboxReport-byOU.ps1 | #Created by Sean Kallapos
#Serial: 20141223-00
#
#Import All Modules
Import-Module *
#
#Initiate Report
#
$choice = Read-Host 'Run report for one client (1), all clients with individual reports (2), or all clients as one report (3)'
switch($choice)
{
#Runs Report for one client
1{
$orgUnit = Read-Host ... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/Get-MbxDB.ps1 | Get-MbxDB.ps1 | # Location of the CSV of users that failed to migrate to O365
$file = <\path\to\file>
# Get database location of each mailbox in $file
Import-Csv $file | ForEach{Get-Mailbox -Identity $_.EmailAddress | Select PrimarySmtpAddress, Database} | Export-Csv Databases.csv |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.