full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/djbs9_SPAdminSite/admin.ps1
admin.ps1
#This is a test scrit Write-Host "test2"
PowerShellCorpus/Github/mohsa62_p0w3r5311/View-ImageDrivers.ps1
View-ImageDrivers.ps1
function View-ImageDrivers { [CmdletBinding()] param ( [Parameter(Mandatory=$True,Position=1)] [string]$ImageFile ) $IMGidxContent = Get-WindowsImage -ImagePath $ImageFile if ($IMGidxContent.count -gt 1) { $IMGidxContent | Format-Table @{ Label = "I...
PowerShellCorpus/Github/karlochacon_AzureAutomation/SourceTest.ps1
SourceTest.ps1
Write-Output “Azure Automation Rocks!” Write-Output "Azure Automation Rocks Harder - with GitHub!"
PowerShellCorpus/Github/machariachege_Cloud/Deploy.ps1
Deploy.ps1
<# Use this following to Deploy the project #> $test = & ".\AzureAssignment.ps1" ` -ServiceName "jpggTest" ` -ServiceLocation "Lincoln" ` -sqlAppDatabaseName "MyData" ` -StartIPAddress "1.0.0.1" ` -EndIPAddress "255.255.255.255" ` -ConfigurationFilePath ".\...
PowerShellCorpus/Github/machariachege_Cloud/AzureAssignment.ps1
AzureAssignment.ps1
# Defining the Parameter Param( #Cloud-services Name [Parameter(Mandatory = $true)] [String]$ServiceName, #Cloud-Service location [Parameter(Mandatory = $true)] [String]$ServiceLocation, #Database-application name [Parameter(Mandatory = $true)] [Strin...
PowerShellCorpus/Github/MozRelOps_mozilla-build/chocolatey/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = 'mozilla-build' $fileType = 'exe' $url = 'http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-2.0.0.exe' $silentArgs = '/S' Install-ChocolateyPackage $packageName $fileType $silentArgs $url
PowerShellCorpus/Github/mlowijs_files/InstallNetFx47.ps1
InstallNetFx47.ps1
#Requires -Version 3.0 <# .DESCRIPTION Install .Net Framework 4.7 #> [CmdletBinding()] Param( [switch]$norestart ) Set-StrictMode -Version Latest $logFile = Join-Path $env:TEMP -ChildPath "InstallNetFx47ScriptLog.txt" # Check if the latest NetFx47 version exists $netFxKey = Get-ItemPrope...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1485511541545/.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/kedonov_testingKed_zh-TW/.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/LennartKoot_Start-Chrome.ps1/Start-Chrome.ps1
Start-Chrome.ps1
<# .Synopsis This function is an easy way to start Google Chrome from the command line. It includes Incognito, Restore-Session and options to open one or multiple tabs with addresses or searches. .Parameter Help | H Open the Help Page for this function .Parameter Incognito | I Open Chrome in Incogni...
PowerShellCorpus/Github/MauroGardani_TSExchangeHybrid/TSExchangeHybrid_example.ps1
TSExchangeHybrid_example.ps1
### TSExchangeHybrid 03/04/2017 if (Get-Module TSExchangeHybrid) { Remove-Module TSExchangeHybrid -Verbose} Import-Module \\peg\edp\mauro\src\powershell\exchange\TSExchangeHybrid -Verbose if ( ! ($objMyCredential) ) { $objMyCredential = Get-MyCredential } if ( !(Get-Command Get-Mailbox -ErrorAction Silently...
PowerShellCorpus/Github/TigerScript_bootstrap/installwmf5.ps1
installwmf5.ps1
$source = 'http://go.microsoft.com/fwlink/?LinkId=717507' $destination = "$env:temp\wmf5.msu" $webclient = New-Object Net.webclient $webclient.DownloadFile($source,$destination) Start-Sleep -s 10 Start-Process "$destination" -ArgumentList '/quiet'
PowerShellCorpus/Github/TigerScript_bootstrap/bootstrap12R2.ps1
bootstrap12R2.ps1
Write-Host '#################################################################################' Write-Host 'This script bootstraps the Windows server to be managed by Puppet and Chocolatey' Write-Host '#################################################################################' Write-Host 'You are required to e...
PowerShellCorpus/Github/TigerScript_bootstrap/bootstrap.ps1
bootstrap.ps1
$server = 'config.23technology.com' $lowervmname = $vmname.ToLower() $certname = "$lowervmname.lab.school.lan" $environment = 'school' # # Install Chocolatey iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) # Install Puppet choco install puppet -y # Create Puppet Config t...
PowerShellCorpus/Github/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/Blackbaud-JonathanBell_JonsTestRepo/TestWebSolution/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/shaobozi_PsScripts/DirBookmark.ps1
DirBookmark.ps1
$marks = @{}; $marksPath = Join-Path $PSScriptRoot .bookmarks if(test-path $marksPath){ import-csv $marksPath | %{$marks[$_.key]=$_.value} } function mdump{ $marks.getenumerator() | export-csv $marksPath -notype } function m($bookmark){ $marks["$bookmark"] = (pwd).path mdump } function g($bookmark...
PowerShellCorpus/Github/shaobozi_PsScripts/mis.ps1
mis.ps1
# copy current path to clipboard function ccp{ (pwd).ToString() | clip } # create new file with specific name function nf($filename){ New-Item -ItemType file $filename } function find($keyword){ Everything.exe -s $keyword }
PowerShellCorpus/Github/shaobozi_PsScripts/invokeExe.ps1
invokeExe.ps1
######## Invoke executables in your powershell with lightening speed! $exes = @{}; $exesPath = Join-Path $PSScriptRoot .exes if(test-path $exesPath){ import-csv $exesPath | %{$exes[$_.key]=$_.value} } function iexesdump{ $exes.getenumerator() | export-csv $exesPath -notype } function regexe($nickName...
PowerShellCorpus/Github/shaobozi_PsScripts/cmd_vpn/cmd_vpn.ps1
cmd_vpn.ps1
$vpn_name = @("tokyo","Seoul") $acount_file = Join-Path $PSScriptRoot vpn.count $usr_name = Get-Content $acount_file | Select-Object -index 0 $pswd = Get-Content $acount_file | Select-Object -index 1 function Start-VPN($index){ & rasdial $vpn_name[$index] $usr_name $pswd } function Stop-VPN($index){ ...
PowerShellCorpus/Github/tengshg_simple-notes/win/paste2Notes.ps1
paste2Notes.ps1
$path = "$HOME\myNotes" $notesFile = (Get-date -Format 'yyyyMM') + '.mkd' $theImgae = Get-Clipboard -Format Image If ($theImgae) {     $imageFile = "$path\" + (Get-date -Format 'yyyyMMdd-HHmmsshh') + '.png'     $theImgae.Save($imageFile,'png') $theNotes = "* ![]($imageFile){width=640}`r`n"     Out-Fi...
PowerShellCorpus/Github/tengshg_simple-notes/win/input2Notes.ps1
input2Notes.ps1
$notesFile = "$HOME\myNotes\" + (Get-date -Format 'yyyyMM') + '.mkd' $theText = Read-Host -Prompt "Input the notes text" $theNotes = "* $theText`r`n" Out-File -FilePath $notesFile -Encoding utf8 -InputObject $theNotes -Append
PowerShellCorpus/Github/gummozz_Not-so-stupid-powershell-scripts/Stupidly_fast_powershell_regex_read_write.ps1
Stupidly_fast_powershell_regex_read_write.ps1
#example regex with groups $regex = New-Object -TypeName RegEx -ArgumentList '((?<=\[)(.*?)(?=\]))|((\d{4}\-\d{2}\-\d{2}))|((?<=\d{2}\:\d{2}\:\d{2}\s)\w+(?=\s))|((?<=\s\()(.*?)(?=\),\s))','compiled' $sr = New-Object System.IO.StreamReader("C:\temp\read.txt") $results = $regex.Matches($sr.ReadToEnd()) $sr.Close()...
PowerShellCorpus/Github/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/SezginEge_Netduino-Plus-2-Sample-Apps/Azure-Blob-Storage-AspNet-Web-Api/TempBackend/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/wangyuhang66_HiCommunity/HiCommunity/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/Araya001_Project-SAM/Project_SAM/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/Araya001_Project-SAM/Project_SAM/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/ericln_Agrius/open-source/clone.ps1
clone.ps1
Clear-Host $scriptpath = $MyInvocation.MyCommand.Path $dir = Split-Path $scriptpath Set-Location -Path $dir [xml]$repos = Get-Content repositories.xml $repos.repositories.repo | Foreach-Object { $repo = $_ $type = $repo.type $name = $repo.name if (!(Test-Path $repo.name)) { $url = $repo.url ...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_5_17_17_0_37/.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/rsgfernandes_zabbix-api-powershell-scripts/config-zabbix.ps1
config-zabbix.ps1
#rodrigofernandes@outlook.com #the instanceID variable can be changed for different values to set the host name in zabbix config filepath #here, i used a call to AWS to collect the instance-id $instanceID = invoke-restmethod -uri http://169.254.169.254/latest/meta-data/instance-id $filepath="C:\Zabbix\conf\zabbix_a...
PowerShellCorpus/Github/rsgfernandes_zabbix-api-powershell-scripts/shutdown-zabbix.ps1
shutdown-zabbix.ps1
#rodrigofernandes@outlook.com #zabbix endpoint connection $ZABBIX_USER="tyoe your zabbix user" $ZABBIX_PASS="type your zabbix password" $uri="$uri="http://yourzabbixurl/api_jsonrpc.php"" $hostipaddress=((ipconfig | findstr [0-9].\.)[0]).Split()[-1] $filepath='c:\windows\temp\zabbix-hostid.txt' #zabbix api auth...
PowerShellCorpus/Github/rsgfernandes_zabbix-api-powershell-scripts/install-zabbix.ps1
install-zabbix.ps1
#rodrigofernandes@outlook.com $downloadedfilespath="C:\Windows\Temp\Zabbix" $downloadedzabbixpath="C:\Windows\Temp\Zabbix\zabbix" $installdestination="C:\" $installedzabbixpath="C:\zabbix" $bucketname="type your bucketname here" $keyprefix="type the key prefix here" #download files from S3 Bucket Read-S3Objec...
PowerShellCorpus/Github/rsgfernandes_zabbix-api-powershell-scripts/startup-zabbix.ps1
startup-zabbix.ps1
#rodrigofernandes@outlook.com #zabbix endpoint connection $ZABBIX_USER="type your zabbix user" $ZABBIX_PASS="type your zabbix password" $uri="http://yourzabbixurl/api_jsonrpc.php" $hostipaddress=((ipconfig | findstr [0-9].\.)[0]).Split()[-1] $filepath='c:\windows\temp\zabbix-hostid.txt' $host_group_name="type yo...
PowerShellCorpus/Github/ayatokura_PowerShell_Sample/InfiniteLoopTime.ps1
InfiniteLoopTime.ps1
# PowerShellを試してみるためのサンプルスクリプトです。 # これを実行すると強制終了するまで30秒毎に日付と時間を表示します。 # 無限ループ # 強制終了されるまで、永遠に処理を繰り返します。 while(1) { # メッセージを表示します。 Write-Output ('日時:' + (Get-Date -format yyyyMMdd_HHmmss)) # 30秒待機します。 Start-Sleep -Seconds 30 }
PowerShellCorpus/Github/Polonius19_PoSH/func_getfailoverhistory.ps1
func_getfailoverhistory.ps1
Function Get-FailOverHistory([string]$server, [string]$start, [string]$end) { if ($start.length -eq 0){$end = "14"} if ($end.length -eq 0){$end = "0"} #Mod-OSVersion #. $env:My_dir\mod-osversion.ps1 $OS = Mod-OSVersion $server if ($OS -ne "Server 2008"){ Write-Host "This function will only retur...
PowerShellCorpus/Github/Polonius19_PoSH/mod-osversion.ps1
mod-osversion.ps1
function Mod-OSVersion ([string]$server) { $srv = $server.toupper() $OSVer = (Get-WmiObject Win32_OperatingSystem -ComputerName $srv).Version if ($OSVer -match "5.2.[\d]{4}") { $OS_return = "Server 2003" return $OS_return } elseif ($OSVer -match "6.[\d].[\d]{4}") { $OS_return = "Server 2008" r...
PowerShellCorpus/Github/jwcolbert_playbooks/wintest/templates/LogOnAsAService.ps1
LogOnAsAService.ps1
Param([Parameter(Mandatory=$true)][string]$cfwinuser) Set-ExecutionPolicy Unrestricted #Get SID from current user $objUser = New-Object System.Security.Principal.NTAccount("$ENV:userdomain\$cfwinuser") $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) $MySID = $strSID.Value #Get lis...
PowerShellCorpus/Github/rickmns_Scripts/import-permissions.ps1
import-permissions.ps1
### # Purpose : Import vCenter roles and permissions into a new vCenter. # Created : 18/08/2010 # Author : VMware Community, namely Alan Renouf and Luc Dekens # Pre-requisites : Source file c:\vcenter-permissions.xml ### # Functions function New-Role { param($name, $privIds) Be...
PowerShellCorpus/Github/rickmns_Scripts/vCPU-Check.ps1
vCPU-Check.ps1
$TotalNumvCPUs = 0 Foreach ($Cluster in (Get-Cluster |Sort Name)){ $HostNumvCPUs = 0 Write-Host “Cluster: $($Cluster.name)“ Foreach ($ESXHost in ($Cluster |Get-VMHost |Sort Name)){ Write-Host “ Host: $($ESXHost.name)“ $RunningLimit = $null $RunningLimit = ($ESXHost |Get-VMHostAdvancedConfiguration).get_Item(“Mis...
PowerShellCorpus/Github/rickmns_Scripts/vDS-backup.ps1
vDS-backup.ps1
Connect-VIServer vcenter.tamu.edu Get-VDSwitch -Name dvS-TAMU | Get-VDPortgroup | Foreach { Export-VDPortGroup -VDPortGroup $_ -Description “Backup of $($_.Name) PG” -Force -Destination “C:\Backups\$($_.Name).Zip”}
PowerShellCorpus/Github/rickmns_Scripts/export-permissions.ps1
export-permissions.ps1
### # Purpose : Export vCenter roles and permissions to c:\vcenter-permissions.xml # Created : 18/08/2010 # Author : VMware Community, namely Alan Renouf and Luc Dekens # Pre-requisites : none ### # Parameters $OutputDir = "C:\" # Root of the XML file $global:vInventory = [xml]"<Inve...
PowerShellCorpus/Github/rickmns_Scripts/find-mac.ps1
find-mac.ps1
$report =@() Get-VM | Get-View | %{ $VMname = $_.Name $_.guest.net | where {$_.MacAddress -eq "00:50:56:b2:7d:e4"} | %{ $row = "" | Select VM, MAC $row.VM = $VMname $row.MAC = $_.MacAddress $report += $row } } $report
PowerShellCorpus/Github/rickmns_Scripts/idleconnections.ps1
idleconnections.ps1
$vcenterserver = "vcenter.tamu.edu" Add-PSSnapin VMware.VimAutomation.Core # Add PowerCLI commandlets. Connect-VIServer -server $vcenterserver . C:\Users\rsadmin\Desktop\Scripts\Get-VIsession.ps1 . C:\Users\rsadmin\Desktop\Scripts\Disconnect-ViSession.ps1 Get-VISession | Where { $_.IdleMinutes -gt 180} | D...
PowerShellCorpus/Github/rickmns_Scripts/newchangeroot.ps1
newchangeroot.ps1
#Read in old passwords, masked $oldpw = read-host -prompt "Enter the current root password" -AsSecureString $newpw = read-host -prompt "Enter the desired new root password" -AsSecureString #Decrypting for actual use $oldpw = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.m...
PowerShellCorpus/Github/rickmns_Scripts/Kill-test.ps1
Kill-test.ps1
$vcenterserver = "vcenter.tamu.edu" #Enter the FQDN or IP of your vCenter server Connect-VIServer -server $vcenterserver Get-VISession | Where { $_.IdleMinutes -gt 30 } | Disconnect-ViSession
PowerShellCorpus/Github/rickmns_Scripts/set-ntp.ps1
set-ntp.ps1
#Edit the $NTPServers variable to create a comma delimited list of the NTP Servers that your ESXi hosts should use $NTPServers = "165.91.23.54", "165.91.22.66" #Edit this Get-VMHost command to limit the scope of the script. For example, "Get-VMHost *test*" will only target hosts with "test" in their name $AllHosts ...
PowerShellCorpus/Github/rickmns_Scripts/Disconnect-ViSession.ps1
Disconnect-ViSession.ps1
Function Disconnect-ViSession { <# .SYNOPSIS Disconnects a connected vCenter Session. .DESCRIPTION Disconnects a open connected vCenter Session. .PARAMETER SessionList A session or a list of sessions to disconnect. .EXAMPLE PS C:\> Get-VISession | Where { $_.IdleMinutes -gt 5 } | Disconnect-ViSession ...
PowerShellCorpus/Github/rickmns_Scripts/Get-VIsession.ps1
Get-VIsession.ps1
Function Get-ViSession { <# .SYNOPSIS Lists vCenter Sessions. .DESCRIPTION Lists all connected vCenter Sessions. .EXAMPLE PS C:\> Get-VISession .EXAMPLE PS C:\> Get-VISession | Where { $_.IdleMinutes -gt 5 } #> $SessionMgr = Get-View $DefaultViserver.ExtensionData.Client.ServiceContent.SessionManager ...
PowerShellCorpus/Github/rickmns_Scripts/NIC-type.ps1
NIC-type.ps1
# Get the Virtual Network Adapter # # Niklas Ċkerlund / RTS $VMs = Get-Cluster DRS-Teague-2 |Get-ResourcePool Util* | Get-VM $Data = @() foreach ($VM in $VMs){ $NICs = Get-NetworkAdapter -VM foreach ($NIC in $NICs) { $into = New-Object PSObject Add-Member -InputObject $into -MemberType NoteProperty -Name VMn...
PowerShellCorpus/Github/rickmns_Scripts/Created By.ps1
Created By.ps1
Connect-VIServer vcenter.tamu.edu # Uncomment the next line to test this script and tell you what it would do ! # $WhatIfPreference = $true if (-not (Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue)) { Add-PSSnapin VMware.VimAutomation.Core } if (-not (Get-PSSnapin Quest.ActiveRoles.ADManage...
PowerShellCorpus/Github/rickmns_Scripts/Kill-Sessions.ps1
Kill-Sessions.ps1
Add-PSSnapin VMware.VimAutomation.Core # Add PowerCLI commandlets Function Get-ViSession { <# .SYNOPSIS Lists vCenter Sessions. .DESCRIPTION Lists all connected vCenter Sessions. .EXAMPLE PS C:\> Get-VISession .EXAMPLE ...
PowerShellCorpus/Github/rickmns_Scripts/checkdisk.ps1
checkdisk.ps1
#Connect-VIServer vcenter.tamu.edu $report = @() #Sets path to where the report will be sent to...this will go to your desktop $path = $HOME + '\desktop\VM_Disk_Detail.csv' #gets all the VMs in the vCenter servers $vmx = Get-VM | sort name foreach ($vm in $vmx) { #Pull in the HDs associated...
PowerShellCorpus/Github/rickmns_Scripts/Host-serial.ps1
Host-serial.ps1
function Get-VMHostWSManInstance { param ( [Parameter(Mandatory=$TRUE,HelpMessage="VMHosts to probe")] [VMware.VimAutomation.ViCore.Impl.V1.Inventory.VMHostImpl[]] $VMHost, [Parameter(Mandatory=$TRUE,HelpMessage="Class Name")] [string] $class, [switch] $ignoreCertFailure...
PowerShellCorpus/Github/rickmns_Scripts/set-time.ps1
set-time.ps1
## Setting time on many ESXi hosts through PowerCLI Get-Cluster DRS-Exch-Teague-1 |Get-VMHost | Where-Object { $t = Get-Date $dst = $_ | %{ Get-View $_.ExtensionData.ConfigManager.DateTimeSystem } $dst.UpdateDateTime((Get-Date($t.ToUniversalTime()) -format u)) }
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSD.Extensions.Client/SPSD.Extensions.Client.ps1
SPSD.Extensions.Client.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 14.0.0.0 # Url : # Creator : Bernd Rickenberg ############################################################################### # TODO: More description...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/SPSD_Base.ps1
SPSD_Base.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/SPSD_Deployment.ps1
SPSD_Deployment.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/CustomTargets.ps1
CustomTargets.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/SPSD_Extensions.ps1
SPSD_Extensions.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/SPSD_Main.ps1
SPSD_Main.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/SPSD_Utilities.ps1
SPSD_Utilities.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/Extensions/SPSD.Extensions.Client/SPSD.Extensions.Client.ps1
SPSD.Extensions.Client.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 15.0.0.0 # Url : # Creator : Bernd Rickenberg ############################################################################### # TODO: More description...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/14/SPSDExtensions.Samples/Scripts/Extensions/Example/Example.ps1
Example.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig # License : MS-PL # File : ExampleExtension.ps1 ############...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/SPSD_Base.ps1
SPSD_Base.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/SPSD_Deployment.ps1
SPSD_Deployment.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/CustomTargets.ps1
CustomTargets.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/SPSD_Extensions.ps1
SPSD_Extensions.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/SPSD_Main.ps1
SPSD_Main.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/SPSD_Utilities.ps1
SPSD_Utilities.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/Extensions/SPSD.Extensions.Client/SPSD.Extensions.Client.ps1
SPSD.Extensions.Client.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # SPSD.Extensions.Client # Wrapper for client (CSOM) PowerShell deployment extensions # Allows you currently to deploy files and workflows to SharePoint on-prem and Online # Version : 15.0...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/SPO/SPSDExtensions.Samples/Scripts/Extensions/Example/Example.ps1
Example.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig # License : MS-PL # File : ExampleExtension.ps1 ############...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSD.Extensions.Client/SPSD.Extensions.Client.ps1
SPSD.Extensions.Client.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 14.0.0.0 # Url : # Creator : Bernd Rickenberg ############################################################################### # TODO: More description...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSDExtensions.Samples/Scripts/SPSD_Base.ps1
SPSD_Base.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSDExtensions.Samples/Scripts/SPSD_Deployment.ps1
SPSD_Deployment.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSDExtensions.Samples/Scripts/CustomTargets.ps1
CustomTargets.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSDExtensions.Samples/Scripts/SPSD_Extensions.ps1
SPSD_Extensions.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSDExtensions.Samples/Scripts/SPSD_Main.ps1
SPSD_Main.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...
PowerShellCorpus/Github/rickenberg_SPSD.Extensions/15/SPSDExtensions.Samples/Scripts/SPSD_Utilities.ps1
SPSD_Utilities.ps1
############################################################################### # SharePoint Solution Deployer (SPSD) # Version : 5.0.3.6438 # Url : http://spsd.codeplex.com # Creator : Matthias Einig, http://twitter.com/mattein # License : MS-PL ###########################...