full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Create-CCMContainer.ps1 | Create-CCMContainer.ps1 | <#
.SYNOPSIS
Creates the System Management Container in Active Directory for ConfigMgr installation
.DESCRIPTION
Script will create the AD Container System Management and assign permissions for the
SCCM Server
.PARAMETER ConfigMgrSrv
Allows the user to... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Set-VIAADDSRevDNSZone.ps1 | Set-VIAADDSRevDNSZone.ps1 | <#
Created: 2015-02-06
Version: 1.0
Author Mikael Nystrom
Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the author.
Author - Mikael Nystrom
Twitter: @mikael_nystrom
Blog : http://deploymentbunny.com
#>
[CmdletBinding(DefaultPa... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Set-VIARole-ADCA.ps1 | Set-VIARole-ADCA.ps1 | <#
.Synopsis
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
#>
[CmdletBinding(DefaultParameterSetName='Param Set 1',
SupportsShouldProcess=$true,
PositionalBin... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Set-VIARole-DHCP.ps1 | Set-VIARole-DHCP.ps1 | <#
.Synopsis
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
#>
[CmdletBinding(DefaultParameterSetName='Param Set 1',
SupportsShouldProcess=$true,
PositionalBin... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/New-VIAADStructure.ps1 | New-VIAADStructure.ps1 | <#
Created: 2015-02-06
Version: 1.0
Author Mikael Nystrom
Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the author.
Author - Mikael Nystrom
Twitter: @mikael_nystrom
Blog : http://deploymentbunny.com
#>
Param(
[parameter... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Invoke-VIAInstallAspNetMVC4Setup.ps1 | Invoke-VIAInstallAspNetMVC4Setup.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
Param (
[Parameter(Mandatory=$true,Position=0)]
$Setup
)
Write-Output "Install AspNetMVC4Setup"
$sArgument = " /q"
$Process = Start-Process $Setup -ArgumentList $sArgument -NoNewWindow -PassThru -Wait
$ExeExitCode = $Process.ExitCode
Write-Verbose "... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Invoke-VIAInstallReportViewer2008SP1.ps1 | Invoke-VIAInstallReportViewer2008SP1.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
Param (
[Parameter(Mandatory=$true,Position=0)]
$Source
)
Try
{
Write-Verbose "Installing $Source"
Start-Process -FilePath "$Source" -ArgumentList '/q' -Wait -NoNewWindow
}
Catch
{
$ErorMsg = $_.Exception.Message
... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Invoke-VIAInstallSCVM2016.ps1 | Invoke-VIAInstallSCVM2016.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
Param (
[Parameter(Mandatory=$true,Position=0)]
$SCVMSetup,
[Parameter(Mandatory=$true,Position=1)]
[ValidateSet("Full","Client","Agent")]
$SCVMRole = "Full",
[Parameter(Mandatory=$true,Position=2)]
$SCVMMDomain,
[Param... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Convert-VIAWIM2VHD.ps1 | Convert-VIAWIM2VHD.ps1 | Param(
[Parameter(mandatory=$True,HelpMessage="Name and path of Sourcefile.")]
[ValidateNotNullOrEmpty()]
[String]
[ValidateScript({Test-Path $_})]
$SourceFile,
[parameter(mandatory=$True,HelpMessage="Name and path of VHD(x) file.")]
[ValidateNotNullOrEmpty()]
[String]
$D... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Invoke-VIAInstallSCOM2016.ps1 | Invoke-VIAInstallSCOM2016.ps1 | <#
.SYNOPSIS
.DESCRIPTION
.EXAMPLE
#>
Param (
[Parameter(Mandatory=$true,Position=0)]
$SCOMSetup,
[Parameter(Mandatory=$true,Position=1)]
[ValidateSet("Default","Complete","OMServer","OMWebConsole","OMReporting","OMConsole")]
$SCOMRole = "Default",
[Parameter(Mandatory... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/TBAGet-VIAXMLData.ps1 | TBAGet-VIAXMLData.ps1 | Function Get-VIAXMLData{
<#
Get-VIAXMLData -VIAXMLdataFile C:\Setup\HYDv10\Settings\ViaMonstra\FASettings.xml
[XML]$XMLData = Get-Content -Path C:\Setup\HYDv10\Settings\ViaMonstra\FASettings.xml
$Networks = $XMLData.Fabric.Networks
#>
Param(
$VIAXMLdataFile
)
[XML]$XMLData = Get... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Set-VIARole-ADDS-FDC.ps1 | Set-VIARole-ADDS-FDC.ps1 | <#
Created: 2016-12-06
Version: 2.0
Author Mikael Nystrom
Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the author.
Author - Mikael Nystrom
Twitter: @mikael_nystrom
Blog : http://deploymentbunny.com
#>
[cmdletbinding(Support... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Enable-NestedHyperV.ps1 | Enable-NestedHyperV.ps1 | Function Enable-NestedHyperV{
Param(
$VMname
)
$VM = Get-VM -Name $VMname
$VMNic = Get-VMNetworkAdapter -VM $VM
$VMCPU = Get-VMProcessor -VM $VM
#Check if VM is saved
if($VM.State -eq 'Saved'){Write-Warning "$VMname is saved, needs to be off";BREAK}
#Check if V... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/New-NanoRefImage.ps1 | New-NanoRefImage.ps1 | #Mount C:\Setup\ISO\Windows Server 2016.iso
$WimFile = "C:\NanoServer\NanoServer.wim"
$VHDXFile = "C:\Setup\WS2016lab\VHD\WS2016N_UEFI.vhdx"
C:\Setup\ws2016lab\Scripts\Convert-VIAWIM2VHD.ps1 -SourceFile $WimFile -DestinationFile $VHDXFile -Disklayout UEFI -Index 1 -SizeInMB 5000 -Verbose
#Add Package to VHD
Moun... |
PowerShellCorpus/Github/DeploymentBunny_HYDv10/Scripts/Set-VIAADClientDNSSettings.ps1 | Set-VIAADClientDNSSettings.ps1 | <#
Created: 2015-02-06
Version: 1.0
Author Mikael Nystrom
Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the author.
Author - Mikael Nystrom
Twitter: @mikael_nystrom
Blog : http://deploymentbunny.com
#>
[CmdletBinding(Support... |
PowerShellCorpus/Github/rogergarrison_Sharepoint-Copy-UserPermissions/AllPermissionsAtoUser.ps1 | AllPermissionsAtoUser.ps1 | param(
[String]
$siteURL
,
[String]
$subSite
,
[String]
$fromUser
,
[String]
$toUser
)
# This script takes in 4 parameters, the site url, the particular sub site and 2 usernames
# it copies the permissions of "$fromUser" on the particular subsite to "$touser"
# I... |
PowerShellCorpus/Github/burasDiana_Terrarium/soap/packages/Microsoft.ApplicationInsights.WindowsServer.2.1.0/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
if ([System.IO.File]::Exists($project.FullName))
{
function MarkItemASCopyToOutput($item)
{
Try
{
#mark it to copy if newer
$item.Properties.Item("CopyToOutputDirectory").Value = 2
}
Catch
{
write-host $_.Exception.ToString()
}... |
PowerShellCorpus/Github/burasDiana_Terrarium/soap/packages/Newtonsoft.Json.9.0.1/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://www.newtonsoft.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindo... |
PowerShellCorpus/Github/burasDiana_Terrarium/soap/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/burasDiana_Terrarium/soap/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/komar9n_BuildingControl/BuildingControl/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/komar9n_BuildingControl/BuildingControl/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/lbouger_OctopusDeploy-ProjectScript/PsScripts/Log4NetTransform.ps1 | Log4NetTransform.ps1 | # Configuration #
$currentDirectory = $OctopusParameters["OctopusPackageDirectoryPath"]
$appenderName = $OctopusParameters["Log4Net.Appender"]
$logFilePath = $OctopusParameters["Log4Net.LogsFile"]
# Fin Configuration #
$logConfigFile = [IO.Path]::Combine($currentDirectory, 'Log4net.xml')
$logConfig = New-Obje... |
PowerShellCorpus/Github/lbouger_OctopusDeploy-ProjectScript/PsScripts/WebSiteTransform.ps1 | WebSiteTransform.ps1 | # Configuration #
$currentDirectory = $OctopusParameters["OctopusPackageDirectoryPath"]
$phoenixContractName = $OctopusParameters["ServicePhoenix.Name"]
$phoenixEndpointAddress = $OctopusParameters["ServicePhoenix.Url"]
$appcomContractName = $OctopusParameters["ServiceAppCom.Name"]
$appcomEndpointAddress = $O... |
PowerShellCorpus/Github/enckse_ps-proxy/proxy.ps1 | proxy.ps1 | # Port to listen on
$Port = 8080
$listen = New-Object system.net.HttpListener
$listen.Prefixes.Add("http://127.0.0.1:" + $Port + "/")
$listen.Start()
$continue = $true
while ($continue)
{
# Simply press any key and the nextrequest will exit the proxy
if( $host.ui.rawui.KeyAvailable )
{
$continue = $... |
PowerShellCorpus/Github/mormond_Powershell/stop_azure_v2_vms.ps1 | stop_azure_v2_vms.ps1 | <#
.SYNOPSIS
Connects to Azure and stops of all VMs in the specified Azure subscription or resource group
.DESCRIPTION
This runbook connects to Azure and stops all VMs in an Azure subscription or resource group.
You can attach a schedule to this runbook to run it at a specific time. Note that this runboo... |
PowerShellCorpus/Github/mormond_Powershell/start_azure_v2_vms.ps1 | start_azure_v2_vms.ps1 | <#
.SYNOPSIS
Connects to Azure and stops of all VMs in the specified Azure subscription or resource group
.DESCRIPTION
This runbook connects to Azure and stops all VMs in an Azure subscription or resource group.
You can attach a schedule to this runbook to run it at a specific time. Note that this runboo... |
PowerShellCorpus/Github/jdgwartney_pulse-plugin-incontact/sample-counters.ps1 | sample-counters.ps1 |
$config = @{}
$config['\processor(_total)\% processor time'] = @{
multiplier = 1,
metric_name = "CPU"
}
$config['\memory\% committed bytes in use'] = @{}
$config['\physicaldisk(_total)\% disk time'] = @{}
foreach ($c in $config)
{
$c
}
#$map = @{}
$counter_name1 = '\processor(_total)\% processor tim... |
PowerShellCorpus/Github/jdgwartney_pulse-plugin-incontact/get-counters.ps1 | get-counters.ps1 | # Define constants for program, PS way of doing this to make the real constants??
$CONFIG_FILE_NAME="counters.json"
$PARAM_FILE_NAME="param.json"
# Read configuration file which is encoded in JSON into PSObject
# How to handle if the JSON is not properly formed. What is returned, null?
$config = (Get-Content... |
PowerShellCorpus/Github/drewwilliams1982_dtlartifcats/Artifacts/SqlServerExpressManagementStudio/startChocolatey.ps1 | startChocolatey.ps1 | <##################################################################################################
Description
===========
Bootstrap for ensuring pre-requisites are validated prior to installing chocolatey packages.
Usage examples
==============
PowerShell -ExecutionPolicy bypass "& ./... |
PowerShellCorpus/Github/drewwilliams1982_dtlartifcats/Artifacts/SqlServerExpressManagementStudio/ChocolateyPackageInstaller.ps1 | ChocolateyPackageInstaller.ps1 | <##################################################################################################
Description
===========
- This script does the following -
- installs chocolatey
- installs specified chocolatey packages
- This script generates logs in the following folder -
- %ALLUSERSPROFILE... |
PowerShellCorpus/Github/drewwilliams1982_dtlartifcats/Artifacts/SqlServerExpress/startChocolatey.ps1 | startChocolatey.ps1 | <##################################################################################################
Description
===========
Bootstrap for ensuring pre-requisites are validated prior to installing chocolatey packages.
Usage examples
==============
PowerShell -ExecutionPolicy bypass "& ./... |
PowerShellCorpus/Github/drewwilliams1982_dtlartifcats/Artifacts/SqlServerExpress/ChocolateyPackageInstaller.ps1 | ChocolateyPackageInstaller.ps1 | <##################################################################################################
Description
===========
- This script does the following -
- installs chocolatey
- installs specified chocolatey packages
- This script generates logs in the following folder -
- %ALLUSERSPROFILE... |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ImportClassificatioProperties.ps1 | ImportClassificatioProperties.ps1 | |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ExportClassificatioRules.ps1 | ExportClassificatioRules.ps1 | |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/Migration Tool File Server Export.ps1 | Migration Tool File Server Export.ps1 | function Test-IsAdmin
{
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
}
if (!(Test-IsAdmin))
{
[System.Windows.Forms.MessageBox]::Show($FrmMain, "You do not have Administrator rights to run t... |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ExportFilemanagementTasks.ps1 | ExportFilemanagementTasks.ps1 |
function Redo-FileManagementTask ($FileManagementTasks, $Id)
{
$FileManagementTaskObj = @{
'Guid'=$GUID
'DaysSinceFileCreated' =$FileManagementTasks.DaysSinceFileCreated
'DaysSinceFileLastAccessed' =$FileManage... |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ExportClassificatioProperties.ps1 | ExportClassificatioProperties.ps1 | $FsrmClassificationObject = new-object -com FSRM.FsrmClassificationManager
$FsrmClassificationObject.EnumPropertyDefinitions()
Get-FileManagementTasks ($selectedVolumenes, $DestinationPathins |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/Migration Tool File Server Import.ps1 | Migration Tool File Server Import.ps1 |
function Test-IsAdmin
{
([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
}
if (!(Test-IsAdmin))
{
[System.Windows.Forms.MessageBox]::Show($FrmMain, "You do not have Administrator rights to run... |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ImportFilemanagementTasks.ps1 | ImportFilemanagementTasks.ps1 | |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ImportClassificatioRules.ps1 | ImportClassificatioRules.ps1 | |
PowerShellCorpus/Github/kimo72_Migration-Tool-File-Server/ExportStorageReports.ps1 | ExportStorageReports.ps1 | $FsrmQuotaObject = new-object -com FSRM.FsrmReportManager
$FsrmQuotaObject|gm
$3123 = $FsrmQuotaObject.EnumReportJobs()
$ee= $3123|%{$_.EnumReports()}
$ee|fl
$3123|%{$_ |gm}
$3123|%{$_.task}
$FsrmQuotaObject|gm
Cancel Method void Cancel () ... |
PowerShellCorpus/Github/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/Samples/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/mtwisler_Code-Samples/WebApplication1/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/daenetCorporation_Daenet.SecurityManager.Owin/Daenet.SecurityManager.Owin/_CreateNewNuGetPackage/Config.ps1 | Config.ps1 | #==========================================================
# Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery.
#
# If you have modified this script:
# - if you uninstall the "Create New NuGet Package From Project After Each Bu... |
PowerShellCorpus/Github/daenetCorporation_Daenet.SecurityManager.Owin/Daenet.SecurityManager.Owin/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1 | UploadNuGetPackage.ps1 | #==========================================================
# DO NOT EDIT THIS FILE.
# If you want to configure how your package is uploaded, modify the Config.ps1 file.
# To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run".
#=======================... |
PowerShellCorpus/Github/daenetCorporation_Daenet.SecurityManager.Owin/Daenet.SecurityManager.Owin/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1 | New-NuGetPackage.ps1 | #Requires -Version 2.0
<#
.SYNOPSIS
Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery.
.DESCRIPTION
Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file.
Additional parameters may be provided to also upload the ... |
PowerShellCorpus/Github/daenetCorporation_Daenet.SecurityManager.Owin/Daenet.SecurityManager.Owin/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1 | CreateNuGetPackage.ps1 | #==========================================================
# DO NOT EDIT THIS FILE.
# If you want to configure how your package is created, modify the Config.ps1 file.
#
# This script is ran automatically after every successful build.
# This script creates a NuGet package for the current project, and places the .... |
PowerShellCorpus/Github/rudolphjacksonm_Enable-ClientSystemRestore/Enable-ClientSystemRestore.ps1 | Enable-ClientSystemRestore.ps1 | <#
#>
function Enable-ClientSystemRestore {
[CmdletBinding()]
param(
)
try {
Enable-ComputerRestore -Drive C: -ErrorAction Stop
$createRestorePoint = $True
}
catch{
$_
Exit 1
}
#determine disk % free
$DiskWMI = (Get-WmiObject win... |
PowerShellCorpus/Github/Pixelshifter_Powershell-mgmt-script/Powershell local and remote computer mgmt.ps1 | Powershell local and remote computer mgmt.ps1 | function main {
<# clear screen #>
clear-host
$noip = "TRUE"
<# prompt user #>
write-host ""
write-host "########################################################"
write-host "# #"
write-host "# Welcome, pic... |
PowerShellCorpus/Github/yato0501_CarMaintenanceService/src/CarMaintenanceService/Properties/PublishProfiles/CarMaintenanceDev - Web Deploy-publish.ps1 | CarMaintenanceDev - Web Deploy-publish.ps1 | [cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties=@{}, $packOutput, $pubProfilePath)
# to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327
try{
if ($publishProperties['ProjectGuid'] -eq $null){
$publishProperties['ProjectGuid'] = 'd3038cd6-5d07-4fd... |
PowerShellCorpus/Github/Trois-Six_chocolatey-smartgit/RavenDB/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $url = 'http://hibernatingrhinos.com/downloads/RavenDB%20Installer/3800'
Install-ChocolateyPackage 'RavenDB' 'exe' '/quiet /msicl "RAVEN_TARGET_ENVIRONMENT=DEVELOPMENT TARGETDIR=C:\ INSTALLFOLDER=C:\RavenDB RAVEN_INSTALLATION_TYPE=SERVICE REMOVE=IIS ADDLOCAL=Service"' $url |
PowerShellCorpus/Github/Trois-Six_chocolatey-smartgit/RavenDB2/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $url = 'http://hibernatingrhinos.com/downloads/RavenDB%20Installer/2971'
Install-ChocolateyPackage 'RavenDB' 'exe' '/quiet /msicl "RAVEN_TARGET_ENVIRONMENT=DEVELOPMENT TARGETDIR=C:\ INSTALLFOLDER=C:\RavenDB RAVEN_INSTALLATION_TYPE=SERVICE REMOVE=IIS ADDLOCAL=Service"' $url |
PowerShellCorpus/Github/Trois-Six_chocolatey-smartgit/SmartGit/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $packageName = 'SmartGit'
$version = '7_0_4'
$fileType = '.zip'
$silentArgs = '/sp- /silent /norestart'
try {
$url = 'http://www.syntevo.com/downloads/smartgit/smartgit-win32-setup-nojre-' + $version + $fileType
$httpRequest = [System.Net.WebRequest]::Create($url)
$httpResponse = $httpRequest.Get... |
PowerShellCorpus/Github/Trois-Six_chocolatey-smartgit/SmartGit/tools/chocolateyUninstall.ps1 | chocolateyUninstall.ps1 | $ErrorActionPreference = 'Stop'
$packageName = 'smartgit'
$softwareName = 'SmartGit*'
$installerType = 'EXE'
$silentArgs = '/sp- /silent /norestart'
$local_key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
$machine_key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
$... |
PowerShellCorpus/Github/TimTools_MailboxInformationOverview/MailboxInformationOverview v1.1.ps1 | MailboxInformationOverview v1.1.ps1 | # Functions
function ConnectExchange
{
$Global:ExchangeSession = New-PSSession -configurationname Microsoft.Exchange -connectionURI URL
Import-PSSession $ExchangeSession -AllowClobber
}
function CloseExchange
{
Remove-PSSession $ExchangeSession
}
# Scripting
# Conn... |
PowerShellCorpus/Github/CsTomi_SzakiranyLaborok/AUT2/Nyivantarto/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/CsTomi_SzakiranyLaborok/AUT2/Nyivantarto/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/vikdork_Create-Nano_vhd/Create Nano VHD.ps1 | Create Nano VHD.ps1 | ########################################################################################################
#Name: Create Nano Vhd.ps1
#Author: Viktor Lindström
#
#Comments:
#Creates custom Nano VHD from Windows 2016 ISO. I have only tried it with Technical preview 4.
#You have to run the script as administrator.
#... |
PowerShellCorpus/Github/slavizh_StanAuto/Install-MMA.ps1 | Install-MMA.ps1 | workflow Install-MMA
{
param (
[Parameter(Mandatory=$true)]
[String]
$ServerName
)
# Set Error Preference
$ErrorActionPreference = "Stop"
# Get Variables and Credentials
$DomainCreds = Get-AutomationPSCredential `
-Name 'DomainCreds'
$Wor... |
PowerShellCorpus/Github/slavizh_StanAuto/SetTimeZone.ps1 | SetTimeZone.ps1 | Configuration SetTimeZone
{
Import-DSCResource -ModuleName xTimeZone
Node TimeZone
{
xTimeZone TimeZoneExample
{
IsSingleInstance = 'Yes'
TimeZone = 'E. Europe Standard Time'
}
}
} |
PowerShellCorpus/Github/slavizh_StanAuto/runbooks/empty.ps1 | empty.ps1 | <#
This PowerShell script was automatically converted to PowerShell Workflow so it can be run as a runbook.
Specific changes that have been made are marked with a comment starting with “Converter:”
#>
workflow empty {
# Converter: Wrapping initial script in an InlineScript activity, and passing any paramete... |
PowerShellCorpus/Github/slavizh_StanAuto/runbooks/Get-AzureVMTutorial.ps1 | Get-AzureVMTutorial.ps1 | <#
.DESCRIPTION
5An example runbook which prints out the first 10 Azure VMs in your subscription (ordered alphabetically).
For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http://aka.ms/fxu3mn
.NOTES
AUTHOR: Azure Au... |
PowerShellCorpus/Github/jounihuttunen_init-windows/init-config.ps1 | init-config.ps1 | # Unrestricted execution policy for current user
Set-ExecutionPolicy unrestricted -force -Scope CurrentUser
# Background: Black
Set-ItemProperty "HKCU:Control Panel\Colors" -Name Background -Value "0 0 0"
Set-ItemProperty "HKCU:Control Panel\Desktop" -Name WallPaper -Value ""
# Taskbar buttons: Never combine
... |
PowerShellCorpus/Github/jounihuttunen_init-windows/init-software.ps1 | init-software.ps1 | Set-ExecutionPolicy unrestricted -force -Scope CurrentUser
# Install chocolatey
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
# Basic software
cinst googlechrome -y
cinst firefox -y
cinst 7zip.install -y
cinst notepadplusplus -y
cinst paint.net -y
cinst winscp -y
ci... |
PowerShellCorpus/Github/chickentech_WMIC_Powershell_Report/ADComputer_HTML_Report_GUI.ps1 | ADComputer_HTML_Report_GUI.ps1 | <#
.SYNOPSIS
Script by: Nathan Behe
For: Office of Administration - Commonwealth of Pennsylvania
Creation Date: 3/25/2015
.NOTES
Version : 0.1
Rights Required : Domain User
Powershell Version : 1.0
Authors : Nathan Behe
... |
PowerShellCorpus/Github/chickentech_WMIC_Powershell_Report/report_commands.ps1 | report_commands.ps1 | ### Machine Report Generator
### Created by Nathan Behe for the Office of Administration Help Desk ###
### 2/3/2015
### natbehe@pa.gov <- E-mail for support or questions.
##Check that script is running in STA mode:
#Validate that Script is launched
$IsSTAEnabled = $host.Runspace.ApartmentState -eq 'STA'
#S... |
PowerShellCorpus/Github/chickentech_WMIC_Powershell_Report/ADUser_HTML_Report.ps1 | ADUser_HTML_Report.ps1 | Import-Module ActiveDirectory
##Check that script is running in STA mode:
#Validate that Script is launched
$IsSTAEnabled = $host.Runspace.ApartmentState -eq 'STA'
#Set the name of the console window
$host.UI.RawUI.WindowTitle="Report Generator"
If ($IsSTAEnabled -eq $false) {
"Script is not running ... |
PowerShellCorpus/Github/chickentech_WMIC_Powershell_Report/Telestaff.ps1 | Telestaff.ps1 | ##
#
#
##
function is64bit() {
return ([IntPtr]::Size -eq 8)
}
$key = 'HKLM:\SOFTWARE\Classes\AppID\{CA12B971-8FC0-405F-A772-FCA2E37ECDF2}'
$eestore = ((Get-ItemProperty -Path $key).RunAs).ToString()
#IP Addresses
$QA_IP = "172.22.28.7"
$DEV_IP = "172.22.28.8"
$Train_IP = "172.22.28.6"
$Prod_IP = "... |
PowerShellCorpus/Github/omerbaki_youwavesapi/YouWavesAPI/PublishScripts/Publish-WebApplication.ps1 | Publish-WebApplication.ps1 | #Requires -Version 3.0
<#
.SYNOPSIS
Creates and deploys Windows Azure Web Sites, Virtual Machines, SQL Databases, and storage accounts for a Visual Studio web project.
.DESCRIPTION
The Publish-WebApplication.ps1 script creates the Windows Azure resources that you specify in a Visual Studio web project and (opt... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.0_AnyCPU_Debug_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.8_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.5_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.1_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.2_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.6_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.7_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.9_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.4_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/HEG-Arc_quiz/frontend/Quiz/AppPackages/Quiz_1.0.0.10_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.