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
#Specify the directory location to export files | |
$dirName = "c:\spbackups" | |
if(!(Test-Path $dirName)){ | |
New-Item -Path $dirName -ItemType Directory -Force | |
} | |
Write-Output Exporting solutions to $dirName | |
foreach ($solution in Get-SPSolution) |
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
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") | |
$publish = New-Object System.EnterpriseServices.Internal.Publish | |
$publish.GacInstall("F:\Dlls for FBA\Metavrse.SharePoint.SyncLib.dll") |
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
#Login into Microsoft Azure | |
add-azureaccount |
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
#Set default storage account for current azure subscription | |
Set-AzureSubscription -SubscriptionId <your subscription id> -CurrentStorageAccountName "qastoragenortheurope" |
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
#Create a new storage account, if not already having one | |
$storageAccountName = "qastoragenortheurope" | |
$storageAccountLocation = "north europe" | |
$storageAccountType = "Standard_LRS" | |
New-AzureStorageAccount -StorageAccountName $storageAccountName -Location $storageAccountLocation -Type $storageAccountType |
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
$imageName = Get-AzureVMImage | | |
where { $_.ImageFamily -eq $imageFamily } | | |
sort PublishedDate -Descending | | |
select -ExpandProperty ImageName -First 1 |
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
#create quick azure vm | |
$adminUser = "itadmin" | |
$password = "itadmin@123" | |
$serviceName = "metavrsewebqa" | |
$location = "north europe" | |
$size = "Small" | |
$vmName = "metavrse-web-01" | |
$imageFamily = "Windows Server 2012 R2 Datacenter" | |
New-AzureQuickVM -Windows ` |
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
#Login into Microsoft Azure | |
add-azureaccount | |
#Create a new storage account, if not already having one | |
$storageAccountName = "qastoragenortheurope" | |
$storageAccountLocation = "north europe" | |
$storageAccountType = "Standard_LRS" | |
New-AzureStorageAccount -StorageAccountName $storageAccountName ` | |
-Location $storageAccountLocation ` | |
-Type $storageAccountType |
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
# This script is used in a blog post on the https://mohitgoyal.co/2017/04/16/read-multi-line-input-from-users-in-powershell/. Please | |
# read the blog post for more information | |
function Read-MultiLineInputBoxDialog([string]$Message, [string]$WindowTitle, [string]$DefaultText) | |
{ | |
Add-Type -AssemblyName System.Drawing | |
Add-Type -AssemblyName System.Windows.Forms | |
# Create the Label. | |
$label = New-Object System.Windows.Forms.Label |
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
#this command configure firewall to accept incoming tcp connections on port 80 | |
firewall-cmd --zone=public --permanent --add-port=80/tcp | |
firewall-cmd --reload |
OlderNewer