full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/MaxAnderson95_MDT-Choose-AD-Group/Add_to_dot1x.ps1
Add_to_dot1x.ps1
#Pull User Credentials from the Task Sequence Variables via the TSEnvironment COM object and place them in variables $tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment #Username and decode $tmpuser = $tsenv.Value("UserID") $tmpuser = [System.Text.Encoding]::Default.GetString([System.Convert]::...
PowerShellCorpus/Github/gudranx_Deployment/Deployment.ps1
Deployment.ps1
Configuration MDTDeployment { Import-DscResource -Name MSFT_xSmbShare Node LocalHost { LocalConfigurationManager { ConfigurationMode = 'ApplyAndAutoCorrect' ConfigurationModeFrequencyMins = 1440 RefreshFr...
PowerShellCorpus/Github/gudranx_Deployment/DART Monitor.ps1
DART Monitor.ps1
[xml]$g = (Invoke-WebRequest http://kfi-wds.haywardbaker.com:9801/mdtmonitordata/Computers).content $h = $g.feed.entry.content.properties |select name,DartIP,DartPort,DartTicket| Out-GridView -PassThru $strTicket = $h.DartTicket $strIP = $h.DartIP $strPort = $h.DartPort set-location 'C:\Program Files\Microso...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_4_20_26_58_29/.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/OPSTest_E2E_NewRepo_2017_3_24_11_24_19/.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/gixxerjasen_powershell/Audit.ps1
Audit.ps1
##################################################### # # # Audit script V3 by Alan Renouf - Virtu-Al # # Blog: http://virtu-al.net/ # # # # Usage: Audit.ps1 'pathtolistofservers' # # # # The file is optional and needs to be a # # pla...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/ExpiringCertificates.ps1
ExpiringCertificates.ps1
# Script to Find Certs Expiring Soon # Written by: Gary Siepser, Microsoft # Variable Pre-Sets Section # Modify the varibale below to control how far into the future this script looks into the future $FutureDays = 60 # Modify the variable below to control how far into the past we look fo...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/test.ps1
test.ps1
$arrProperty = get-mailbox -resultsize unlimited | where {$_.RecipientTypeDetails -eq "UserMailbox" -and $_.name -like "P_*-Payments" -and $_.DistinguishedName -NotLike "*Shared*"} foreach ($PropPayment in $arrProperty) { ` $PropID = $PropPayment.DisplayName -Replace "-Payments" $arrPropUsers = get-user -resultsiz...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/test2.ps1
test2.ps1
Set-StrictMode -Version 1 # Variables that need to be set prior to running the first time. $NameSuffix = '-eSignature' $AliasSuffix = 'sig' $CheckFor = 'riverviewsig|riverviewlandingsig|brandywinesig' # Mailboxes we don't want to create # Get all Insurance mailboxes into an array. Using Insurance mailboxes be...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/getaddresses.ps1
getaddresses.ps1
# Create an object to hold the results $addresses = @() # Get every mailbox in the Exchange Organisation $Mailboxes = Get-Mailbox -ResultSize Unlimited | where {$_.DisplayName -like "P_*"} # Recurse through the mailboxes ForEach ($mbx in $Mailboxes) { # Recurse through every address assigned to the mailbox...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/UpdateAddressBook.ps1
UpdateAddressBook.ps1
Get-OfflineAddressbook | Update-OfflineAddressbook Start-Sleep -s 20 Get-ClientAccessServer | Update-FileDistributionService
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/mailboxtest.ps1
mailboxtest.ps1
$strProperty = Read-Host "Property Prefix:" $arrProperty = get-user -resultsize unlimited | where {$_.DisplayName -like "$strProperty*"} $arrPropID = foreach ($PropUser in $arrProperty) {$PropUser.UserPrincipalName.Split("@")[-2]} foreach ($propID in $arrPropID) { ` if ($propID -notlike "*MKT") {$propEmailAddress=...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/NewUserTest.ps1
NewUserTest.ps1
Set-StrictMode -Version 1 $tpwd = "" $rand = New-Object System.Random 1..10 | ForEach { $tpwd = $tpwd + [char]$rand.next(33,127) } $pwd = ConvertTo-SecureString $tpwd -AsPlainText -Force New-Mailbox -DisplayName 'ITTest3' -Name 'ITTest3' -Alias 'ITTest3' -OrganizationalUnit 'Walden1.wrpi.com/Associates-IT/Us...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/CreateSharedMailboxes.ps1
CreateSharedMailboxes.ps1
Set-StrictMode -Version 1 # Variables that need to be set prior to running the first time. $NameSuffix = '-eSignature' $AliasSuffix = 'sig' $CheckFor = 'riverviewsig|riverviewlandingsig|brandywinesig' # Mailboxes we don't want to create # Get all Insurance mailboxes into an array. Using Insurance mailboxes be...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/PaymentMailboxPermissions.ps1
PaymentMailboxPermissions.ps1
$arrProperty = get-mailbox -resultsize unlimited | where {$_.RecipientTypeDetails -eq "UserMailbox" -and $_.name -like "P_*-Payments" -and $_.DistinguishedName -NotLike "*Shared*"} foreach ($PropPayment in $arrProperty) { ` $PropID = $PropPayment.DisplayName -Replace "-Payments" $arrPropUsers = get-user -resultsiz...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/EnablePropertyMailboxes.ps1
EnablePropertyMailboxes.ps1
$strProperty = Read-Host "Property Display Name Prefix" $strProperty = $strProperty + '*' Write-Host "Getting Users" $arrProperty = get-user -resultsize unlimited | Where {$_.DisplayName -like "$strProperty"} $arrPropID = foreach ($PropUser in $arrProperty) {$PropUser.UserPrincipalName.Split("@")[-2]} foreach ($pr...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/EnableInsuranceMailboxes.ps1
EnableInsuranceMailboxes.ps1
$arrProperty = get-user -resultsize unlimited | where {$_.RecipientTypeDetails -eq "User" -And $_.DisplayName -like "P_*-Insurance"} $arrPropID = foreach ($PropUser in $arrProperty) {$PropUser.UserPrincipalName.Split("@")[-2]} foreach ($propID in $arrPropID) { ` $propEmailAddress="$propID@milestone-mgt.com" Enabl...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/InsuranceMailboxPermissions.ps1
InsuranceMailboxPermissions.ps1
$arrProperty = get-mailbox -resultsize unlimited | where {$_.RecipientTypeDetails -eq "UserMailbox" -and $_.name -like "P_*-Insurance" -and $_.DistinguishedName -NotLike "*Shared*"} foreach ($PropPayment in $arrProperty) { ` $PropID = $PropPayment.DisplayName -Replace "-Insurance" $arrPropUsers = get-user -results...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/eSignatureMailboxPermissions.ps1
eSignatureMailboxPermissions.ps1
$arrProperty = get-mailbox -resultsize unlimited | where {$_.RecipientTypeDetails -eq "UserMailbox" -and $_.name -like "P_*-eSignature" -and $_.DistinguishedName -NotLike "*Shared*"} foreach ($PropPayment in $arrProperty) { ` $PropID = $PropPayment.DisplayName -Replace "-eSignature" $arrPropUsers = get-user -resul...
PowerShellCorpus/Github/gixxerjasen_powershell/Exchange/Shared Mailboxes/EnablePaymentMailboxes.ps1
EnablePaymentMailboxes.ps1
$arrProperty = get-user -resultsize unlimited | where {$_.RecipientTypeDetails -eq "User" -And $_.DisplayName -like "P_*-Payments"} $arrPropID = foreach ($PropUser in $arrProperty) {$PropUser.UserPrincipalName.Split("@")[-2]} foreach ($propID in $arrPropID) { ` $propEmailAddress="$propID@milestone-mgt.com" Enable...
PowerShellCorpus/Github/gixxerjasen_powershell/VMWare/vCheck5.ps1
vCheck5.ps1
param( [string] $VISRV) ############################### # vCheck - Daily Error Report # ############################### # Thanks to all who have commented on my blog to help improve this project # Especially - Thanks to Raphaėl SCHITZ (http://www.hypervisor.fr/) for his contributions and time # And also thanks t...
PowerShellCorpus/Github/gixxerjasen_powershell/VMWare/Report.ps1
Report.ps1
param( [string] $VIServer ) if ($VIServer -eq ""){ Write-Host Write-Host "Please specify a VI Server name eg...." Write-Host " powershell.exe Report.ps1 MYVISERVER" Write-Host Write-Host exit } function PreReq { if ((Test-Path REGISTRY::HKEY_CLASSES_ROOT\Word.Application) -eq $False){ Wri...
PowerShellCorpus/Github/gixxerjasen_powershell/VMWare/AllRDLs.ps1
AllRDLs.ps1
$report = @() $vms = Get-VM | Get-View foreach($vm in $vms){ foreach($dev in $vm.Config.Hardware.Device){ if(($dev.gettype()).Name -eq "VirtualDisk"){ if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or ($dev.Backing.CompatibilityMode -eq "virtualMode")){ $row = "" | select VMName, VMHost, HD...
PowerShellCorpus/Github/gixxerjasen_powershell/VMWare/allHDDs.ps1
allHDDs.ps1
$VmInfo = ForEach ($Datacenter in (Get-Datacenter | Sort-Object -Property Name)) { ForEach ($Cluster in ($Datacenter | Get-Cluster | Sort-Object -Property Name)) { ForEach ($VM in ($Cluster | Get-VM | Sort-Object -Property Name)) { ForEach ($HardDisk in ($VM | Get-HardDisk | Sort-Object -Property Name))...
PowerShellCorpus/Github/gixxerjasen_powershell/VMWare/Orphans/find-orphaned-vmdk-3.ps1
find-orphaned-vmdk-3.ps1
function Remove-OrphanedData{ <# .SYNOPSIS Remove orphaned folders and VMDK files .DESCRIPTION The function searches orphaned folders and VMDK files on one or more datastores and reports its findings. Optionally the function removes the orphaned folders and VMDK files .NOTES Author: Luc Dekens .P...
PowerShellCorpus/Github/gixxerjasen_powershell/VMWare/mapping/vDiagram.ps1
vDiagram.ps1
Param ($VIServer=$FALSE, $Cluster=$FALSE) ############################################################# # # # vDiagram script by Alan Renouf - Virtu-Al # # Blog: http://teckinfo.blogspot.com/ # # # # Usage: vDiagram.ps1 -VIServer MYVISERVER # # # # ...
PowerShellCorpus/Github/gixxerjasen_powershell/DeployVMs/DeployFromTemplate.ps1
DeployFromTemplate.ps1
'VMWare Automated Template Deployment Script' 'by http://www.mcpguides.com' 'In order for this script to function properly, you will need a VMWare template, and a Guest Customization Wizard Configuration File already created.' 'Last modified on 12-14-2010' '********************************************************...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_5_11_59_10/.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/harryhahn_Powershell/nav_max.ps1
nav_max.ps1
## Connect-Computer.ps1 ## Interact with a service on a remote TCP port param( [string] $remoteHost = “127.0.0.1”, [int] $port = 4242 ) ## Open the socket, and connect to the computer on the specified port write-host “Connecting to $remoteHost on port $port” $socket = new-object System.Net.Sock...
PowerShellCorpus/Github/harryhahn_Powershell/nav_exit.ps1
nav_exit.ps1
## Connect-Computer.ps1 ## Interact with a service on a remote TCP port param( [string] $remoteHost = “127.0.0.1”, [int] $port = 4242 ) ## Open the socket, and connect to the computer on the specified port write-host “Connecting to $remoteHost on port $port” $socket = new-object System.Net.Sock...
PowerShellCorpus/Github/harryhahn_Powershell/nav_start.ps1
nav_start.ps1
&"C:\Program Files (x86)\Navigator15\PC_Navigator\PC_Navigator.exe" --atlas='C:\ProgramData\Navigator\15.0\atlas_pcn_free.idc'
PowerShellCorpus/Github/harryhahn_Powershell/nav_min.ps1
nav_min.ps1
## Connect-Computer.ps1 ## Interact with a service on a remote TCP port param( [string] $remoteHost = “127.0.0.1”, [int] $port = 4242 ) ## Open the socket, and connect to the computer on the specified port write-host “Connecting to $remoteHost on port $port” $socket = new-object System.Net.Sock...
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/httpListener_dacar - Kopie (2).ps1
httpListener_dacar - Kopie (2).ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in order....
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/wct-navi-broker.ps1
wct-navi-broker.ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in orde...
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/wct-navi-broker-security.ps1
wct-navi-broker-security.ps1
# wct-navi-broker-security.ps1 # WICHTIG! # ALS Administrator ausführen # # setzt die Rechte und Regeln zum ausführen des wct-navi-broker.psi ## der user muss "dacar" heissen set-executionpolicy unrestricted netsh http add urlacl url=http://+:8000/ user=dacar pause
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/test.ps1
test.ps1
Get-Process
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/httpListener_dacar2.ps1
httpListener_dacar2.ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in order....
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/httpListener_14102015.ps1
httpListener_14102015.ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in order....
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/Unbenannt1.ps1
Unbenannt1.ps1
if ((Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Computer -ea 0).OSArchitecture -eq '64-bit') { "64-Bit" } else { "32-Bit" }
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/new-service.ps1
new-service.ps1
New-SelfHostedPS .\httpListener_dacar.ps1 -hideConsole
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/Unbenannt2.ps1
Unbenannt2.ps1
MODULE -ListAvailable $handle = (Get-Process pc_navigator).MainWindowHandle Set-ForegroundWindow $handle Set-ForegroundWindow (Get-Process pc_navigator).MainWindowHandle a = $App::MakeTopMost(197150)
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/Detect_OSBits.ps1
Detect_OSBits.ps1
(Get-WmiObject -Class Win32_OperatingSystem).OsArchitecture
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/httpListener_dacar1.ps1
httpListener_dacar1.ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in order....
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/httpListener_dacar - Kopie.ps1
httpListener_dacar - Kopie.ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in order....
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/HTTPListener_Tests.ps1
HTTPListener_Tests.ps1
# Copyright (c) 2014 Microsoft Corp. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish...
PowerShellCorpus/Github/harryhahn_Powershell/HttpAPI/setForeground.ps1
setForeground.ps1
Set-ForegroundWindow (Get-Process pc_navigator).MainWindowHandle
PowerShellCorpus/Github/gpsqqq_f/gh.ps1
gh.ps1
function gh { [CmdletBinding(DefaultParameterSetName="DC")] Param( [Parameter(Position = 0)] [String[]] $ComputerName, [Parameter(ParameterSetName = "DC", Position = 1)] [Switch] $DC, [Parameter(ParameterSetName = "DumpCerts", Position = 1)] [Switch] $DumpCerts, [Para...
PowerShellCorpus/Github/ragsns_azureautomation/RemoveHDICluster.ps1
RemoveHDICluster.ps1
$token ="xx" $subscriptionid = "yyyyyyyy-zzzz-aaaa-bbbb-cccccccccccc" $resourceGroupName = $token + "rags" $clusterName = $token Write-OutPut "" Write-OutPut "Logging Into Azure" $connectionName = "AzureRunAsConnection" $servicePrincipalConnection=Get-AutomationConnection -Name $connectionName Add-AzureRmAc...
PowerShellCorpus/Github/ragsns_azureautomation/UpdateVersions.ps1
UpdateVersions.ps1
param( [Parameter(Mandatory=$false)] [String] $ResourceGroupName, [Parameter(Mandatory=$false)] [String] $AutomationAccountName, [Parameter(Mandatory=$false)] [String] $NewModuleName ) $ErrorActionPreference = 'Continue' $ModulesImported = @() function _doImport { param( ...
PowerShellCorpus/Github/ragsns_azureautomation/CreateHDICluster.ps1
CreateHDICluster.ps1
$token ="xx" $subscriptionid = "yyyyyyyy-zzzz-aaaa-bbbb-cccccccccccc" $resourceGroupName = $token + "rags" $clusterName = $token $defaultStorageAccountName = $token + "str1" $defaultStorageContainerName = $token + "cnt1" $location = "East US 2" $clusterNodes = 1 Write-OutPut "" Write-OutPut "Logging Into Azu...
PowerShellCorpus/Github/ragsns_azureautomation/AutomationFromTemplates/NewHDiClusterTemplate.ps1
NewHDiClusterTemplate.ps1
# start of script # TODO - decorate the templates.json file as below $ARMFILE = @' { "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", "contentVersion": "0.9.0.0", "parameters": { "clusterName": { "type": "string", ...
PowerShellCorpus/Github/ragsns_azureautomation/AutomationFromTemplates/NewHDiCluster.ps1
NewHDiCluster.ps1
<# .SYNOPSIS Deploys a template to Azure .DESCRIPTION Deploys an Azure Resource Manager template .PARAMETER subscriptionId The subscription id where the template will be deployed. .PARAMETER resourceGroupName The resource group where the template will be deployed. Can be the name of an...
PowerShellCorpus/Github/ragsns_azureautomation/AutoScaleHDICluster/DownScaleCluster.ps1
DownScaleCluster.ps1
$azureAccountName ="<sp-app-id-from-service-principal>" $azurePassword = ConvertTo-SecureString "<sp-password-from-service-principal>" -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential($azureAccountName, $azurePassword) Add-AzureRmAccount -Credential $psCred -TenantId <sp-tenant-id...
PowerShellCorpus/Github/ragsns_azureautomation/AutoScaleHDICluster/UpScaleCluster.ps1
UpScaleCluster.ps1
$azureAccountName ="<sp-app-id-from-service-principal>" $azurePassword = ConvertTo-SecureString "<sp-password-from-service-principal>" -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential($azureAccountName, $azurePassword) Add-AzureRmAccount -Credential $psCred -TenantId <sp-tenant-id...
PowerShellCorpus/Github/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/SportsCompetitionsMVC/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/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/Mateusz2042_ASP-Projekt/MailQR/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/Mateusz2042_ASP-Projekt/MailQR/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/Mateusz2042_ASP-Projekt/MailQR/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/Mateusz2042_ASP-Projekt/MailQR/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/Mateusz2042_ASP-Projekt/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/TechnologyEnthusiast_powershell-unmount-imagefile/Unmount-ImageFile.ps1
Unmount-ImageFile.ps1
# # Unmount-ImageFile.ps1 # # This function will unmount a wim or vhd file using DISM. Function Unmount-ImageFile { [CmdletBinding()] Param ( [Parameter(Mandatory=$true,Position=0)] [string]$MountDir ) # Verify the mount directory exists Begin { if (Test-Path $MountDir) { Write-Ve...
PowerShellCorpus/Github/dotnet_docs.fr-fr/.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 ur...
PowerShellCorpus/Github/MTN-Software_French/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/MTN-Software_French/French Conjugations/French Conjugations.Windows/AppPackages/French Conjugations.Windows_1.1.0.0_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/MTN-Software_French/French Conjugations/French Conjugations.Windows/AppPackages/French Conjugations.Windows_1.1.0.2_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/MTN-Software_French/French Conjugations/French Conjugations.Windows/AppPackages/French Conjugations.Windows_1.1.0.3_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/MTN-Software_French/French Conjugations/French Conjugations.Windows/AppPackages/French Conjugations.Windows_1.1.0.0_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/CriticalPathTraining_SharePoint2013VmSetupGuide/VmSetupGuideScripts/Script01_PrepServer.ps1
Script01_PrepServer.ps1
cls function Disable-LoopbackChecks{ # Disabling internal loopback Write-Host "Disabling internal loopback check for accessing host header sites" $regPath = "HKLM:\System\CurrentControlSet\Control\Lsa" $key = "DisableLoopbackCheck" if(test-path $regPath) { $keyValue = (Get-ItemProperty $regpath).$key ...
PowerShellCorpus/Github/CriticalPathTraining_SharePoint2013VmSetupGuide/VmSetupGuideScripts/Script04_CreateWebApplications.ps1
Script04_CreateWebApplications.ps1
$snapin = Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue -PassThru if ($snapin -eq $null) { Write-Error "Unable to load the Microsoft.SharePoint.PowerShell Snapin! Have you installed SharePoint?" return } function Remove-DefaultWebApplication{ #remove the existing applica...
PowerShellCorpus/Github/CriticalPathTraining_SharePoint2013VmSetupGuide/VmSetupGuideScripts/Script02_CreateWingtipUsers.ps1
Script02_CreateWingtipUsers.ps1
Import-Module ActiveDirectory $WingtipDomain = "DC=wingtip,DC=com" $ouWingtipUsersName = "Wingtip Users" $ouWingtipUsersPath = "OU={0},{1}" -f $ouWingtipUsersName, $WingtipDomain $ouWingtipUsers = Get-ADOrganizationalUnit -Filter { name -eq $ouWingtipUsersName} if($ouWingtipUsers -ne $null){ Write-Host ("Or...