This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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\Windows\CurrentVersion\Uninstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-host ========= SQL Server Ports =================== | |
Write-host Enabling SQLServer default instance port 1433 | |
#netsh firewall set portopening TCP 1433 "SQLServer" | |
New-NetFirewallRule -DisplayName "Allow inbound TCP Port 1433" –Direction inbound –LocalPort 1433 -Protocol TCP -Action Allow | |
New-NetFirewallRule -DisplayName "Allow outbound TCP Port 1433" –Direction outbound –LocalPort 1433 -Protocol TCP -Action Allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#begin | |
# Update with the name of your subscription. | |
$SubscriptionName="YourSubscriptionName" | |
# Give a name to your new storage account. It must be lowercase! | |
$StorageAccountName="yourstorageaccountname" | |
# Choose "West US" as an example. | |
$Location = "West US" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Creates a new cabinet .CAB file on disk. | |
.DESCRIPTION | |
This cmdlet creates a new cabinet .CAB file using MAKECAB.EXE and adds | |
all the files specified to the cabinet file itself. | |
.PARAMETER Name | |
The output file name of the cabinet .CAB file, such as MyNewCabinet.cab. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$IndexLocation = "d:\index" | |
#$SearchSA = New-SPEnterpriseSearchServiceApplication -Name $SearchSAName -ApplicationPool $SaAppPoolName -DatabaseServer $SQLAliasName -DatabaseName $dbSearchDatabase | |
$SearchSA = Get-SPEnterpriseSearchServiceApplication | |
$SearchInstance = Get-SPEnterpriseSearchServiceInstance -Local | |
Write-Host "Defining the Search Topology…” | |
$InitialSearchTopology = $SearchSA | Get-SPEnterpriseSearchTopology -Active | |
$NewSearchTopology = $SearchSA | New-SPEnterpriseSearchTopology | |
Write-Host "Creating Admin Component…” |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var goBack = function() { | |
history.back(); | |
setTimeout(clickLink, 400); | |
} | |
var clickLink = function() { | |
var $element = jQuery('.yj-unread-item a:first'); | |
var $moreLink = jQuery('#moreButton button'); | |
if ($element.length) { | |
$element.click(); | |
setTimeout(goBack, 400); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Interface describing the members that the provider's service offers | |
interface IGreetingService { | |
getGreeting(): string; | |
} | |
// The following class represents the provider | |
class GreetingService implements ng.IServiceProvider { | |
private greeting = "Hello World!"; | |
// Configuration function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Network Load Balancing and Tools | |
Write-Host "Install Network Load Balancing and Tools" | |
Add-WindowsFeature NLB, RSAT-NLB | |
Import-Module NetworkLoadBalancingClusters | |
# If the cluster hasn't been created yet then create it | |
if (!(Get-NlbCluster -HostName $clusterIpAddress -ErrorAction SilentlyContinue)) | |
{ | |
Write-Host "Creating NLB Cluster: $clusterName" -ForegroundColor yellow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: Creates a ContentType hub site collection and configures the managed metadata service application | |
# | |
# hubURI: URL of the ContentType hub site collection (mandatory) | |
# hubOwner: Owner of the hub (default: current user) | |
# MMSAName: Name of the Managed Metadata service application (default: first found instance of MMS) | |
# Overwrite: Overwrites hub site collection if it already exists (default: false) | |
# Confrim: Confirm when existing hub is removed (default: true) | |
# | |
# Examples: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# ============================================================== | |
// | |
// 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. | |
// | |
// This sample assumes that you are familiar with the programming | |
// language being demonstrated and the tools used to create and debug | |
// procedures. Microsoft support professionals can help explain the |