full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/UndPat_LojaQuiron/Quiron.LojaVirtual/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/joeflack4_SCC-File-Renamer/fileRenamerWithPrompts.ps1 | fileRenamerWithPrompts.ps1 | ## ####################################
## Tasks
## ####################################
## * Research
## - Rename files in bulk https://www.google.com/search?q=how+to+change+a+filename+in+powershell&ie=utf-8&oe=utf-8
## - Regex https://www.youtube.com/watch?v=tjtOhZ6hq80
## - Power Tab
## #############... |
PowerShellCorpus/Github/joeflack4_SCC-File-Renamer/fileRenamer.ps1 | fileRenamer.ps1 | ## ####################################
## Tasks
## ####################################
## * Research
## - Rename files in bulk https://www.google.com/search?q=how+to+change+a+filename+in+powershell&ie=utf-8&oe=utf-8
## - Regex https://www.youtube.com/watch?v=tjtOhZ6hq80
## - Power Tab
## #############... |
PowerShellCorpus/Github/letsboogey_smbcluster/smbcluster.ps1 | smbcluster.ps1 | <#
.SYNOPSIS
Creates a Windows Server 2012R2 SMB3 failover cluster
.DESCRIPTION
This script automates the creation of a Windows Server 2012R2
failover cluster and configures it to use SMB3 storage
.PARAMETER XenServerHost
The XenServer host to connect to
.PA... |
PowerShellCorpus/Github/rostalof_carBooking/CarHire/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/rostalof_carBooking/CarHire/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/EntityFramework.6.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/EntityFramework.6.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/WebGrease.1.5.2/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Visual Studio execution done via NuGet Package Manager
Function VSExecution($toolsPath, $project)
{
$project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty)
# Get the msbuild version of the project and add the import
$msbuild = [Microsof... |
PowerShellCorpus/Github/Caddisflyrob_MVC-Movies/C#-Movie Website/packages/WebGrease.1.5.2/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# Return a relative path with reference to root as Uri object
# $rootPath - root path
# $relativePath - relative path
# $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine()
Function GetRelativeUri($root... |
PowerShellCorpus/Github/gerane_PowerShell/Setup-PSCoreRemoting.ps1 | Setup-PSCoreRemoting.ps1 | [Cmdletbinding(DefaultParameterSetName='Install')]
param
(
[parameter(ParameterSetName='Install')]
[Switch]$InstallPSCore,
[parameter(ParameterSetName='Install')]
[Version]$PSCoreVersion,
[parameter(ParameterSetName='Uninstall')]
[Switch]$UninstallPSCore,
[parameter(Parame... |
PowerShellCorpus/Github/gerane_PowerShell/Examples/VariableValidation.ps1 | VariableValidation.ps1 | # Variable Validation Outside of Parameters
## ValidateRange
[ValidateRange(1,10)][int]$ValidateRange = 1
$ValidateRange = 3
$ValidateRange = 11
## ValidateSet
[ValidateSet('Test1','Test2','Test3')][string]$ValidateSet = 'Test1'
$ValidateSet = 'Test2'
$ValidateSet = 'Test4'
## ValidateNotNullOrEmpty
[Vali... |
PowerShellCorpus/Github/gerane_PowerShell/scripts/Get-UpdatedDrivers.ps1 | Get-UpdatedDrivers.ps1 | <#
.SYNOPSIS
This script exports drivers that have been updated by Windows Update
.DESCRIPTION
This script exports drivers that have been updated by Windows Update
.PARAMETER DeleteNonUpdated
Switch to specify whether you want to delete the Drivers that were exported and were not Updated by Windows Up... |
PowerShellCorpus/Github/delliott8990_ADFunctions/MigrateUser.ps1 | MigrateUser.ps1 | $date = Get-Date -Format "yyyy-MM-dd"
$user = Read-Host "Username:"
#$pc = Read-Host "PC Name:"
$userLpath = "C:\users\$user\"
$picPath = "C:\users\$user\Pictures"
$userSpath = "\\server01\Home\$user\LocalPC-$date"
$sourceList = ("$userLPath\Desktop","$userLPath\Downloads","$userLPath\Favorites","$userLPath\Docum... |
PowerShellCorpus/Github/delliott8990_ADFunctions/QuickOnBoard.ps1 | QuickOnBoard.ps1 | import-module activedirectory
Function loadGUI {
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objForm = New-Object System.Windows.Forms.Form
$objForm.Text = "Move PC to OU"
$objForm.Size = New-Obje... |
PowerShellCorpus/Github/delliott8990_ADFunctions/BaselineInstaller.ps1 | BaselineInstaller.ps1 | #McAfee
function installMcafee {
write-host "Installing McAfee EPO Agent" | Out-File $logName -Append
$Directory = "\\server02\installs\mcafee\epo-agent"
$FullDir = "$Directory\Setup.exe "
try{
start-process $FullDir -wait -ErrorAction Stop
}
catch{
write-host "EPO A... |
PowerShellCorpus/Github/delliott8990_ADFunctions/MoveOU.ps1 | MoveOU.ps1 | import-module activedirectory
Function Move-OU {
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objForm = New-Object System.Windows.Forms.Form
$objForm.Text = "Move PC to OU"
$objForm.Size = New-Obje... |
PowerShellCorpus/Github/delliott8990_ADFunctions/MapCurrentUserDrive.ps1 | MapCurrentUserDrive.ps1 | import-module ActiveDirectory
$Username = [Environment]::UserName
$FullPath = "\\Server\UsersDir\UserDrive" + $Username
net use J: $FullPath /Persistent:Yes |
PowerShellCorpus/Github/v-peliao_E2E_NewRepo_1489644518839/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/bgelens_EL2015/03_AADSC/04_LinuxOnboard.ps1 | 04_LinuxOnboard.ps1 | $SolutionDir = $DTE.ActiveDocument.Path
Start-Process -FilePath "$SolutionDir\putty.exe" -ArgumentList '-ssh','ben@el201504.westeurope.cloudapp.azure.com'
<# SSH
wget https://github.com/bgelens/EL2015/raw/master/DSCLinux/dsc-1.1.0-466.ssl_100.x64.rpm
wget https://github.com/bgelens/EL2015/raw/master/DSCLinux/omi-... |
PowerShellCorpus/Github/bgelens_EL2015/03_AADSC/05_ARMTemplateOnboard.ps1 | 05_ARMTemplateOnboard.ps1 | #start microsoft-edge:https://github.com/bgelens/EL2015/tree/master/DSCExtOnboardiing
$RG = Get-AzureRmResourceGroup -Name 'EL201503'
$DSCParams = @{
ResourceGroupName = $RG.ResourceGroupName
Location = 'West Europe'
TemplateFile = "$($dte.ActiveDocument.Path)05-AzureDeploy.json"
Mode = 'Increme... |
PowerShellCorpus/Github/bgelens_EL2015/03_AADSC/02_OnboardWindowsNode.ps1 | 02_OnboardWindowsNode.ps1 | $SolutionDir = $DTE.ActiveDocument.Path
# // show onboard from Portal UI
#region Download Onboard Meta MOF
$AAAccount | Get-AzureRmAutomationDscOnboardingMetaconfig -OutputFolder $SolutionDir -Force
ii $SolutionDir\DscMetaConfigs\localhost.meta.mof
#endregion Download Onboard Meta MOF
#region construct Onbo... |
PowerShellCorpus/Github/bgelens_EL2015/03_AADSC/03_AddAndCompileConfig.ps1 | 03_AddAndCompileConfig.ps1 | $SolutionDir = $DTE.ActiveDocument.Path
#region go to PowerShell Gallery
start microsoft-edge:http://powershellgallery.com/
$AAAccount | Get-AzureRmAutomationModule -Name xCredSSP
#endregion go to PowerShell Gallery
#region config for EL201502
{
configuration CredSSP {
Import-DscResource -ModuleName PSD... |
PowerShellCorpus/Github/bgelens_EL2015/03_AADSC/01_AAAccount.ps1 | 01_AAAccount.ps1 | $AAAccountName = 'EL2015AA'
#region Create AA Account
$AARG = New-AzureRmResourceGroup -Name $AAAccountName -Location 'westeurope'
$AAAccount = $AARG | New-AzureRmAutomationAccount -Name $AAAccountName -Plan Free
$AAAccount
#endregion Create AA Account
#region Show AA Keys
$AAAccount | Get-AzureRmAutomationR... |
PowerShellCorpus/Github/bgelens_EL2015/02_DSCExtension/01-ConfigWithPowerShell.ps1 | 01-ConfigWithPowerShell.ps1 | $DSCExtensionPath = $DTE.ActiveDocument.Path
#region Create configuration.ps1
{
Configuration WebSite {
Import-DscResource -Module PSDesiredStateConfiguration
Import-DscResource -Module xWebAdministration
WindowsFeature IIS {
Ensure = 'Present'
Name = 'Web-Se... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/Towno100_MVC_Git/MVCPractice/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/russellseymour_azure-devtest-env/Deploy.ps1 | Deploy.ps1 | $companyPrefix = "cust-devtest-poc"
$devVNETResourceGroup = $companyPrefix + '-dev-net'
$devVNETVirtualNetworkName = $devVNETResourceGroup
$location = 'North Europe'
$secPwd = ConvertTo-SecureString "P@ssw0rd!" -AsPlainText -Force
#Create the developer network and associated resource group
New-AzureResourceGrou... |
PowerShellCorpus/Github/russellseymour_azure-devtest-env/UsefulCmds.ps1 | UsefulCmds.ps1 | Get-AzureVM | Format-Table -Property Name, @{Label = "vmSize"; Expression = {$_.HardwareProfile.VirtualMachineSize}}
Get-AzureVM | Stop-AzureVM -Force -Verbose
Get-AzureVM | Format-Table -Property Name, ProvisioningState
Get-AzureNetworkInterface | Sort-Object -Property "Name" | Format-Table -Property ResourceGrou... |
PowerShellCorpus/Github/russellseymour_azure-devtest-env/BootstrapPOSHChef.ps1 | BootstrapPOSHChef.ps1 |
<#
.SYNOPSIS
Installs, configures and executes POSHChef
.DESCRIPTION
Script to install and configure POSHChef before initially running it.
The purpose of this script is to bootstrap a Windows Azure machine with POSHChef and
its necessary modules
#>
[CmdletBinding()]
param (
[... |
PowerShellCorpus/Github/russellseymour_azure-devtest-env/03-az-dns-srv/ConfigureSecondaryDNSZone.ps1 | ConfigureSecondaryDNSZone.ps1 | Configuration ConfigureSecondaryZone
{
param ($MachineName)
Node $MachineName
{
#Install the DNS Role
WindowsFeature DNSFeature
{
Ensure = "Present"
Name = "DNS"
}
WindowsFeature DNSTools
{
Ensure = "Present"
Name = "RSAT-DN... |
PowerShellCorpus/Github/russellseymour_azure-devtest-env/03-az-dns-srv/ConfigurePrimaryDnsZone.ps1 | ConfigurePrimaryDnsZone.ps1 | Configuration ConfigurePrimaryZone
{
param ($MachineName)
Node $MachineName
{
#Install the DNS Role
WindowsFeature DNSFeature
{
Ensure = "Present"
Name = "DNS"
}
WindowsFeature DNSTools
{
Ensure = "Present"
Name = "RSAT-DNS-Server"
DependsOn ... |
PowerShellCorpus/Github/HdeJonge_PapaBob/PapaBob/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/HdeJonge_PapaBob/PapaBob/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/HdeJonge_PapaBob/PapaBob/packages/jQuery.2.1.4/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/HdeJonge_PapaBob/PapaBob/packages/jQuery.2.1.4/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/HdeJonge_PapaBob/PapaBob/packages/jQuery.2.1.4/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/Azure_azure-docs-cli-python.nl-nl/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source url: ... |
PowerShellCorpus/Github/NHoppe_VolunteerScheduler/AspNetWithAngularJS/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/NHoppe_VolunteerScheduler/AspNetWithAngularJS/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/NHoppe_VolunteerScheduler/AspNetWithAngularJS/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/NHoppe_VolunteerScheduler/AspNetWithAngularJS/packages/EntityFramework.6.1.1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/NHoppe_VolunteerScheduler/AspNetWithAngularJS/packages/EntityFramework.6.1.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/MathieuBuisson_DeploymentReadinessChecker/ReadinessValidationScript/Example.Tests.ps1 | Example.Tests.ps1 | #Requires -Modules 'Pester'
<#
PURPOSE: Pester script to validate that a machine meets the prerequisites for a software deployment/upgrade.
It generates a NUnit-style test result file for each computer and a summary report in HTML format.
This script is designed to be run remotely (not from the target m... |
PowerShellCorpus/Github/MathieuBuisson_DeploymentReadinessChecker/Tests/Unit/DeploymentReadinessChecker.Tests.ps1 | DeploymentReadinessChecker.Tests.ps1 | Import-Module "$($PSScriptRoot)\..\..\DeploymentReadinessChecker.psd1" -Force
$ModuleName = 'DeploymentReadinessChecker'
$OutputPath = 'TestDrive:\OutputFolder'
$ComputerNames = 'Computer1','Computer2','Computer3'
$ScriptInfo = Get-Command (Get-ChildItem -Path "$PSScriptRoot\..\..\ReadinessValidationScript\" -Filte... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Examples/Sample_cNtfsPermissionsInheritance.ps1 | Sample_cNtfsPermissionsInheritance.ps1 | <#
.SYNOPSIS
Disable NTFS permissions inheritance.
.DESCRIPTION
This example shows how to use the cNtfsPermissionsInheritance DSC resource to disable NTFS permissions inheritance.
#>
Configuration Sample_cNtfsPermissionsInheritance
{
param
(
[Parameter(Mandatory = $false)]
[... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Examples/Sample_cNtfsPermissionEntry.ps1 | Sample_cNtfsPermissionEntry.ps1 | <#
.SYNOPSIS
Assign NTFS permissions.
.DESCRIPTION
This example shows how to use the cNtfsPermissionEntry DSC resource to assign NTFS permissions.
#>
Configuration Sample_cNtfsPermissionEntry
{
param
(
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[Stri... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Tests/Unit/cNtfsPermissionEntry.Tests.ps1 | cNtfsPermissionEntry.Tests.ps1 | #requires -Version 4.0 -Modules Pester, CimCmdlets
$Global:DSCModuleName = 'cNtfsAccessControl'
$Global:DSCResourceName = 'cNtfsPermissionEntry'
#region Header
$ModuleRoot = Split-Path -Path $Script:MyInvocation.MyCommand.Path -Parent | Split-Path -Parent | Split-Path -Parent
if (
(-not (Test-Path -... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Tests/Unit/cNtfsPermissionsInheritance.Tests.ps1 | cNtfsPermissionsInheritance.Tests.ps1 | #requires -Version 4.0 -Modules Pester
$Global:DSCModuleName = 'cNtfsAccessControl'
$Global:DSCResourceName = 'cNtfsPermissionsInheritance'
#region Header
$ModuleRoot = Split-Path -Path $Script:MyInvocation.MyCommand.Path -Parent | Split-Path -Parent | Split-Path -Parent
if (
(-not (Test-Path -Path ... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Tests/Integration/cNtfsPermissionEntry.Integration.Tests.ps1 | cNtfsPermissionEntry.Integration.Tests.ps1 | #requires -Version 4.0 -Modules Pester
$Global:DSCModuleName = 'cNtfsAccessControl'
$Global:DSCResourceName = 'cNtfsPermissionEntry'
#region Header
$ModuleRoot = Split-Path -Path $Script:MyInvocation.MyCommand.Path -Parent | Split-Path -Parent | Split-Path -Parent
if (
(-not (Test-Path -Path (Join-P... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Tests/Integration/cNtfsPermissionEntry.Config.ps1 | cNtfsPermissionEntry.Config.ps1 | #requires -Version 4.0
$TestParameters = [PSCustomObject]@{
Ensure = 'Present'
Path = (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([Guid]::NewGuid().Guid))
Principal = 'BUILTIN\Users'
}
Configuration cNtfsPermissionEntry_Config
{
Import-DscResource -ModuleName cNtfsAccessCo... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Tests/Integration/cNtfsPermissionsInheritance.Integration.Tests.ps1 | cNtfsPermissionsInheritance.Integration.Tests.ps1 | #requires -Version 4.0 -Modules Pester
$Global:DSCModuleName = 'cNtfsAccessControl'
$Global:DSCResourceName = 'cNtfsPermissionsInheritance'
#region Header
$ModuleRoot = Split-Path -Path $Script:MyInvocation.MyCommand.Path -Parent | Split-Path -Parent | Split-Path -Parent
if (
(-not (Test-Path -Path ... |
PowerShellCorpus/Github/SNikalaichyk_cNtfsAccessControl/Tests/Integration/cNtfsPermissionsInheritance.Config.ps1 | cNtfsPermissionsInheritance.Config.ps1 | #requires -Version 4.0
$TestParameters = [PSCustomObject]@{
Path = (Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([Guid]::NewGuid().Guid))
Enabled = $false
PreserveInherited = $true
}
Configuration cNtfsPermissionsInheritance_Config
{
Import-DscResource -ModuleName cNtfsAcces... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Newtonsoft.Json.5.0.8/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Newtonsoft.Json.6.0.8/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWin... |
PowerShellCorpus/Github/borisovn_Cloud-Computing-CSS490FALL/PaaS_Cloud_Service/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/argiesen_Get-CsAdPrep/Get-CsAdPrep.ps1 | Get-CsAdPrep.ps1 | #Validate OS
if((Get-WMIObject -Class Win32_OperatingSystem).Caption -match "Server (2008 R2|2012|2012 R2|2016)"){
Write-Host "Operating System" -ForegroundColor Green
}else{
Write-Host "Operating System" -ForegroundColor Red
}
#Validate PS version is 3.0 or greater
if ($PSVersionTable.PSVersion -ge "3.0"){
... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/5. Workflow/Find-WFFeature.ps1 | Find-WFFeature.ps1 | if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
[PSObject[]]$global:resultsarray = @()
#name of the feature we are looking for
[string]$ns2Find = "DP.Sharepoint"
#Output File Prefix
$outfile = "WFFeature"
Clear-Hos... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/5. Workflow/Find-2013WF.ps1 | Find-2013WF.ps1 | #Add the SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#FileName
$outfile = "2013Workflows"
$fileName = ".\logs\$outfile-" + $(Get-Date -Format "yyyyMMddHHmmss") + ".csv"
#Output Array
[PSObject[]]$resultsarray = @()
Clear-Host
$WebApplications =... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/2. Customizations/Find-CustomSiteDefinitions.ps1 | Find-CustomSiteDefinitions.ps1 | #Add the SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
function Get-InstalledSiteDefinitions {
param (
[int] $lang = 1033
)
if ($lang -eq $NULL) {
$lang = 1033;
}
$path = [Microsoft.SharePoint.Utilities.SP... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/2. Customizations/Find-CustomFields.ps1 | Find-CustomFields.ps1 | $verbose = $false
$verboseLogs = $false
Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
cls
#$ErrorActionPreference = "Continue"
#FileName
$outfile = "column"
$fileName = ".\logs\$outfile-" + $(Get-Date -Format "yyyyMMddHHmmss") + ".csv"
#Field Exclude List
$fieldExcludeList ... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/2. Customizations/Find-MissingFeature.ps1 | Find-MissingFeature.ps1 | #http://get-spscripts.com/2011/06/removing-features-from-content-database.html
function Remove-SPFeatureFromContentDB($ContentDb, $FeatureId, [switch]$ReportOnly)
{
$db = Get-SPDatabase | where { $_.Name -eq $ContentDb }
[bool]$report = $false
if ($ReportOnly) { $report = $true }
$db.Sit... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/2. Customizations/Find-MissingWebPart.ps1 | Find-MissingWebPart.ps1 | #http://get-spscripts.com/2011/08/diagnose-missingwebpart-and.html
function Run-SQLQuery ($SqlServer, $SqlDatabase, $SqlQuery)
{
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Server =" + $SqlServer + "; Database =" + $SqlDatabase + "; Integrated Securit... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/2. Customizations/Find-MissingSetupFile.ps1 | Find-MissingSetupFile.ps1 | #http://get-spscripts.com/2011/06/diagnosing-missingsetupfile-issues-from.html
function Run-SQLQuery ($SqlServer, $SqlDatabase, $SqlQuery)
{
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
$SqlConnection.ConnectionString = "Server =" + $SqlServer + "; Database =" + $SqlDatabase + "; Integrat... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/TechNet/Report-CliXML.ps1 | Report-CliXML.ps1 | #Import and Report
$aams = Import-Clixml .\Get-SPAlternateURL.xml
$aams
$aams | Ft
$aams | %{$_.Collection.DisplayName} |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/TechNet/Document-SPFarmConfiguration.ps1 | Document-SPFarmConfiguration.ps1 | ##
## https://technet.microsoft.com/en-us/library/ff645391.aspx
##
## Common SharePoint configuration settings
## Resore With Import-Clixml .\Get-SPAlternateURL.xml
## Import-Clixml .\Get-SPAlternateURL.xml | %{$_.Uri}
## Import-Clixml .\Get-SPAlternateURL.xml | %{$_.Uri | Get-Member}
##
Add-PSSnapin Microsof... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/PoSh Reporting/Audit-SPFarm.ps1 | Audit-SPFarm.ps1 | #Audit Farm
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Audit Farm
Clear-Host
$outfile = ".\Logs\Audit-Farm.csv"
$minBuild = "15.0.4481.1005"
#Write the CSV header
"Config DB `tBuild Version `tServers `tOutbound Email `tAuthentication Realm" > $outfile
$farm = Get-SPFarm
$... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/PoSh Reporting/Audit-SPWebApplication.ps1 | Audit-SPWebApplication.ps1 | #Audit Web Apps
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Audit Sites
Clear-Host
$webappoutfile = ".\logs\Audit-WebApplications.csv"
"Web Application `tEmail Server `tManaged Paths `tContent DB Count `tApplication Pool `tClaims `tAAM Count" > $webappoutfile
$cdboutfile = ".\l... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/PoSh Reporting/Test-SPContentDatabases.ps1 | Test-SPContentDatabases.ps1 | #Test All Content Databases
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#
Clear-Host
$outfile = ".\logs\Test-SPContentDBs.csv"
$orphancheck = $true
$dbskip = "SharePoint_Content_Intranet_02" #, "SharePoint_2013_Content_Intranet"
#Write the CSV header
"Web Application `tContent D... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/PoSh Reporting/Audit-SSA.ps1 | Audit-SSA.ps1 | #Search Service App
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Clear-Host
$ssaoutfile = ".\logs\Audit-SearchService.csv"
$ssacsoutfile = ".\logs\Audit-SearchServiceContent.csv"
#Write the CSV header
"Name `tSearch Center URL `tDefault Content Access Account `tIndex Location" ... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/PoSh Reporting/Audit-AllSSSApplications.ps1 | Audit-AllSSSApplications.ps1 | Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Clear-Host
$outfile = ".\logs\Audit-SecureStore.csv"
#Write the CSV header
"Application Name `tDisplay Name `tApp Type `tCredential Type `tUser Name `tPassword" > $outfile
$context = Get-SPServiceContext -Site http://greyhound:2013
... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/PoSh Reporting/Audit-SPSites.ps1 | Audit-SPSites.ps1 | #Add the SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Audit Sites
Clear-Host
$outfile = ".\logs\Audit-SiteCollections.csv"
#Write the CSV header
"Site Collection `tSite Title `tOwner Email `tRoot Template `tCompatibility Level `tContent DB `tHNSC `tWe... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/Visio Reporting/Draw-Sitemap.ps1 | Draw-Sitemap.ps1 | #Add the SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
Import-Module Visio -ErrorAction SilentlyContinue
cls
#Templates: C:\Program Files (x86)\Microsoft Office\Office15\Visio Content\1033
function Draw-SubSites($web, $parent)
{
#$web = Get-SPWeb ... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/1. Configuration/Visio Reporting/Draw-Farm.ps1 | Draw-Farm.ps1 | #Add the SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Add the Visio module from https://github.com/saveenr
Import-Module Visio -ErrorAction SilentlyContinue
$ErrorActionPreference = "Continue"
cls
function Draw-Webapps($webapp, $parent)
{
#$web ... |
PowerShellCorpus/Github/MatthewMcD_SPUpgrade/FarmAudit/6. External Dependencies/Get-ExternalLists.ps1 | Get-ExternalLists.ps1 | #Add the SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#FileName
$outfile = "ExternalLists"
$fileName = ".\logs\$outfile-" + $(Get-Date -Format "yyyyMMddHHmmss") + ".csv"
#Output Array
[PSObject[]]$resultsarray = @()
foreach($webApp in $WebApplicati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.