full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ExecutePreStageClusterADObjects.ps1 | ExecutePreStageClusterADObjects.ps1 | #################################################################################################
# Author: Stiven Skoklevski
# Desc: Functions to support preparation of Windows Cluster
#################################################################################################
. .\FilesUtility.ps1
. .\Variabl... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ExecutePreStageClusterADObjects - Copy.ps1 | ExecutePreStageClusterADObjects - Copy.ps1 | #################################################################################################
# Author: Stiven Skoklevski
# Desc: Functions to support preparation of Windows Cluster
#################################################################################################
. .\FilesUtility.ps1
. .\Variabl... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/ExecuteApplySCCMRequirements.ps1 | ExecuteApplySCCMRequirements.ps1 | #################################################################################################
# Author: Stiven Skoklevski
# Desc: Functions to support preparation of Windows
#################################################################################################
. .\FilesUtility.ps1
. .\VariableUtility... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/Install/Configure-WindowsUsers.ps1 | Configure-WindowsUsers.ps1 | Param(
[string] $scriptPath,
[string] $SQLUSERSXMLFILE
)
#########################################################################
# Author: Stiven Skoklevski, CSC
# Add users to local admins or local on locally permission
#########################################################################
####... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/Install/ApplySCCMRequirements.ps1 | ApplySCCMRequirements.ps1 | Param(
[string] $scriptPath
)
#########################################################################
# Author: Stiven Skoklevski, CSC
# Apply SCCM requirements
#########################################################################
####################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/Install/PreStageClusterADObjects.ps1 | PreStageClusterADObjects.ps1 | Param(
[string] $scriptPath,
[string] $clusterNames,
[string] $currentUser
)
#########################################################################
# Author: Stiven Skoklevski,
# Prestage the AD Computer objects required by the Cluster Objects
# and assign these objects the CreateChild permiss... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/Install/Install-SQL2012.ps1 | Install-SQL2012.ps1 | # Mandatory heading
#########################################################################
# Author: Stiven Skoklevski, CSC
# Install SQLServer in a cluster. USed for primary and additional nodes
#########################################################################
# Load Common functions
. .\LaunchProcess.... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/Install/Configure-SPNs.ps1 | Configure-SPNs.ps1 | Param(
[string] $scriptPath,
[string] $SPNXMLFILE
)
#########################################################################
# Author: Stiven Skoklevski, CSC
# Register SPNs ono the server
#########################################################################
#####################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SQL2012SP2Ent/TestFramework/UnitTest-Server-SQL.ps1 | UnitTest-Server-SQL.ps1 | Param(
[string] $scriptPath,
[string] $testFolder
)
############################################################################################
# Author: Marina Krynina
# Desc: Server side Unit testing - Template and Sample
#################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_ConnectToWAC2013.ps1 | debug_ConnectToWAC2013.ps1 | # MWS2R2 - ConnectToWAC2013 ##################################################################
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \Install
# \Config
# \InstallMedia
# \OWA... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_ConfigureLicenseEnforcement.ps1 | debug_ConfigureLicenseEnforcement.ps1 | # Script: SharePoint2013 Farm Config
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \Install
# \Config
# \InstallMedia
# \Logs
try
{
$scriptPath = $env:USERPROFILE
$scriptPath =... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_InstallEwsManagedApi.ps1 | debug_InstallEwsManagedApi.ps1 | # Script: Exchange Web Service managed API Install
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \Install
# \Config
# \InstallMedia
# \Logs
try
{
$scriptPath = $env:USERPROFILE
... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_ExecutUnitTestServer.ps1 | debug_ExecutUnitTestServer.ps1 | # Script: Server side testing - Common
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \TestResults
# \Logs
try
{
$scriptPath = "c:\users\mkrynina"
. .\LoggingV2.ps1 $true $scriptPath "Execute-U... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_ConfigureSPFarm.ps1 | debug_ConfigureSPFarm.ps1 | # Script: SharePoint2013 Farm Config
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \Install
# \Config
# \InstallMedia
# \Logs
try
{
$scriptPath = $env:USERPROFILE
. .\LoggingV2... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_InstallSP2013Binaries.ps1 | debug_InstallSP2013Binaries.ps1 | # Script: SharePoint2013 Install
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \Install
# \Config
# \InstallMedia
# \Logs
try
{
# delay execution to ensure the VM is up and running ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_InstallSP2013PreReqs.ps1 | debug_InstallSP2013PreReqs.ps1 | # Script: SharePoint2013 pre-reqs Install
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \Install
# \Config
# \InstallMedia
# \Logs
try
{
$scriptPath = $env:USERPROFILE
. .\Logg... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/admin_Cleanup-SharePointAndWACServers.ps1 | admin_Cleanup-SharePointAndWACServers.ps1 | # ===================================================================================
# Author: Marina Krynina, CSC
# Desc: Deletes Certificate from a store
# ===================================================================================
Function DeleteCertificateByFriendlyName ([string]$certStore, [string] $f... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/debug_InstallSP2013Update.ps1 | debug_InstallSP2013Update.ps1 | # MWS2R3 - Install a SharePoint update ###############################################################
# Author: Marina Krynina
# Desc: Manages sharepoint services and installs an update
############################################################################################
# \USER_PROFILE
# \Install... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/test.ps1 | test.ps1 | $webclient = new-object System.Net.WebClient
$webClient.UseDefaultCredentials = $true
try
{
$webpage = $webclient.DownloadString("http://www.cnn.com")
$str = [string]$webpage
$start = $str.IndexOf("<title>", [System.StringComparison]::OrdinalIgnoreCase)
$end = $str.IndexOf("</title>... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/bk/unitTest_SharePoint.ps1 | unitTest_SharePoint.ps1 | Function WriteLine
{
log ""
log "------------------------------------------------------------------------------------------------------------"
}
function NewLine()
{
log "`n"
}
Function GetFromNode([System.Xml.XmlElement]$node, [string] $item)
{
$value = $node.GetAttribute($item)
If ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/bk/UnitTest-Server-SharePoint.ps1 | UnitTest-Server-SharePoint.ps1 | Param(
[string] $scriptPath
)
############################################################################################
# Author: Marina Krynina
# Desc: Server side Unit testing - SharePoint
############################################################################################
function get-ObjectToCh... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/bk/unitTest_SharePoint_v0.1.ps1 | unitTest_SharePoint_v0.1.ps1 | Function WriteLine
{
log ""
log "------------------------------------------------------------------------------------------------------------"
}
function NewLine()
{
log "`n"
}
Function GetFromNode([System.Xml.XmlElement]$node, [string] $item)
{
$value = $node.GetAttribute($item)
If ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/bk/UnitTest-Server-Product.ps1 | UnitTest-Server-Product.ps1 | ############################################################################################
# Author: Marina Krynina
# Desc: Set of common unit test functions
############################################################################################
###############################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/bk/UnitTest-Server-Common.ps1 | UnitTest-Server-Common.ps1 | ############################################################################################
# Author: Marina Krynina
# Desc: Set of common unit test functions
############################################################################################
###############################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Test/EnhancedHTML2/farmreport.ps1 | farmreport.ps1 | $SPFarm = [Microsoft.SharePoint.Administration.SPFarm]::Local
#region - Alternate Access Mapping
$AAM = $SPFarm.AlternateUrlCollections |
ConvertTo-EnhancedHTMLFragment -EvenRowCssClass 'even' `
-OddRowCssClass 'odd' `
-MakeH... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/Install-SharePoint2013PreRequisites.ps1 | Install-SharePoint2013PreRequisites.ps1 | Param(
[string] $scriptPath
)
############################################################################################
# Author: Marina Krynina
# Desc: Functions to support installation of SharePoint 2013 pre-requisites
# Updates:
# 2014-11-12
# 2014-11-13 Added WCF 5.6 to the list
###... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/Install-EwsManagedApi.ps1 | Install-EwsManagedApi.ps1 | Param(
[string] $scriptPath
)
############################################################################################
# Main
############################################################################################
# Load Common functions
. .\FilesUtility.ps1
. .\VariableUtility.ps1
. .\PlatformUtils.p... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/Update-SharePoint-CU.ps1 | Update-SharePoint-CU.ps1 | <# ==============================================================
//
// Microsoft provides programming examples for illustration only,
// without warranty either expressed or implied, including, but not
// limited to, the implied warranties of merchantability and/or
// fitness for a particular purpose... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/admin_Get-SP2013-BaselineVersion.ps1 | admin_Get-SP2013-BaselineVersion.ps1 | # PowerShell script to display SharePoint products from the registry.
Param(
# decide on whether all the sub-components belonging to the product should be shown as well
[switch]$ShowComponents
)
# location in registry to get info about installed software
$RegLoc = Get-ChildItem HKLM:\Software\Microsoft\... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/Install-SharePoint2013.ps1 | Install-SharePoint2013.ps1 | Param(
[string] $scriptPath
)
############################################################################################
# Author: Marina Krynina
# Desc: Functions to support installation of SharePoint 2013
# Updates:
# 2014-11-12
# 2014-11-13 Added WCF 5.6 to the list
#################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/admin_Get-AppFabric-Version.ps1 | admin_Get-AppFabric-Version.ps1 | (Get-ItemProperty "C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\DistributedCacheConfiguration\Microsoft.ApplicationServer.Caching.Configuration.dll" -Name VersionInfo).VersionInfo.ProductVersion |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/Execute-InstallSP2013Update.ps1 | Execute-InstallSP2013Update.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
# Desc: Functions to support installation of SharePoint updates
############################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/Install-SP2013Update.ps1 | Install-SP2013Update.ps1 | Param(
[string] $scriptPath,
[string] $patchLocation,
[string] $patches,
[string] $psConfigReqd
)
function Stop-Services()
{
########################
##Stop Search Services##
########################
##Checking Search services##
$srchctr = 1
$srch4srvctr =... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Install/admin_Update-SharePoint-CU.ps1 | admin_Update-SharePoint-CU.ps1 | <# ==============================================================
//
// Microsoft provides programming examples for illustration only,
// without warranty either expressed or implied, including, but not
// limited to, the implied warranties of merchantability and/or
// fitness for a particular purpose... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/ManualPatchingScripts/SharePoint_GetRunningServices.ps1 | SharePoint_GetRunningServices.ps1 | #Lists down the services which is running and outputs to a file with computername and datetime concatenated
#expects a subfolder with the name ServicesStatusHistory in where the file is run
#Author = Kulothunkan Palasundram (kpalasundram)
#Date = 15 May 2016
$hostname = hostname
$currentdatetime = $(((get-date).... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/ManualPatchingScripts/SharePoint_RunPSConfig.ps1 | SharePoint_RunPSConfig.ps1 | PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/ManualPatchingScripts/SharePoint_CreateNewWOPIBinding.ps1 | SharePoint_CreateNewWOPIBinding.ps1 | New-SPWOPIBinding –ServerName "OfficeApps.MWSAust.Net" |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/ManualPatchingScripts/SharePoint_RemoveWOPIBinding.ps1 | SharePoint_RemoveWOPIBinding.ps1 | Remove-SPWOPIBinding –Server "OfficeApps.MWSAust.Net" |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/ManualPatchingScripts/SharePoint_InstallBinaries.ps1 | SharePoint_InstallBinaries.ps1 |
<# ==============================================================
//
// Original Author: Russ Maxwell (russmax@microsoft.com)
// Modified By: Kulothunkan Palasundram (kpalasundram@csc.com)
// Changes: i) Changed the order of services being stopped and started
ii) Added local patch location ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/ManualPatchingScripts/SharePoint_UpgradeContentDatabase.ps1 | SharePoint_UpgradeContentDatabase.ps1 | Add-PSSnapin Microsoft.SharePoint.Powershell
$web = Get-SPWebApplication -IncludeCentralAdministration
Write-Output $web
foreach( $url in $web.url)
{
$contentdb = Get-SPContentDatabase -WebApplication $url
Write-Output "`n Upgrading $contentdb ....`n"
Upgrade-SPContentDatabase -Identity $co... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Set-EncryptionKeyForOneWayTrust.ps1 | Set-EncryptionKeyForOneWayTrust.ps1 | Param(
[string] $scriptPath,
[string] $password
)
############################################################################################
# Main
# Author: Marina Krynina
############################################################################################
Set-Location -Path $scriptPath
# ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/_siteColCreate.ps1 | _siteColCreate.ps1 |
$siteURL = "https://DEVAPPSYD001W.devraus01.cscmws.com"
$ownerAlias = "DEVRAUS01\agilitydeploy"
<SiteCollection siteUrl="https://DEVAPPSYD001W.devraus01.cscmws.com" HostNamedSiteCollection="false" Owner="DEVRAUS01\agilitydeploy" Name="Root Site Collection" Description="MWS2 Root Site Collection. The site collecti... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Set-PeoplePickerSearchADForests.ps1 | Set-PeoplePickerSearchADForests.ps1 | Param(
[string] $scriptPath,
[string] $trustingDomain,
[string] $trustedDomainsList
)
############################################################################################
# Main
# Author: Marina Krynina
##########################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Execute-ConnectToWAC2013.ps1 | Execute-ConnectToWAC2013.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
# Desc: Functions to support using people picker over a one-way trust
######################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Configure-SP2013-Functions.ps1 | Configure-SP2013-Functions.ps1 |
###################################################################################################################
# MK: search for MK to see what was changed
# Replaced all Write-Host with log
#
#################################################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Execute-FarmConfiguration.ps1 | Execute-FarmConfiguration.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
# Desc: Functions to support preparation of SharePoint 2013 farm configuration
#############################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Execute-LicenseEnforcement.ps1 | Execute-LicenseEnforcement.ps1 | Param(
[string] $scriptPath
)
############################################################################################
# Author: Marina Krynina
# Desc: Executes Unit testing Server Side - Common
############################################################################################
# \USER_PROFILE
# ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Execute-SetEncryptionKeyForOneWayTrust.ps1 | Execute-SetEncryptionKeyForOneWayTrust.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
# Desc: Functions to support using people picker over a one-way trust
######################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Connect-ToWAC2013.ps1 | Connect-ToWAC2013.ps1 | Param(
[string] $scriptPath,
[string] $wacServer
)
############################################################################################
# Main
# Author: Marina Krynina
############################################################################################
Set-Location -Path $scriptPath
#... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Configure-SharePoint2013.ps1 | Configure-SharePoint2013.ps1 | Param(
[string] $scriptPath,
[string] $inputFile,
[string] $useSSL,
[string] $clientDomain
)
############################################################################################
# Main
# Author: Marina Krynina
# Updates:
# 2014-12-17 Configures SharePoint 2013 Farm based on conf... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/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/SharePoint2013/Config/Configure-PeoplePicker.ps1 | Configure-PeoplePicker.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
# Desc: Functions to support configuration of one-way truct and people picker
##############################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/admin_ManagePeoplePicker.ps1 | admin_ManagePeoplePicker.ps1 | # view property
stsadm -o getproperty -pn peoplepicker-searchadforests -url https://dev2appsyd001w.mwsaust.net
# delete property
stsadm -o setproperty -pn peoplepicker-searchadforests -pv "" -url https://dev2appsyd001w.mwsaust.net |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Execute-SetPeoplePickerSearchADForests.ps1 | Execute-SetPeoplePickerSearchADForests.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
# Desc: Functions to support using people picker over a one-way trust
######################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/Configure-LicenseEnforcement.ps1 | Configure-LicenseEnforcement.ps1 | Param(
[string] $scriptPath,
[string] $enableLicEnforcement,
[string] $groupStd,
[string] $groupPrem
)
function Disable-UserLicensing
{
log "INFO: about to Disable user licensing"
Disable-SPUserLicensing -Confirm:$false
$mappings = Get-SPUserLicenseMapping
foreach($mapping... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/UserProfiles/AddAccountToLogonLocally.ps1 | AddAccountToLogonLocally.ps1 | #written by Ingo Karstein, http://ikarstein.wordpress.com
# v1.0, 10/12/2012
## <--- Configure here
$accountToAdd = "domain\sp_farm"
## ---> End of Config
$sidstr = $null
try {
$ntprincipal = new-object System.Security.Principal.NTAccount "$accountToAdd"
$sid = $ntprincipal.Translate([System.Security... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/Config/UserProfiles/UPSA_SYNC_AUTOFIX.ps1 | UPSA_SYNC_AUTOFIX.ps1 |
<#====================================================================
Copyright © 2014, June. Bjørn Roalkvam
www.SharePointbjorn.com, bjorn80@gmail.com
I got sick of doing the manual tidying prior to starting a synchronization service,
So i scriptet the whole thing for you:-). I have a ton of experience ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/TestFramework/support_EntrepriseSearch.ps1 | support_EntrepriseSearch.ps1 | Get-SPEnterpriseSearchStatus -SearchApplication "Search Service Application"
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchStatus -Text
Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchTopology
Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchServiceInstance... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/TestFramework/support_ManagedMetadata.ps1 | support_ManagedMetadata.ps1 | #Get-SPMetadataServiceApplication
#Get-SPMetadataServiceApplicationProxy
#Get-SPSiteSubscriptionMetadataConfig
#Get-SPTaxonomySession
$mmId = Get-SPServiceApplication | Where-Object {$_.DisplayName -like "*managed metadata*"} | Select Id
Get-SPServiceApplication -Identity $mmId
#Get-SPMetadataServiceApp... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/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/SharePoint2013/TestFramework/support_Distributedcache.ps1 | support_Distributedcache.ps1 | Use-CacheCluster
Get-CacheHost
Get-CacheHostConfig $env:COMPUTERNAME 22233
Get-CacheClusterHealth
# Remove and add a server to the Distributed Cache cluster
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $i... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/SharePoint2013/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/Common/Create-SQLAlias.ps1 | Create-SQLAlias.ps1 | Param(
[string] $scriptPath,
[string] $sqlAliasConfigXml
)
Function MatchComputerName($computersList, $computerName)
{
If ($computersList -like "*$computerName*") { Return $true; }
foreach ($v in $computersList) {
If ($v.Contains("*") -or $v.Contains("#")) {
# wildcard process... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_ImportCertificates.ps1 | debug_ImportCertificates.ps1 | # Script: Import SSL certificates
# Author: Marina Krynina
#################################################################################################
try
{
write-host "INFO: Start Import-Certificates"
# get current script location
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definitio... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/ServicesUtility.ps1 | ServicesUtility.ps1 | #######################
##Stop single Service##
#######################
function Stop-Service([string] $serviceName, $timeout = '00:02:00')
{
$svc = Get-Service -Name $serviceName -ErrorAction Stop
If($svc.Status -eq "Stopped")
{
log "INFO: $serviceName service is already stopped"
}... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Configure-WindowsUsersV2.ps1 | Configure-WindowsUsersV2.ps1 | Param(
[string] $scriptPath,
[string] $WINDOWSUSERS_XML
)
#########################################################################
# Author: Stiven Skoklevski, CSC
# Add users to local admins or local on locally permission
#########################################################################
###... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Generate-SelfSignedCertificate.ps1 | Generate-SelfSignedCertificate.ps1 | # ***********************************************************************************************************************
# Author: marina Krynina, CSC
# Desc: Generates a self-signed certificate. This script isexecuted manually on a server.
# ************************************************************************... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/CreateSharedDisk.ps1 | CreateSharedDisk.ps1 | #########################################################################
# Author: Mark Freeman, CSC
# Description: Create virtual disks and then add/attach them to the relevant VMs
# Updates:
# 2015-03-25 Added logging and exception handling (sskoklev)
####################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/LoggingV3.ps1 | LoggingV3.ps1 | #########################################################################
# Author: Marina Krynina, CSC
# Updates:
# 2014-11-12 Added header block
# Added echo in the log function
# 2015-01-22 Replaced "echo" with Write-Host as "echo" pollutes return codes
# 2015-03-10 P... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Install-SoftwarePreRequisites.ps1 | Install-SoftwarePreRequisites.ps1 | Param(
[string] $scriptPath,
[string] $installFile,
[string] $arguments
)
# Author: Marina Krynina
############################################################################################
# Main
############################################################################################
# Load Com... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/VariableUtility.ps1 | VariableUtility.ps1 | ########################################################################################################
# Gets or sets variable value
# IMPORTANT: DO NOT output any logging from the function as it will pollute return value
#############################################################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Execute-ServerPrereqs.ps1 | Execute-ServerPrereqs.ps1 | Param(
[string] $scriptPath
)
# Author: Marina Krynina
function SetDiskLabels ([xml] $xmlinput)
{
$startDate = get-date
$scriptName = "Set-VolumeLabel.ps1"
$errorFile = "Error-" + $scriptName + "-" + (get-date -Format "yyyyMMdd-HHmmss") + ".txt"
. .\LoggingV3.ps1 $true $scriptPath $scr... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Get-SQLInstance.ps1 | Get-SQLInstance.ps1 | Function Get-SQLInstance {
<#
.SYNOPSIS
Retrieves SQL server information from a local or remote servers.
.DESCRIPTION
Retrieves SQL server information from a local or remote servers. Pulls all
instances from a SQL server and detects if in a cluster or n... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/LoggingV2.ps1 | LoggingV2.ps1 | #########################################################################
# Author: Marina Krynina, CSC
# Updates:
# 2014-11-12 Added header block
# Added echo in the log function
# 2015-01-22 Replaced "echo" with Write-Host as "echo" pollutes return codes
# 2015-03-10 P... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/LaunchProcess.ps1 | LaunchProcess.ps1 | #########################################################################
# Author: Marina Krynina, CSC
# Updates:
# 2014-11-12 Added new function LaunchProcessAsAdministrator
# 2015-03-10 Updated LaunchProcessAsUser:
# - Exit code from the scheduled task is now returned
# ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Import-Certificates.ps1 | Import-Certificates.ps1 | Param(
[string] $scriptPath
)
###########################################
# Import Certificates
###########################################
function ImportCertificates()
{
$domain = get-domainshortname
$domainFull = get-domainname
$currentServer = ([string]$env:COMPUTERNAME).ToUpper()
# Get ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/UsersUtility.ps1 | UsersUtility.ps1 | # ===================================================================================
# Author: Marina Krynina, CSC
# Func: AddUserToLocalAdministrators
# Desc: Adds specified user to the Local admins group
# dbInstance = SERVERNAME, e.g. DR2DBSAWS003W
# username = DOMAIN\USER
# ======================... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/ConfigureWindowsFeature.ps1 | ConfigureWindowsFeature.ps1 | # ConfigureWindowsFeature.ps1
#########################################################################
# Author: Stiven Skoklevski, CSC
# Install a Windows Feature
#########################################################################
. .\FilesUtility.ps1
##################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_ExecutUnitTestServer.ps1 | debug_ExecutUnitTestServer.ps1 | # Script: Server side testing - Common
# Author: Marina Krynina
#################################################################################################
# \USER_PROFILE
# \TestResults
# \Logs
try
{
$scriptPath = $env:USERPROFILE
. .\LoggingV2.ps1 $true $scriptPath "Execute-Unit... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_ExecuteServerPrereqs.ps1 | debug_ExecuteServerPrereqs.ps1 | # Author: Marina Krynina
############################################################################################
try
{
write-host "INFO: Start Execute-CommonBase"
# get current script location
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
. .\Execute-ServerPrer... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Update-SvnWorkingCopy.ps1 | Update-SvnWorkingCopy.ps1 | <#
.SYNOPSIS
Wrapper function for "svn.exe update"
.DESCRIPTION
Bring the latest changes from the repository into the working copy (HEAD revision).
.PARAMETER Path
The Path parameter identifies the directory of the working copy.
.EXAMPLE
Update-SvnWorkingCo... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_PlatformNET35BASHInstall.ps1 | debug_PlatformNET35BASHInstall.ps1 | tar -zxvf sxs.tar.gz -C /cygdrive/c/deploy
rm -f sxs.tar.gz
/cygdrive/c/windows/sysnative/DISM.exe /Online /Enable-Feature /FeatureName:NetFx3 /All /Source:c:\\deploy\\sxs\\sxs
|
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/PlatformUtils.ps1 | PlatformUtils.ps1 | . .\GlobalRepository.ps1
function get-serviceAccountPassword($username) {
(get-globalvariable("ServiceAccount\$username")).value
}
function get-domainname {
(get-globalvariable("Global\DomainFQDN")).value
}
function get-domainshortname {
(get-globalvariable("Global\DomainNetBIOS")).value
}
... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Assign-ReplicateDirChanges.ps1 | Assign-ReplicateDirChanges.ps1 | Param(
[string] $scriptPath,
[string] $identity
)
#################################################################################################
# Author: Marina Krynina and some local and others server
# Desc: Assigns an account replicate directory changes permission in AD
# This is requi... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/UninstallProgram.ps1 | UninstallProgram.ps1 | # Mandatory heading
#########################################################################
# Author: Stiven Skoklevski, CSC
# Uninstall a program
#########################################################################
function UninstallProgram([string] $appToUninstall)
{
log "INFO: Uninstall... $appT... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/FilesUtility.ps1 | FilesUtility.ps1 | #########################################################################
# Author: Marina Krynina, CSC
# Updates:
# 2014-11-12 Added new functions DeployAppFiles, Extract
#########################################################################
###########################################################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_CreateSQLAlias.ps1 | debug_CreateSQLAlias.ps1 | # Author: Marina Krynina
#################################################################################################
try
{
# get current script location
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$scriptName = $MyInvocation.MyCommand.Name
$SQLASLIAS_XML = "\Conf... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Execute-CreateSQLAlias.ps1 | Execute-CreateSQLAlias.ps1 | Param(
[string] $scriptPath
)
#################################################################################################
# Author: Marina Krynina
#################################################################################################
function CheckForError
{
# check if error.txt exists.... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Set-VolumeLabel.ps1 | Set-VolumeLabel.ps1 | # Set-VolumeLabel.ps1
#########################################################################
# Author: Stiven Skoklevski,
# Rename the disk label.
# Eg of parameter:
# $DISKLABELS = "E;Application,F;PageFile,"
# The above example will set Drive E label to Appplication and Drive F label to Pagefile
######... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Execute-InstallSoftwarePatches.ps1 | Execute-InstallSoftwarePatches.ps1 | Param(
[string] $scriptPath
)
# Author: Stiven Skoklevski
function Execute-InstallSoftwarePatches([xml] $xmlinput)
{
$nodes = $xmlinput.SelectNodes("//InstallSet/Install")
if (([string]::IsNullOrEmpty($nodes)))
{
log "INFO: No patches to install in: '$inputFile'"
return 0
... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Logging.ps1 | Logging.ps1 | #########################################################################
# Author: Marina Krynina, CSC
# Updates:
# 2014-11-12 Added header block
# Added echo in the log function
# 2015-01-22 Replaced "echo" with Write-Host as "echo" pollutes return codes
######################... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_ExtractAppFiles.ps1 | debug_ExtractAppFiles.ps1 | # MWS2R2 - Extract App Files ###############################################################
# Author: Marina Krynina
# Desc: Extracts application files (ISO, ZIP)
############################################################################################
# Mandatory heading
# Load Common functions
. .\Globa... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Execute-InstallSoftwarePreRequisites.ps1 | Execute-InstallSoftwarePreRequisites.ps1 | Param(
[string] $scriptPath
)
# Author: Marina Krynina
function Execute-InstallSoftwarePrereqs([xml] $xmlinput)
{
$nodes = $xmlinput.SelectNodes("//InstallSet/Install")
if (([string]::IsNullOrEmpty($nodes)))
{
log "INFO: No prerequisites to install configured in: '$inputFile'"
... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/New-RandomPassword.ps1 | New-RandomPassword.ps1 | function New-RandomPassword {
<#
.Synopsis
Generates one or more complex passwords designed to fulfill the requirements for Active Directory
.DESCRIPTION
Generates one or more complex passwords designed to fulfill the requirements for Active Directory
.EXAMPLE
New-RandomPassw... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Install-SoftwarePatches.ps1 | Install-SoftwarePatches.ps1 | Param(
[string] $scriptPath,
[string] $installFile,
[string] $arguments
)
# Author: Stiven Skoklevski
############################################################################################
# Main
############################################################################################
# Load ... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Set-PageFile.ps1 | Set-PageFile.ps1 | # Set-PageFile.ps1
#########################################################################
# Author: Stiven Skoklevski,
# Remove the existing PageFile and replace with new PageFile as per parameters
# Reboot is not required if moving to new drive for first time.
# If updating existing PageFile configuration than... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Set-EnvironmentVariables.ps1 | Set-EnvironmentVariables.ps1 | # Set-EnvironmentVariables.ps1
#########################################################################
# Author: Marina Krynina,
# Set environment variables.
# Eg of parameter:
# $ENVVARIABLES = "AppDrive~E:|LogDrive~L:|"
# The above example will create AppDrive machine environment variable
# with va... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_ExecuteSoftwarePrereqs.ps1 | debug_ExecuteSoftwarePrereqs.ps1 | # Author: Marina Krynina
############################################################################################
try
{
write-host "INFO: Start Execute-CommonBase"
# get current script location
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
. .\Execute-InstallSof... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/Get-IniContent.ps1 | Get-IniContent.ps1 | Function Get-IniContent
{
<#
.Synopsis
Gets the content of an INI file
.Description
Gets the content of an INI file and returns it as a hashtable
.Notes
Author : Oliver Lipkau <oliver@lipkau.net>
Blog : http://oliver.lipkau.... |
PowerShellCorpus/Github/sskoklev_Structure2/POC/Common/debug_GetAppFiles.ps1 | debug_GetAppFiles.ps1 | # MWS2 - Get App Files ##############################################################
# Author: Marina Krynina
# Desc: Deploys installation files onto the target server
############################################################################################
# Load Common functions
. .\GlobalRepository.ps1
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.