full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/SQL2012SP2Ent/ExecuteWindowsUsers.ps1
ExecuteWindowsUsers.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/Production/SQL2012SP2Ent/ExecuteSPNs.ps1
ExecuteSPNs.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/Production/SQL2012SP2Ent/ConfigureSQLWindows.ps1
ConfigureSQLWindows.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows ################################################################################################# try { $scriptPath = $env:USERPROFILE...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/SQL2012SP2Ent/ExecuteWindowsCluster.ps1
ExecuteWindowsCluster.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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...
PowerShellCorpus/Github/sskoklev_Structure2/Production/SQL2012SP2Ent/ExecutePreStageClusterADObjects.ps1
ExecutePreStageClusterADObjects.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows Cluster ################################################################################################# . .\FilesUtility.ps1 . .\Variabl...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/SQL2012SP2Ent/ExecuteApplySCCMRequirements.ps1
ExecuteApplySCCMRequirements.ps1
################################################################################################# # Author: Stiven Skoklevski # Desc: Functions to support preparation of Windows ################################################################################################# . .\FilesUtility.ps1 . .\VariableUtility...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/SQL2012SP2Ent/Install/ApplySCCMRequirements.ps1
ApplySCCMRequirements.ps1
Param( [string] $scriptPath ) ######################################################################### # Author: Stiven Skoklevski, CSC # Apply SCCM requirements ######################################################################### ####################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/SharePoint2013/debug_ConnectToWAC2013.ps1
debug_ConnectToWAC2013.ps1
# MWS2R2 - ConnectToWAC2013 ################################################################## # Author: Marina Krynina ################################################################################################# # \USER_PROFILE # \Install # \Config # \InstallMedia # \OWA...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/SharePoint2013/ManualPatchingScripts/SharePoint_CreateNewWOPIBinding.ps1
SharePoint_CreateNewWOPIBinding.ps1
New-SPWOPIBinding –ServerName "OfficeApps.MWSAust.Net"
PowerShellCorpus/Github/sskoklev_Structure2/Production/SharePoint2013/ManualPatchingScripts/SharePoint_RemoveWOPIBinding.ps1
SharePoint_RemoveWOPIBinding.ps1
Remove-SPWOPIBinding –Server "OfficeApps.MWSAust.Net"
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/SharePoint2013/Config/Set-PeoplePickerSearchADForests.ps1
Set-PeoplePickerSearchADForests.ps1
Param( [string] $scriptPath, [string] $trustingDomain, [string] $trustedDomainsList ) ############################################################################################ # Main # Author: Marina Krynina ##########################################################################################...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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/Production/Common/Install-SoftwarePreRequisites.ps1
Install-SoftwarePreRequisites.ps1
Param( [string] $scriptPath, [string] $installFile, [string] $arguments ) # Author: Marina Krynina ############################################################################################ # Main ############################################################################################ # Load Com...
PowerShellCorpus/Github/sskoklev_Structure2/Production/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/Production/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/Production/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/Production/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/Production/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/Production/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 ...