full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/makskb_site/Blacklist/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/Jens472_PowerShell/Get-PassHashes.ps1 | Get-PassHashes.ps1 | function Get-PassHashes {
<#
.SYNOPSIS
Nishang payload which dumps password hashes.
.DESCRIPTION
The payload dumps password hashes using the modified powerdump script from MSF. Administrator privileges are required for this script
(but not SYSTEM privs as for the original powerdump)
.EXAMPLE
PS > Get... |
PowerShellCorpus/Github/Jens472_PowerShell/Invoke-PsUACme.ps1 | Invoke-PsUACme.ps1 | function Invoke-PsUACme
{
<#
.SYNOPSIS
Nishang script which uses known methods to bypass UAC.
.DESCRIPTION
This script implements methods from UACME project (https://github.com/hfiref0x/UACME) to bypass UAC on Windows machines.
It drops DLLs in the known misconfigured/vulnerable locations of Windows machines u... |
PowerShellCorpus/Github/iFoton_SCOM-Alerts-Q/3. Handler Part/GetFromQ.ps1 | GetFromQ.ps1 | function Get-DatabaseData {
param (
[string]$connectionString,
[string]$query
)
$connection = New-Object -TypeName System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
$command = $connection.CreateCommand()
$command.CommandTe... |
PowerShellCorpus/Github/iFoton_SCOM-Alerts-Q/Addons/SCOM Q History Dash.ps1 | SCOM Q History Dash.ps1 | function Get-DatabaseData {
param (
[string]$connectionString,
[string]$query
)
$connection = New-Object -TypeName System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
$command = $connection.CreateCommand()
$command.CommandTe... |
PowerShellCorpus/Github/Saulmil_FindR/halp/packages/EntityFramework.6.0.2/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/Saulmil_FindR/halp/packages/EntityFramework.6.0.2/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/Saulmil_FindR/halp/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/nDPavel_PoSh.Test/Naudio/Test_exstract_movi.ps1 | Test_exstract_movi.ps1 |
<#
выдергиваем свуковую дорожку в из mp4 и переводим её в wav
#>
add-type -Path "D:\Job\scripts\PowerShell\Projects\Prosluhka\soft\NAudio\NAudio.dll"
Add-Type -Path "D:\Job\scripts\PowerShell\Projects\Prosluhka\soft\NAudio\NAudio.WindowsMediaFormat.dll"
[String]$filename = "d:\Job\scripts\PowerShell\Functi... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-FileVersionNet.ps1 | Get-FileVersionNet.ps1 | function get-FileVersionNet {
param([System.IO.FileInfo] $fileItem)
$verInfo = $fileItem.VersionInfo
$verInfo.ProductVersion
#«{0}.{1}.{2}.{3}» -f
<#
$verInfo.FileMajorPart,
$verInfo.FileMinorPart,
$verInfo.FileBuildPart
$verInfo.FilePrivatePart
#>
}
|
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/NAudio(wave_mic).ps1 | NAudio(wave_mic).ps1 | add-type -Path "D:\Job\scripts\PowerShell\Projects\Prosluhka\soft\NAudio\NAudio.dll"
Add-Type -Path "D:\Job\scripts\PowerShell\Projects\Prosluhka\soft\NAudio\NAudio.WindowsMediaFormat.dll"
$devices = new-object NAudio.CoreAudioApi.MMDeviceEnumerator
$wave = New-Object NAudio.Wave.wri
$FileFormat = New-Object NAud... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Show-ProcessTree_v2.ps1 | Show-ProcessTree_v2.ps1 | Function Show-ProcessTree_v2
{
Function Get-ProcessChildren($P,$Depth=1)
{
$procs | Where-Object {$_.ParentProcessId -eq $p.ProcessID -and $_.ParentProcessId -ne 0} | ForEach-Object {
"{0}|--{1}" -f (" "*3*$Depth),$_.Name
Get-ProcessChildren $_ (++$Depth)
$Dept... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-LoggedOn.ps1 | Get-LoggedOn.ps1 | <# описание
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 29.01.2016 14:00
Created by: pavel.linchik
Organization: vivadengi
Filename: Get-LoggedOn.ps1
=============... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/FindMac_old.ps1 | FindMac_old.ps1 | function findmac ($mac) {
$x=96 #подсети
$y=1..254 #компы
foreach ($lan in $x) { #перебираем подсети
$y | foreach { #перебираем компы
$comp="10.255.$lan.$_"
$ping=Get-WmiObject -Query "select * from win32_pingstatus where (address='$comp')"
if ($ping.statuscode -eq 0) { #будем выполнять поиск мака только у пингу... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-PortScan.ps1 | Get-PortScan.ps1 | # в случае единственного хоста указываем его адрес
$target = "oo-kach-05"
# в случае множественных целей можно подставить файл
#$target = get-content "hosts.txt"
# в случае прямого указания номеров портов пишем
$ports = @("21","22","23","80","139","443","445","1433","3389")
# в случае указания диапазона
$ports=(... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Razmer_loga_mpk.ps1 | Razmer_loga_mpk.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.120
Created on: 27.04.2016 13:54
Created by: pavel.linchik
Organization:
Filename:
=============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Progress_test2.ps1 | Progress_test2.ps1 | $ProgressBar = New-ProgressBar
1..100 | foreach {
Write-ProgressBar -ProgressBar $ProgressBar -PercentComplete $_
Start-Sleep -Milliseconds 20
}
Close-ProgressBar $ProgressBar
|
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-ODBCList.ps1 | Get-ODBCList.ps1 | Function Get-ODBCList
{
<#
.SYNOPSIS
Get ODBC list.
.DESCRIPTION
The Get-ODBCList cmdlet to Get ODBC Drivers connectors list on specific machine.
.PARAMETER ComputerName
Specifies a computer name.
.EXAMPLE
PS C:\> Get-ODBCList -ComputerName "g1","g2","g3"
ODBC ... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-RemouteService.TempPoint.ps1 | Get-RemouteService.TempPoint.ps1 | |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/AddEndFileTex.ps1 | AddEndFileTex.ps1 | <# .DESCRIPTION AddEndFileTex
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 18.01.2016 16:58
Created by: pavel.linchik
Organization: vivadengi
Filename: Get-HostName.p... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/ADD_Print.ps1 | ADD_Print.ps1 | # Ближайший до пользователя принт-сервер. Просто некоторые принтеры подключены к нескольких сервакам. Зачем? Никто не знает.
$prefer_server = "chel2.example.com"
# Подрубаемся к домену
$domain = "LDAP://dc=example,dc=com"
$root = New-Object DirectoryServices.DirectoryEntry $domain
$adFind = New-Object Di... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Script.ps1 | Script.ps1 | #
# Script.ps1
#
|
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-InstalledApplication.ps1 | Get-InstalledApplication.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 15.02.2016 13:40
Created by: pavel.linchik
Organization:
Filename: Get-InstalledApplication.ps1
... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Progres_test.ps1 | Progres_test.ps1 | <#
.SYNOPSIS
This script is used to create a progress bar
.DESCRIPTION
This script uses a Powershell Runspace to create and manage a WPF progress bar that can be manipulated to show
script progress and details. There are no arguments for this script because it is just an example of how this ... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/wmi_Выводзвук устр.ps1 | wmi_Выводзвук устр.ps1 | $class = "Win32_SoundDevice","win32_keyboard"
$class | % {gwmi $_ | ? description -match ‘usb’} | ft description, PNPDeviceID -A –Wr |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-FileVersionCom.ps1 | Get-FileVersionCom.ps1 | function Get-FileVersionCom{
param([System.IO.FileInfo] $fileItem)
$fso = new-object -comobject 'Scripting.FileSystemObject'
$fso.GetFileName($fileItem)
$fso.GetFileVersion($fileItem)
}
Get-FileVersionCom -fileItem 'd:\Program Files\other\Asuz.old\zlib1.dll' |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/test.ps1 | test.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 19.02.2016 10:07
Created by: pavel.linchik
Organization:
Filename:
==============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/MessageCenter.ps1 | MessageCenter.ps1 |
######################################################################################
# Title: Message Center
# Version: 1.4
# Author: Chris Carter
# Contact: powershell@artfullyencoded.com
#
# Purpose: To provide a graphical user interface to send messages
# over the network using msg.exe in place ... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/StringFirst.ps1 | StringFirst.ps1 | <#
.SYNOPSIS
<A brief description of the script>
.DESCRIPTION
<
Функция для парсинга строк.
Выводит сивволы до первного указанного символа в строке например ';'
может работать с дополнительным сиволом в строке
>
.PARAMETER <paramName>
<Description of script parameter>
.EXAMPLE
<An ... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/MPK_vzh.ps1 | MPK_vzh.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.120
Created on: 26.04.2016 13:40
Created by: pavel.linchik
Organization:
Filename:
=============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-RemoteService.ps1 | Get-RemoteService.ps1 | <#
<#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 03.03.2016 09:09
Update on: 09.03.2016 15.56
Created by: pavel.linchik
Organization: вивабабло :)
Filename:... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/DiskSize.ps1 | DiskSize.ps1 | Function DiscSize($ip){
Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" -Computer $ip |
Select SystemName,DeviceID,@{Name="size(GB)";
Expression={"{0:N1}" -f($_.size/1gb)}
},@{Name="freespace(GB)";
Expression={"{0:N1}" -f($_.freespace/1gb)}} |
Format-Table -AutoSize
... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/ShorcutRemout.ps1 | ShorcutRemout.ps1 | ####################################################
# Remote access shortcuts creation script
# v0.9
#
# Defaults:
#
# * Create shortcuts in current directory
# * Overwrite all shortcuts
# * Shortcut name is "shortname" column value
# * Shortcut comment is "desc" column value
####################... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/get-ShedulTask.ps1 | get-ShedulTask.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 21.04.2016 15:33
Created by: pavel.linchik
Organization:
Filename: Get-shedulTask
================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Ping_spiska.ps1 | Ping_spiska.ps1 | Function IpTest
{
param ($Ip)
$IpTest = Test-Connection -ComputerName $ip -Count '2' -Quiet
$IpTest
}
clear
$rez = Get-content -Path 'D:\job\spis_pk.txt' | Where-Object {$_ -ne""}
$rez | ForEach-Object { $i = 0 }{
"{1}" -f $:_, $var
$_
#$Mic = (Get-WmiObject -Query "select * from Win32_S... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-LHSPrinterDriver.ps1 | Get-LHSPrinterDriver.ps1 | Function Get-LHSPrinterDriver
{
<#
.SYNOPSIS
Get Printer Driver Information from local or remote Computers.
.DESCRIPTION
Get Information about Printer Drivers (Driver Version,language, plattform and dependent files).
.PARAMETER ComputerName
The computer name(s) to retrieve the info from.
De... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Show-ProcessTree.ps1 | Show-ProcessTree.ps1 | Function Show-ProcessTree {
[CmdletBinding()]
Param()
Begin {
# Identify top level processes
# They have either an identified processID that doesn't exist anymore
# Or they don't have a Parentprocess ID at all ... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Set-messages.ps1 | Set-messages.ps1 | #Broadcast messages, by Maxzor1908 *12/3/2013*
#$Comp = "it-13.vivadengi.ru"
$Comp = "10.255.111.230"
$msg = "msg * 'вас не слышно))'"
Invoke-WmiMethod -Path Win32_Process -Name Create -ArgumentList $msg -ComputerName $Comp
Get-Service messenger
|
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get_install(Test).ps1 | Get_install(Test).ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 18.01.2016 16:58
Created by: pavel.linchik
Organization:
Filename:
==============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get_compInfo_wmi(test).ps1 | Get_compInfo_wmi(test).ps1 | <#
.Title
14s-CNT390-InceNewman-Get-ComputerInfo
.Description
Collection of functions that retrieve information on the inputted computer. Get-ComputerInfo is dependent on the following functions: Get-DisksToQuery, ExportTo-HTML, Get-IPConfig, Get-DiskDrive, Get-ActiveUser, Get-Users, Get-BiosInfo, Get-... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-DllInfo.ps1 | Get-DllInfo.ps1 | function Get-DllInfo{
param($rootDir = ".")
gci $rootDir -include *.dll -Recurse | % {
Write-Host -Fore Blue Checking $($_.FullName)
try {
$a = [System.Reflection.AssemblyName]::GetAssemblyName($_.FullName)
Write-Host $($a.ProcessorArchi... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/11.ps1 | 11.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 26.02.2016 16:34
Created by: pavel.linchik
Organization:
Filename:
==============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/MPK_vzh.TempPoint.ps1 | MPK_vzh.TempPoint.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.120
Created on: 26.04.2016 13:40
Created by: pavel.linchik
Organization:
Filename:
=============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-IPDetails.ps1 | Get-IPDetails.ps1 | [cmdletbinding()]
param (
[parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
[string[]]$ComputerName = $env:computername
)
begin {}
process {
foreach ($Computer in $Computer... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/CompInfo.ps1 | CompInfo.ps1 | Function WMILookup {
foreach ($StrComputer in $colComputers){
$GenItems1 = gwmi Win32_ComputerSystem -Comp $StrComputer
$GenItems2 = gwmi Win32_OperatingSystem -Comp $StrComputer
$SysItems1 = gwmi Win32_BIOS -Comp $StrComputer
$SysItems2 = gwmi Win32_TimeZone -Comp $StrComputer
$SysItems3 = gwmi Win32_W... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/sss.ps1 | sss.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 24.03.2016 13:47
Created by: pavel.linchik
Organization:
Filename:
==============================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-IP.ps1 | Get-IP.ps1 | $a = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName . |
Select-Object -ExpandProperty IPAddress
$a
New-Label -FontSize 24 -On_Loaded {
Register-PowerShellCommand -scriptBlock {
$window.Content.Content = (ipconfig | out-string).Trim()
}
} -asj... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/FindMac.ps1 | FindMac.ps1 | function FindMac ($Mac) {
$x = 96 #подсети
$y = 1..254 #компы
foreach ($lan in $x) { #перебираем подсети
$y | foreach { #перебираем компы
$Com="10.255.113.$_"
$ping=Get-WmiObject -Query "select * from win32_pingstatus where (address='$comp')"
if ($ping.statusc... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Remove-DelPrintList.ps1 | Remove-DelPrintList.ps1 | <#
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 01.03.2016 17:33
Created by: pavel.linchik
Organization: VivaBablo
Filename:
=====================================... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Get-HostName.ps1 | Get-HostName.ps1 |
<# .DESCRIPTION Get-HostName
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2015 v4.2.81
Created on: 18.01.2016 16:58
Created by: pavel.linchik
Organization: vivadengi
Filename: Get-HostName.... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/New-Shorcut.ps1 | New-Shorcut.ps1 | Function New-Shortcut {
Param([Parameter(Mandatory,
ValueFromPipeline)][System.String]$To)
if ($To.EndsWith(':')) { $To += [char]92 }
try { $target = Get-Item -Force -LiteralPath $To -ea 'Stop' } catch [Exception]{ throw }
$IsDirectory = $target.Mode[0] -eq [char]0x64
$shellObj = New-Object -ComObject "W... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/Copy-WithProgress.ps1 | Copy-WithProgress.ps1 | function Copy-WithProgress {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $Source
, [Parameter(Mandatory = $true)]
[string] $Destination
, [int] $Gap = 200
, [int] $ReportGap = 2000
)
# Define regular expression t... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/назнач_деф_звук.ps1 | назнач_деф_звук.ps1 | $p = "D:\Job\scripts\PowerShell\Projects\Prosluhka\Temp\Role1.txt"
$c = (Get-WmiObject -Query "SELECT Name,DeviceID,PNPDeviceID FROM Win32_SoundDevice WHERE DeviceID='USB\\VID_093A&PID_2700&MI_02\\7&32B00A29&0&0002'")
$c.PNPDeviceID
#cd HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture\
G... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/PoSh_def_zvuk.ps1 | PoSh_def_zvuk.ps1 | #ignore most commented out data like below
#only way to easily input reg-binary is to use an array to set to convert to hex
[int[]]$data = 221,07,12,00,05,00,27,00,17,00,55,00,58,00,143,03
#[hex]$data2 = dd070c0005001200140011002d0015007b00
#bytes = [Text.Encoding]::Unicode.GetBytes($data)
cd HKLM:\SOFTWARE\Mic... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/wmi_zvek_ustr_ud_pk.ps1 | wmi_zvek_ustr_ud_pk.ps1 | #$c = (Get-WmiObject -Query "SELECT * FROM Win32_SoundDevice WHERE DeviceID='USB\\VID_093A&PID_2700&MI_02\\7&32B00A29&0&0002'")
#$c | select-object -Property * | Out-GridView
$a = Get-WmiObject -Query "SELECT * FROM Win32_SoundDevice" -ComputerName OO-KRSULIN-04.vivadengi.ru
$a | Select-Object -Property Captio... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/PrinterUtils.ps1 | PrinterUtils.ps1 | ########################################################
# PrinterUtils.ps1
# Version 0.1.0.0
#
# Functions for advanced printer management
#
# Vadims Podans (c) 2008
# http://www.sysadmins.lv/
########################################################
# внутренняя функция, которая преобразовывает числовой код... |
PowerShellCorpus/Github/nDPavel_PoSh.Test/Function/NAudio(Def_mic).ps1 | NAudio(Def_mic).ps1 |
add-type -Path "D:\Job\scripts\PowerShell\Projects\Prosluhka\soft\NAudio\NAudio.dll"
Add-Type -Path "D:\Job\scripts\PowerShell\Projects\Prosluhka\soft\NAudio\NAudio.WindowsMediaFormat.dll"
$devices = new-object NAudio.CoreAudioApi.MMDeviceEnumerator
$defaultDevice = $devices.GetDefaultAudioEndpoint([NAudio.Cor... |
PowerShellCorpus/Github/wywern209_ProjectPlayground/ProjectPlayground/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/wywern209_ProjectPlayground/ProjectPlayground/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/wywern209_ProjectPlayground/ProjectPlayground/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/wywern209_ProjectPlayground/ProjectPlayground/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/wywern209_ProjectPlayground/ProjectPlayground/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/wywern209_ProjectPlayground/ProjectPlayground/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/wywern209_ProjectPlayground/ProjectPlayground/packages/EntityFramework.6.1.2/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
# MIIa2AYJKoZIhvcNAQcCoIIayTCCGsUCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/wywern209_ProjectPlayground/ProjectPlayground/packages/EntityFramework.6.1.2/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/wywern209_ProjectPlayground/ProjectPlayground/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/WellsFargoFullStackTDD-SantaMonica_Day2/Code/02 - Web API Testing/Start/AdventureWorks/packages/EntityFramework.6.1.1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/WellsFargoFullStackTDD-SantaMonica_Day2/Code/02 - Web API Testing/Start/AdventureWorks/packages/EntityFramework.6.1.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/WellsFargoFullStackTDD-SantaMonica_Day2/Code/02 - Web API Testing/Start/AdventureWorks/packages/Newtonsoft.Json.6.0.3/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/WellsFargoFullStackTDD-SantaMonica_Day2/Code/01 - .NET Testing/Start/AdventureWorks/packages/EntityFramework.6.1.1/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/WellsFargoFullStackTDD-SantaMonica_Day2/Code/01 - .NET Testing/Start/AdventureWorks/packages/EntityFramework.6.1.1/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/WellsFargoFullStackTDD-SantaMonica_Day2/Code/01 - .NET Testing/Start/AdventureWorks/packages/Newtonsoft.Json.6.0.3/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/40a_DotNetService/test.ps1 | test.ps1 | cd (Split-Path -parent $MyInvocation.MyCommand.Definition)
$csc = Join-Path $([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) "csc.exe"
& $csc *.cs
Copy-Item -Force .\DotNetService $env:USERPROFILE\Documents\WindowsPowerShell\Modules\ -Recurse
Import-Module DotNetService
Get-Do... |
PowerShellCorpus/Github/blog-it-koehler-com_mailbox-cleanup.ps1/mailbox-cleanup0-1.ps1 | mailbox-cleanup0-1.ps1 | <#
.SYNOPSIS
script for cleaning up user mailbox/journaling mailbox via scheduled task
.DESCRIPTION
this script was written to clean up journaling mailbox via scheduled task.
You can also use it to clean up every mailbox on your exchange system. Logfiles will be written next to the script
.EXAMPLE
for... |
PowerShellCorpus/Github/NeonSingularity_GoPiGoHdmi/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module
Add-ApplicationInsights $project;
Remove-Module Microsoft.ApplicationInsights;
# SIG # Begin signature block
# MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ... |
PowerShellCorpus/Github/NeonSingularity_GoPiGoHdmi/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module
Add-ApplicationInsights $project;
Remove-Module Microsoft.ApplicationInsights;
# SIG # Begin signature block
# MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ... |
PowerShellCorpus/Github/NeonSingularity_GoPiGoHdmi/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module
Add-ApplicationInsights $project;
Remove-Module Microsoft.ApplicationInsights;
# SIG # Begin signature block
# MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ... |
PowerShellCorpus/Github/NeonSingularity_GoPiGoHdmi/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Checking if Path exists because the websites don't have a project file
if ([System.IO.File]::Exists($project.FullName))
{
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu... |
PowerShellCorpus/Github/NeonSingularity_GoPiGoHdmi/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# Checking if Path exists because the websites don't have a project file
if ([System.IO.File]::Exists($project.FullName))
{
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ... |
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_D_NewRepo_2017_5_26_18_25_11/.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/dfinke_OneGetGistProvider/PublishToGallery.ps1 | PublishToGallery.ps1 |
$p = @{
Name = "GistProvider"
NuGetApiKey = $NuGetApiKey
LicenseUri = "https://github.com/dfinke/OneGetGistProvider/blob/master/LICENSE"
Tag = "Gist","Github","PackageManagement","Provider"
ReleaseNote = "Updated to work with rename to PackageManagement"
ProjectUri = "https://github.co... |
PowerShellCorpus/Github/dfinke_OneGetGistProvider/InstallProvider.ps1 | InstallProvider.ps1 | $ModuleName = "GistProvider"
$ModulePath = "C:\Program Files\WindowsPowerShell\Modules"
$ProviderPath = "$($ModulePath)\$($ModuleName)"
if(!(Test-Path $ProviderPath)) { md $ProviderPath | out-null}
$FilesToCopy = echo GistProvider.psd1 GistProvider.psm1
$FilesToCopy | ForEach {
Copy-Item -Verbose -Pat... |
PowerShellCorpus/Github/eplouhinec_chocolatey-packages/aimp/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $packageName = 'aimp'
$installerType = 'exe'
$url = 'http://files.programki.net/aimp/aimp_3.51.1288.exe'
$url64 = $url
$validExitCodes = @(0)
$programFiles = "${Env:ProgramFiles}"
$processor = Get-WmiObject Win32_Processor
$procCount=(Get-WmiObject Win32_ComputerSystem).NumberofProcessors
if ($procCount -eq '... |
PowerShellCorpus/Github/eplouhinec_chocolatey-packages/ccleaner/tools/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $packageName = 'ccleaner'
$installerType = 'exe'
$url = 'http://fs30.filehippo.com/1293/f19c61d6981e4c3ab4771ec95dd5abd5/ccsetup326.exe'
$url64 = $url
$silentArgs = '/S'
$validExitCodes = @(0)
Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCode... |
PowerShellCorpus/Github/MinxianLi_ASP.NET-Restful-API-AngularJS/AngularJSSample/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/MinxianLi_ASP.NET-Restful-API-AngularJS/AngularJSSample/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/MinxianLi_ASP.NET-Restful-API-AngularJS/AngularJSSample/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/mikeorourkeit_bs2/Exercise30-9-15/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/robertoegvt_ProjetosTeste/NuGetPackage.ps1 | NuGetPackage.ps1 | Param (
[switch]$Publish
)
$ErrorActionPreference = "Stop"
$global:ExitCode = 1
function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true)]
[array] $Messages,
[Parameter()] [ValidateSet("Error", "Warn", "Info")]
[string] $Level = "Info",... |
PowerShellCorpus/Github/robertoegvt_ProjetosTeste/NuGetSetup.ps1 | NuGetSetup.ps1 | Param (
[string]$Url,
[string]$Base64EncodedMessage
)
$ErrorActionPreference = "Stop"
$ExitCode = 1
function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true)]
[array] $Messages,
[Parameter()] [ValidateSet("Error", "Warn", "Info")]
[st... |
PowerShellCorpus/Github/TheWelshFifer_ADOfficeNumber/ADOfficeNumber.ps1 | ADOfficeNumber.ps1 | # Written by James Kelly July 2012.
# Update Office Phone numbers in AD. The commands will search for extension numbers beinging with 7,6,5 or 4.
# it will then prepend the first 9 digits of the DDI. i.e. +44141566 etc.
# A scope can be added by adding a searchbase option to the get-aduser command:
# (-SearchBase ... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_4_29_9_58_58/.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: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.