full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_2017_3_23_13_17_28/.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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/Helpers.ps1
Helpers.ps1
function CreateXmlTransformableObjectFromXmlFile($xmlFile, $vsVersion) { $dllPath = "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v"+$vsVersion+"\Web\Microsoft.Web.XmlTransform.dll" Write-Verbose "dllPath for Microsoft.Web.XmlTransform.dll : $dllPath" Add-Type -LiteralPath $dllPath $xmlobj...
PowerShellCorpus/Github/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/transformConfig.ps1
transformConfig.ps1
param ( [string][Parameter(Mandatory=$true)]$webConfigRelativePath, [string][Parameter(Mandatory=$true)]$outPutRelativePath, [string][Parameter(Mandatory=$true)]$vsVersion, [string][Parameter(Mandatory=$true)]$cleanOutput ) . "$PSScriptRoot\Helpers.ps1" $buildConfiguration = ...
PowerShellCorpus/Github/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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. .PARAMETER Require Writes an error to the error pipeline if the endpoint is not found. #> func...
PowerShellCorpus/Github/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/mikaelkrief_vsts-extension-XmlTransform/XmlTransform-Extension/ExternalConfigurationFileTransformer/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/rudibroekhuizen_oracle/export.ps1
export.ps1
[Environment]::SetEnvironmentVariable("ORACLE_SID", $args[0], "Process") #[Environment]::SetEnvironmentVariable("NLS_LANG", "AMERICAN_AMERICAN.AL32UTF8", "Process") foreach ($arg in $args) { write-host $arg } Function Export { Param ( $Date = (Get-Date -Format yyyyMM...
PowerShellCorpus/Github/L3Z4_Optimiser-l-utilisation-d-un-VM-Azure-en-tant-que-machine-de-build/ConsoleApplication/PublishScripts/Publish-WebApplicationWebsite.ps1
Publish-WebApplicationWebsite.ps1
#Requires -Version 3.0 <# .SYNOPSIS Crée et déploie un site web Microsoft Azure pour un projet web Visual Studio. Pour plus de détails visitez le site à l'adresse suivante : http://go.microsoft.com/fwlink/?LinkID=394471 .EXAMPLE PS C:\> .\Publish-WebApplicationWebSite.ps1 ` -Configuration .\Configurations\W...
PowerShellCorpus/Github/XxDeadLiiNexX_Powershell-Scripts/Import-Certificat/Import-Certificat.ps1
Import-Certificat.ps1
########################################################################################################################## # # # Developer: Ballweber Florian ...
PowerShellCorpus/Github/XxDeadLiiNexX_Powershell-Scripts/Enable-WOL/Enable-WakeOnLan.ps1
Enable-WakeOnLan.ps1
################################################################################################################################ # # # Developer: Ballweber ...
PowerShellCorpus/Github/XxDeadLiiNexX_Powershell-Scripts/Get-AvailableWindowsUpdates/Get-AvailableWindowsUpdates.ps1
Get-AvailableWindowsUpdates.ps1
########################################################################################################################## # # # Developer: Ballweber Florian ...
PowerShellCorpus/Github/XxDeadLiiNexX_Powershell-Scripts/Get-InstalledSoftware/Get-InstalledSoftware.ps1
Get-InstalledSoftware.ps1
########################################################################################################################## # # # Developer: Ballweber Florian ...
PowerShellCorpus/Github/silverioatosjr_Sample/Sample/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/silverioatosjr_Sample/Sample/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/silverioatosjr_Sample/Sample/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/silverioatosjr_Sample/Sample/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/silverioatosjr_Sample/Sample/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/silverioatosjr_Sample/Sample/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/silverioatosjr_Sample/Sample/packages/EntityFramework.6.1.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/silverioatosjr_Sample/Sample/packages/EntityFramework.6.1.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/sskoklev_Structure2/POC/AirWatch/debug_Execute-AirWatch-Install-DB.ps1
debug_Execute-AirWatch-Install-DB.ps1
# Author: Marina Krynina ############################################################################################ try { write-host "INFO: Start Execute-AirWatch-Install" # get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition # Agility Variable...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/debug_ServerTest-AirWatch.ps1
debug_ServerTest-AirWatch.ps1
# Script: Server side testing - AirWatch # Author: Marina Krynina ################################################################################################# # \USER_PROFILE # \TestResults # \Logs try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition . .\Log...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/AW-INSTALL-Reports.ps1
AW-INSTALL-Reports.ps1
# Author: Marina Krynina ############################################################################################ Param( [string] $scriptPath ) # Author: Marina Krynina ############################################################################################ Set-Location -Path $scriptPath write-host "$scri...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/debug_Execute-Run-PSScript.ps1
debug_Execute-Run-PSScript.ps1
# Author: Marina Krynina ############################################################################################ try { write-host "INFO: Start Execute-AirWatch-Scripts" # get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition # Agility Variable...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/debug_Execute-AirWatch-Install-RPT.ps1
debug_Execute-AirWatch-Install-RPT.ps1
# Author: Marina Krynina ############################################################################################ try { write-host "INFO: Start Execute-AirWatch-Install" # get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition # Agility Variable...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/debug_Execute-AirWatch-Install.ps1
debug_Execute-AirWatch-Install.ps1
# Author: Marina Krynina ############################################################################################ try { write-host "INFO: Start Execute-AirWatch-Install" # get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition # Agility Variable...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/AirWatch-Manage-ReportingService.ps1
AirWatch-Manage-ReportingService.ps1
Param( [string] $scriptPath, [string] $action, [string] $INSTALLSET_XML = "ConfigFiles\AirWatch-Install.xml" ) # Author: Marina Krynina # =================================================================================== #################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/debug_Execute-AirWatch-Install-APP.ps1
debug_Execute-AirWatch-Install-APP.ps1
# Author: Marina Krynina ############################################################################################ try { write-host "INFO: Start Execute-AirWatch-Install" # get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition # Agility Variable...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/_admin_ReplaceDataInConfigFiles.ps1
_admin_ReplaceDataInConfigFiles.ps1
######################################################################### # Author: Marina Krynina, Stiven Skoklevski, CSC # Find and replace the a given substring with a new value ######################################################################### function UpdateConfigFiles([string]$inputFile) { [xml]...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/_admin-ServerTest.ps1
_admin-ServerTest.ps1
# Installed >NET Framework version and release # release 378675 or 378758 = .NET 4.5.1 # release 379893 = .NET 4.5.2 Get-ChildItem 'Microsoft.Powershell.Core\Registry::HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | get-ItemProperty -name Version, Release -EA 0 | Where {$_.PSChildName -match '^(?!S)\p{...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/ConfigFiles/AirWatch-Variables.ps1
AirWatch-Variables.ps1
# ============== COMMON ====================================================================== # run script but do not execute installs $TEST = $false #do not use lLevated Task, just load the script for debugging $DEBUG = $false $ADMIN = "agilitydeploy" $DBSERVER = "" $DBINSTANCE = "" $SQLALIAS = "AIRWATCH_...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/Install/Execute-Run-PSScript.ps1
Execute-Run-PSScript.ps1
Param( [string] $scriptPath ) # Author: Marina Krynina function RunPSScripts([xml] $xmlinput) { $nodes = $xmlinput.SelectNodes("//ScriptsSet/Script") if (([string]::IsNullOrEmpty($nodes))) { log "INFO: No script to run is configured in: '$inputFile'" return 0 } $rv...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/Install/Execute-AirWatch-Install.ps1
Execute-AirWatch-Install.ps1
Param( [string] $scriptPath, [string] $installOption ) # Author: Marina Krynina # =================================================================================== # Desc: Updates the config file(s) with derived values # =================================================================================...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/Install/Kill-AirWatch-Popups.ps1
Kill-AirWatch-Popups.ps1
Param( [string] $scriptPath ) . .\LoggingV3.ps1 $true $scriptPath "Wait-And-Stop-AirWatchPopup.ps1" $parentProcessMainTitle = "AirWatch Reports" $popupTitle = "AirWatch Reports - InstallShield Wizard" Start-Sleep 60 While ((get-process | where {($_.mainWindowTitle).ToUpper() -eq ($parentProcessMainTitl...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/Install/AirWatch-Install.ps1
AirWatch-Install.ps1
Param( [string] $scriptPath, [string] $installFile, [string] $arguments, [string] $parameters, [string] $AWRSEXE, [string] $AWRSSVCLOCATION, [string] $AWRSLOCATION ) # Author: Marina Krynina ###########################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/Install/Set-RegistryServicesStartTimeout.ps1
Set-RegistryServicesStartTimeout.ps1
Param( [string]$curLocation, $timeout ) # Author: Marina Krynina ############################################################################################ # Main ############################################################################################ # Load Common functions $scriptPath = $curLocatio...
PowerShellCorpus/Github/sskoklev_Structure2/POC/AirWatch/TestFramework/ServerTest-AirWatch.ps1
ServerTest-AirWatch.ps1
Param( [string] $scriptPath, [string] $testFolder ) ############################################################################################ # Author: Marina Krynina # Desc: Server side testing - AirWatch ############################################################################################ f...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/debug_Execute-OfcOnline-RemoveServerFromFarm.ps1
debug_Execute-OfcOnline-RemoveServerFromFarm.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-OfcOnline-RemoveServerFromFarm" . .\Config\Execute-OfcOnline-RemoveServerFromFarm.ps1 $scriptPath exit 0 } catch { $ex = $_.Exception | format-list ...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/debug_Execute-OfcOnline-Install.ps1
debug_Execute-OfcOnline-Install.ps1
try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-OfcOnline-Install" # Agility Variables - set default $DEBUG = $true $VARIABLES = "ConfigFiles\Variables-OfcOnline.ps1" . .\Install\Execute-OfcOnline-Install.ps1 $scriptPath ...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/debug_Execute-OfcOnline-Update-Install.ps1
debug_Execute-OfcOnline-Update-Install.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-OfcOnline-Update-Install" # Agility Variables - set default $DEBUG = $true $VARIABLES = "ConfigFiles\Variables-OfcOnline.ps1" . .\Install\Execute-Of...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/debug_Execute-OfcOnline-Config.ps1
debug_Execute-OfcOnline-Config.ps1
# Office Online Configure # Author: Marina Krynina ################################################################################################# try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-OfcOnline-Config" # Agility Variables...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/ConfigFiles/Variables-OfcOnline.ps1
Variables-OfcOnline.ps1
$ADMIN = "agilitydeploy" $USE_SSL = "true" #region Configure Product $PRIMARY_SERVER = "OWA-01" $EDITING_ENABLED = "false" $SSLOFFLOADED = "true" # IMPORTANT: the certificate friendly name. This must match the CERTS_XML.xml # It must exists in the Personal store. Otherwise, configuration will fail $CERTIFICATE_...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/ConfigFiles/GSA/Variables-OfcOnline.ps1
Variables-OfcOnline.ps1
$ADMIN = "agilitydeploy" $USE_SSL = "true" #region Configure Product $PRIMARY_SERVER = "OWA-01" $EDITING_ENABLED = "false" $SSLOFFLOADED = "true" # IMPORTANT: the certificate friendly name. This must match the CERTS_XML.xml # It must exists in the Personal store. Otherwise, configuration will fail $CERTIFICATE_...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Install/Execute-OfcOnline-Update-Install.ps1
Execute-OfcOnline-Update-Install.ps1
Param( [string] $scriptPath ) ################################################################################################# # Author: Marina Krynina # Desc: Functions to support installation of Office Online updates ##########################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Install/OfcOnline-Update-Install.ps1
OfcOnline-Update-Install.ps1
Param( [string] $scriptPath, [string] $patchLocation, [string] $patches ) # Author: Marina Krynina ############################################################################################ # Main ############################################################################################ Se...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Install/Execute-OfcOnline-Install.ps1
Execute-OfcOnline-Install.ps1
Param( [string] $scriptPath ) ############################################################################################ # Author: Marina Krynina ################################################################################################# #################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Config/Execute-OfcOnline-Config.ps1
Execute-OfcOnline-Config.ps1
Param( [string] $scriptPath ) # Office Online Config # Author: Marina Krynina ############################################################################################ function UpdateInputFile ([string] $inputFile) { if ((ifFileExists( $inputFile)) -ne $true) { throw "ERROR: $inputFile is mi...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Config/OfcOnline-Config.ps1
OfcOnline-Config.ps1
Param( [string] $scriptPath, [string] $inputFile ) ################################################################################################# # Author: Marina Krynina # Desc: Configure ConfigureOfficeOnline ##########################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Config/OfcOnline-RemoveServerFromFarm.ps1
OfcOnline-RemoveServerFromFarm.ps1
Param( [string] $scriptPath ) ############################################################################################ # Main ############################################################################################ Set-Location -Path $scriptPath . .\LoggingV3.ps1 $true $scriptPath "OfcOnline-RemoveSer...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Config/Execute-OfcOnline-RemoveServerFromFarm.ps1
Execute-OfcOnline-RemoveServerFromFarm.ps1
Param( [string] $scriptPath ) ############################################################################### # Author: Kulothunkan Palasundram # Updated: Marina Krynina # Desc: Functions to support removal of office web apps server from farm # Main ###########################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/OfficeOnline/Config/admin_CreateSelfSignedCert.ps1
admin_CreateSelfSignedCert.ps1
# Sandpit New-SelfSignedCertificate -DnsName OfficeOnline.mwsaust.net,sndappsyd105w.sandpit.cscmws.com,sndappsyd106w.sandpit.cscmws.com -CertStoreLocation Cert:\LocalMachine\My
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_Execute-SP2016-Install.ps1
debug_Execute-SP2016-Install.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-SP2016-PreReqs-Install" # Agility Variables - set default if ([string]::IsNullOrEmpty($VARIABLES)) { write-host "INFO: VARIABLES file is not set...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_Execute-SP2016-PSConfig.ps1
debug_Execute-SP2016-PSConfig.ps1
Param( [string] $scriptPath, [string] $ver = "2016" ) # Script: SharePoint 2016 Install # Author: Marina Krynina ################################################################################################# try { Write-host "INFO: Starting script execution" $scriptPath = split-path -pare...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_Execute-SP2016-Config-ServiceApps.ps1
debug_Execute-SP2016-Config-ServiceApps.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-SP2016-Config" # Agility Variables - set default if ([string]::IsNullOrEmpty($VARIABLES)) { write-host "INFO: VARIABLES file is not set, setting...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_ExecutUnitTestServer.ps1
debug_ExecutUnitTestServer.ps1
# Script: Server side testing - Common # Author: Marina Krynina ################################################################################################# # \USER_PROFILE # \TestResults # \Logs try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition . .\Logging...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_Execute-SP2016-PreReqs-Install.ps1
debug_Execute-SP2016-PreReqs-Install.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-SP2016-PreReqs-Install" # Agility Variables - set default if ([string]::IsNullOrEmpty($VARIABLES)) { write-host "INFO: VARIABLES file is not set...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_Execute-SP2016-Update-Install.ps1
debug_Execute-SP2016-Update-Install.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-SP2016-PreReqs-Install" # Agility Variables - set default if ([string]::IsNullOrEmpty($VARIABLES)) { write-host "INFO: VARIABLES file is not set...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/admin_CreateDNSRecords.ps1
admin_CreateDNSRecords.ps1
# IMPORTANT: The script should be executed on DNS server # Author: Marina Krynina ########################################### # Create DNS records ########################################### function CreateDNSRecords([string] $inputFile) { # Get the xml Data $xml = [xml](Get-Content $inputFile) $nodes...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/debug_Execute-SP2016-Config-MinRoles.ps1
debug_Execute-SP2016-Config-MinRoles.ps1
# Author: Marina Krynina try { $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition write-host "INFO: Start Execute-SP2016-Config" # Agility Variables - set default if ([string]::IsNullOrEmpty($VARIABLES)) { write-host "INFO: VARIABLES file is not set, setting...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/ConfigFiles/Variables-SP2016-Sandpit.ps1
Variables-SP2016-Sandpit.ps1
Param( [string] $serverRole = "" ) function Get-ServersList ([string] $shortNames) { $servers = $shortNames -split "," $serversList = "" if ($servers.Count -ne 0) { foreach ($server in $servers) { $server = $server.Trim() $srv = ([string](Get-ServerNam...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/ConfigFiles/admin_Get-Password.ps1
admin_Get-Password.ps1
.\PlatformUtils.ps1 . .\GlobalRepository.ps1 #get-serviceAccountPassword "svc_sql" $pwd =(get-globalvariable("ServiceAccount\svc_sql")).value Write-Host $pwd
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Install/Execute-SP2016-Install.ps1
Execute-SP2016-Install.ps1
Param( [string] $scriptPath ) ############################################################################################ # Author: Marina Krynina # Desc: Functions to support installation of SharePoint 2016 ################################################################################################# ...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Install/SP2016-Update-Install.ps1
SP2016-Update-Install.ps1
Param( [string] $scriptPath, [string] $patchLocation, [string] $patches ) $global:srchctr = 1 $global:srch4srvctr = 1 $global:srch5srvctr = 1 # Author: Marina Krynina # based on script provided by Russ Maxwell (russmax@microsoft.com) ############################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Install/Execute-SP2016-PreReqs-Install.ps1
Execute-SP2016-PreReqs-Install.ps1
Param( [string] $scriptPath, [string] $ver = "2016" ) ############################################################################################ # Author: Marina Krynina # Desc: Functions to support installation of SharePoint 2016 pre-requisites ########################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Install/SP2016-Install.ps1
SP2016-Install.ps1
Param( [string] $scriptPath, [string] $setupPath, [string] $targetConfigFile, [string] $VARIABLES ) # Author: Marina Krynina # credits to AutoSpInstaller Function Get-SharePointInstall { # New(er), faster way courtesy of SPRambler (https://www.codeplex.com/site/users/view/SpRambler) i...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Install/Execute-SP2016-Update-Install.ps1
Execute-SP2016-Update-Install.ps1
Param( [string] $scriptPath ) ################################################################################################# # Author: Marina Krynina # Desc: Functions to support installation of SharePoint updates ############################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/Configure-WebApps.ps1
Configure-WebApps.ps1
Param( [string] $scriptPath, [string] $ver = "" ) ############################################################################################ # Main # Author: Marina Krynina ############################################################################################ Set-Location -Path $scriptPath # Lo...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/SP2016-PSConfigUI.ps1
SP2016-PSConfigUI.ps1
Param( [string] $scriptPath ) ############################################################################################ # Main # Author: Marina Krynina ############################################################################################ Set-Location -Path $scriptPath # Load Common functions . .\F...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/SP2016-Config.ps1
SP2016-Config.ps1
Param( [string] $scriptPath, [string] $inputFile, [string] $configOption, [string] $VARIABLES ) ############################################################################################ # Main # Author: Marina Krynina ###########################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/Configure-UserProfiles.ps1
Configure-UserProfiles.ps1
Param( [string] $scriptPath, [string] $inputFile ) ############################################################################################ # Main # Author: Marina Krynina # Desc: Creates sUser Profile Service Application on the local server. # Starts User profile Synch Service on a synch serv...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/Configure-SP2016-Functions.ps1
Configure-SP2016-Functions.ps1
################################################################################################################### # MK: search for MK to see what was changed # Replaced all Write-Host with log # Removed code that is NOT related to Windows 2012 or 2012 R2 # eg: If (!($remoteQueryOS.Version.Contains("6....
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/Execute-SP2016-Config.ps1
Execute-SP2016-Config.ps1
Param( [string] $scriptPath, [string] $configOption ) function CheckForError { # check if error.txt exists. if yes, read it and throw exception # This is done to get an error code from the scheduled task. $errorFile = "$scriptPath\error.txt" if (CheckFileExists($errorFile)) { $...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/Config/Execute-SP2016-PSConfigUI.ps1
Execute-SP2016-PSConfigUI.ps1
Param( [string] $scriptPath ) # Script: Run PSCONFIGUI # Author: Marina Krynina Set-Location -Path $scriptPath # Load Common functions . .\PlatformUtils.ps1 . .\LaunchProcess.ps1 . .\LoggingV3.ps1 $true $scriptPath "Execute-SP2016-PSConfigUI.ps1" try { if ([string]::IsNullOrEmpty($VARIABLES) -eq $t...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/TestFramework/UnitTest-Server-SharePoint.ps1
UnitTest-Server-SharePoint.ps1
Param( [string] $scriptPath, [string] $testFolder ) ############################################################################################ # Author: Marina Krynina # Desc: Server side Unit testing - SharePoint ##########################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2016/TestFramework/Get-SPSearchTopologyState.ps1
Get-SPSearchTopologyState.ps1
# Modified by Marina Krynina to include in the Unit Test results ## SharePoint Server: PowerShell Script To Check Details On A Farms Search Service Application Topology ## <# .SYNOPSIS The purpose of this SharePoint 2013 script is to present the status of the Search Service Application, with ...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_ConfigureSharedDisk.ps1
debug_ConfigureSharedDisk.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName $XMLFILENAME = 'Install\Cluster\SharedDiskConfigSharedDB.xml' $MWSREGISTRYXMLFILENAME = 'Install\MWSRegistry.xml' $NUMBE...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_ConfigureWindowsCluster.ps1
debug_ConfigureWindowsCluster.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName $SHAREDWINDOWSCLUSTERXMLFILENAME = 'Install\Cluster\WindowsClusterSharedDB.xml' $MWSREGISTRYXMLFILENAME = 'Install\MWSRegistr...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_Configure-SQL.ps1
debug_Configure-SQL.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName $SQLUSERSXMLFILE = 'config\SQLUsers_SharedDB.xml' $SQLPORTSXMLFILE = 'config\SQLPorts_SharedDB.xml' $GENERICSERVICEXMLFILE = '...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_ApplySCCMRequirements.ps1
debug_ApplySCCMRequirements.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName # . .\Install\ApplySCCMRequirements.ps1 $scriptPath . .\ExecuteApplySCCMRequirements.ps1 # $scriptPath # edited to...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_CreateClusterADObjects.ps1
debug_CreateClusterADObjects.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName $CLUSTERNAMES = "CLN-996;CLN-997;CLN-998;CLN-999;CLN-999" $CLUSTERNAMES = "CLN-996" . .\ExecuteCreateClusterADObjects.ps1 ...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_Install-SQL2012.ps1
debug_Install-SQL2012.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName $USER = 'agilitydeploy' $SQLINSTALLCONFIG_XML = 'install\SQL2012SP2Ent_SHARED_Secondary.xml' $MWSREGISTRYXMLFILENAME = 'instal...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_Set-VolumeLabel.ps1
debug_Set-VolumeLabel.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\Logging.ps1 $true $scriptPath $scriptName $DISKLABELS = "E;Application,F;PageFile," . .\Set-VolumeLabel.ps1
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_Set-PageFile.ps1
debug_Set-PageFile.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\Logging.ps1 $true $scriptPath $scriptName $PAGEFILEPATH = 'F:\pagefile.sys' $INITIALSIZEMB = 48000 $MAXIMUMSIZEMB = 48000 . .\Set-PageFile.ps1
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ExecuteWindowsUsers.ps1
ExecuteWindowsUsers.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ExecuteSPNs.ps1
ExecuteSPNs.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ConfigureSQLWindows.ps1
ConfigureSQLWindows.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows ################################################################################################# try { $scriptPath = $env:USERPROFILE...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/UpdateTenantIP.ps1
UpdateTenantIP.ps1
######################################################################### # Author: Stiven Skoklevski, CSC # Find and replace the IP addresses with the tenant specific Production IPs # USed to replace IP addresses # # Assumption is that the initial VPN has a prefix of 10.5.7. # ##################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ConfigureSharedDisks.ps1
ConfigureSharedDisks.ps1
# ConfigureSharedDisks.ps1 # $SHAREDDISKXMLFILENAME='.\Install\Cluster\SharedDiskConfigSharedDB.xml' ######################################################################### # Author: Stiven Skoklevski, # Bring Shared disks online, initialised and then offline in preparation to be used by Windows Cluster ####...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ConfigureMWS2Registry.ps1
ConfigureMWS2Registry.ps1
# ConfigureMWSRegistry.ps1 # $MWSREGISTRYXMLFILENAME = '.\Install\MWSRegistry.xml' ######################################################################### # Author: Stiven Skoklevski, # Management of custom nodes within the Registry ######################################################################### ...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_Configure-SQLMemory.ps1
debug_Configure-SQLMemory.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName # Load Common functions . .\FilesUtility.ps1 . .\UsersUtility.ps1 . .\VariableUtility.ps1 . .\PlatformUtils.ps1 . .\LaunchProc...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_ConfigureMWS2Registry.ps1
debug_ConfigureMWS2Registry.ps1
# get current script location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition $scriptName = $MyInvocation.MyCommand.Name . .\LoggingV2.ps1 $true $scriptPath $scriptName $MWSREGISTRYXMLFILENAME = 'Install\MWSRegistry.xml' . .\ConfigureMWS2Registry.ps1 CreateCustomNodes $MWSREGIS...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ConfigureWindowsCluster.ps1
ConfigureWindowsCluster.ps1
Param( [string] $scriptPath, [string] $clusterXMLfile, [string] $currentUser ) ######################################################################### # Author: Stiven Skoklevski, # Create and configure the Windows Cluster ########################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ExecuteWindowsCluster.ps1
ExecuteWindowsCluster.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/debug_UsersUtility.ps1
debug_UsersUtility.ps1
. .\PlatformUtils.ps1 . .\GlobalRepository.ps1 . .\LoggingV2.ps1 $true . .\UsersUtility.ps1 $name = "svc_sql" $pwd = get-serviceAccountPassword -username $name Write-Host $pwd $name = "svc_xdm" $pwd = get-serviceAccountPassword -username $name Write-Host $pwd return $DBInstanceName = "DR2CNNCDC00...