full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/packages/jQuery.1.7.1.1/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/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/packages/jQuery.1.7.1.1/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 $supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11 if (-not $supportsJsIntelliSenseFile) { Write-Host "IntelliSense JS files are n...
PowerShellCorpus/Github/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/packages/jQuery.1.7.1.1/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/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/FinalExam/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/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/FinalExam/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/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/FinalExam/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/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/FinalExam/packages/jQuery.1.7.1.1/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/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/FinalExam/packages/jQuery.1.7.1.1/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 $supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11 if (-not $supportsJsIntelliSenseFile) { Write-Host "IntelliSense JS files are n...
PowerShellCorpus/Github/Amandeep-saggu_Comp2084-finalExaminatoin/FinalExam/FinalExam/packages/jQuery.1.7.1.1/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/vScripter_OVF.VMware.NSX/Diagnostics/Comprehensive/PowerNSX.Comprehensive.Tests.ps1
PowerNSX.Comprehensive.Tests.ps1
PowerShellCorpus/Github/vScripter_OVF.VMware.NSX/Diagnostics/Simple/PowerNSX.Simple.Tests.ps1
PowerNSX.Simple.Tests.ps1
<# .NOTES TODO: - Start with core functionality - Logical Switches - Logical Routers - Edge Services Gateways - Load-Balancing - VPN - Sub-Feature/Functionality #> $moduleManifestName = 'PowerNSX.psd1' Import-Module -Name $PSScriptRoot\..\$module...
PowerShellCorpus/Github/jasooonko_video_uploader/send-mail.ps1
send-mail.ps1
Param($emails, $subject, $message) $email = "alert.me.jason@gmail.com" $password_file = "C:\VideoUpload\lib\video_uploader\enc_pw.txt" # TO GENERATE ENCRYPTED PASSWORD # $credential = Get-Credential # $credential.Password | ConvertFrom-SecureString | Set-Content c:\scripts\encrypted_password1.txt #$encrypte...
PowerShellCorpus/Github/jasooonko_video_uploader/upload-video.ps1
upload-video.ps1
$debug = $FALSE # Parameters $delete_shortterm_days = 30 $delete_log_days = 30 $config_file = '.\config.xml' $log_folder = '.\log\' $log_file = $log_folder + 'transcode-' + (get-date).toString('yyyyMMdd') + '.log' $log_file # Setup Variable [xml]$conf=Get-Content $config_file $inbox = $conf.config.inbox...
PowerShellCorpus/Github/Cr0n1c_SCCM-Enumeration/Get-CriticalComputers.ps1
Get-CriticalComputers.ps1
Import-Module activedirectory Push-Location #This is for SQL Import-Module sqlps -disablenamechecking pop-Location #Requires MSSQL to be installed or at least the powershell modules <# [+] [AD] Machines that are Domain Controllers [+] [AD] Machines that are in a *server* DN [+] [AD] Machines that ar...
PowerShellCorpus/Github/Cr0n1c_SCCM-Enumeration/Get-PrivyUsers.ps1
Get-PrivyUsers.ps1
Import-Module activedirectory #Not default, must install Import-Module grouppolicy #Not default, must install Function Get-GPPUsers { <# .SYNOPSIS Uses GPOs to determine who is a privileged user for a specific GPO. Without any GUID assigned it will query the Default Domain Controllers Policy. ...
PowerShellCorpus/Github/artemaes_GITDeployment/ProvisionVMs.ps1
ProvisionVMs.ps1
#ProvisionVMs # Name of subscription; "Copy the SubscriptionName property you get from Get-AzureRMSubscription" $SubscriptionName = "MSDN Platforms" # Name of storage account (where VMs will be deployed);Copy the Label property you get from Get-AzureRMStorageAccount $StorageAccount = "artresgroupdisks311" ...
PowerShellCorpus/Github/artemaes_GITDeployment/VaultPS.ps1
VaultPS.ps1
#Requires -Module AzureRM.Profile #Requires -Module AzureRM.KeyVault #Login and Select the default subscription if needed #Login-AzureRmAccount #Select-AzureRmSubscription -SubscriptionName 'subscription name' #Change the values below before running the script $VaultName = 'ARTVault' #Globally Uni...
PowerShellCorpus/Github/artemaes_GITDeployment/AzureCommands.ps1
AzureCommands.ps1
Get-AzureRmLocation | sort DisplayName | Select DisplayName Get-Module -ListAvailable -Name AzureRm.Resources | Select Version $PSVersionTable Add-AzureRMAccount Get-AzureSubscription Login-AzureRmAccount Install-Module AzureRM Import-Module AzureRM Install-Module Azure -Force # to install module despit...
PowerShellCorpus/Github/toddkitta_KaitDeployment/KaitDeployment/Scripts/Deploy-AzureResourceGroup.ps1
Deploy-AzureResourceGroup.ps1
#Requires -Version 3.0 Param( [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation, [string] $ResourceGroupName = 'KaitDeployment', [switch] $UploadArtifacts, [string] $StorageAccountName, [string] $StorageAccountResourceGroupName, [string] $StorageContainerName = $ResourceGroupName.ToLo...
PowerShellCorpus/Github/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/SarahBourgeois_Intranet_AspNetMvc_Project/MVC_WebSite/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/OpenLocalizationTestOrg_olvnexte2etest/.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/GingaNinja_devInstall/SwitchOS.ps1
SwitchOS.ps1
$lc=0 $vt=0 $vf=0 if (Test-Path boot8) { $vt = 8 $vf = 7 } else { $vt = 7 $vf = 8 } $paths = @("support", "sources", "boot", "efi", "bootmgr", "bootmgr.efi", "setup.exe", "autorun.inf") foreach ($path in $paths) { Move-Item $path $path$vf Move-Item $path$vt $path }
PowerShellCorpus/Github/GingaNinja_devInstall/testing.ps1
testing.ps1
function _cmd($command) { $result = cmd.exe /c "$command 2>&1" #stderr hack return $result } function Install-NeededFor { param([string] $packageName = '', [bool] $defaultAnswer = $true) if ($packageName -eq '') {return $false} $yes = '6' $no = '7' $msgBoxTimout='-1' $default...
PowerShellCorpus/Github/GingaNinja_devInstall/setup.ps1
setup.ps1
function _cmd($command) { $result = cmd.exe /c "$command 2>&1" #stderr hack return $result } function Install-NeededFor { param([string] $packageName = '', [bool] $defaultAnswer = $true) if ($packageName -eq '') {return $false} $yes = '6' $no = '7' $msgBoxTimout='-1' $default...
PowerShellCorpus/Github/GingaNinja_devInstall/davearkell.vsextensions.1.08/tools/ChocolateyInstall.ps1
ChocolateyInstall.ps1
$packageName = 'alanstevens.vsextensions' function Get-Batchfile ($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path env:$p -value $v } } function VsVars32() { $BatchFile = join-path $env:VS100COMNTOOLS "vsvars32.bat" Get...
PowerShellCorpus/Github/psd401_eddata-create-freshdesk-clients/create-freshdesk-clients.ps1
create-freshdesk-clients.ps1
<# .SYNOPSIS Script To Query EdData API and Create Freshdesk Clients .DESCRIPTION Loop through all staff in api and check for existing accounts in Freshdesk. If they don't exist in FD, create them. .NOTES File Name : create-freshdesk-clients.ps1 Author : Kris Hagel - hagelk@psd401.net Date : August 6,...
PowerShellCorpus/Github/martinrasmussen_TheUrbanProject/TheUrbanProject/packages/jQuery.2.1.1/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/martinrasmussen_TheUrbanProject/TheUrbanProject/packages/jQuery.2.1.1/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/martinrasmussen_TheUrbanProject/TheUrbanProject/packages/jQuery.2.1.1/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/martinrasmussen_TheUrbanProject/TheUrbanProject/packages/EntityFramework.6.1.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/martinrasmussen_TheUrbanProject/TheUrbanProject/packages/EntityFramework.6.1.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/v-malv_optnmanaged/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) # Main $errorActionPreference = 'Stop' # Step-1 Download buildcore script to local echo "download build core script to local with source ur...
PowerShellCorpus/Github/tothebeat_powershell/O365/Import365Commands.ps1
Import365Commands.ps1
$UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session -Prefix '365'
PowerShellCorpus/Github/tothebeat_powershell/O365/AddExplicitSAFAPermissionsToMailbox.ps1
AddExplicitSAFAPermissionsToMailbox.ps1
Param($MAILBOXALIAS, $REQUESTEDUSER) Add-365RecipientPermission $MAILBOXALIAS -trustee "$REQUESTEDUSER" -AccessRights SendAs Get-365Mailbox "$MAILBOXALIAS" | Add-365MailboxPermission -User "ADS\$REQUESTEDUSER" -AccessRights 'FullAccess' -automapping:$false
PowerShellCorpus/Github/tothebeat_powershell/O365/GetExplicitSAFAPermissionsOnMailbox.ps1
GetExplicitSAFAPermissionsOnMailbox.ps1
Param($MAILBOXALIAS) Get-User -identity $MAILBOXALIAS | Get-365RecipientPermission | Where-Object {($_.AccessRights -match "SendAs") -and -not ($_.User -like "nt authority\self")} | Format-Table Identity, User -auto Get-365Mailbox "$MAILBOXALIAS" | Get-365MailboxPermission | Where-Object {($_.AccessRights -match "Ful...
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/GetExplicitMailboxPermissionsByNetID.ps1
GetExplicitMailboxPermissionsByNetID.ps1
param ($user = $(throw "Usage: GetExplicitMailboxPermissionsByNetID.ps1 {NetID}")) Get-MailboxPermission org-ksm-* -resultsize unlimited | Where-Object {$_.user -like "*$user"} | fl -property *
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/HideMailbox.ps1
HideMailbox.ps1
Param($MAILBOXALIAS) Set-Mailbox $MAILBOXALIAS -HiddenFromAddressListsEnabled $true
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/RemoveExplicitSAFAPermissionsToMailbox.ps1
RemoveExplicitSAFAPermissionsToMailbox.ps1
Param($MAILBOXALIAS, $REQUESTEDUSER) get-user -identity "$MAILBOXALIAS" | Remove-ADPermission -User "ADS\$REQUESTEDUSER" -ExtendedRights Send-As Get-Mailbox "$MAILBOXALIAS" | Remove-MailboxPermission -User "ADS\$REQUESTEDUSER" -AccessRights 'FullAccess'
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/GetMailboxVisibility.ps1
GetMailboxVisibility.ps1
Param($MAILBOXALIAS) Get-Mailbox $MAILBOXALIAS | Format-List hidden*
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/AddExplicitSAFAPermissionsToMailbox.ps1
AddExplicitSAFAPermissionsToMailbox.ps1
Param($MAILBOXALIAS, $REQUESTEDUSER) get-user -identity "$MAILBOXALIAS" | Add-ADPermission -User "ADS\$REQUESTEDUSER" -ExtendedRights Send-As -DomainController evcspdc3 Get-Mailbox "$MAILBOXALIAS" | Add-MailboxPermission -User "ADS\$REQUESTEDUSER" -AccessRights 'FullAccess' -DomainController evcspdc3 -automapping:$fa...
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/GetExplicitSAFAPermissionsOnMailbox.ps1
GetExplicitSAFAPermissionsOnMailbox.ps1
param ($MAILBOXALIAS = $(throw "Usage: GetSAFAListForMailbox.ps1 {MailboxAlias}")) Get-User -identity $MAILBOXALIAS | Get-ADPermission | Where-Object {($_.ExtendedRights -like "*send-as*") -and -not ($_.User -like "nt authority\self")} | Format-Table Identity, User -auto Get-Mailbox $MAILBOXALIAS | Get-MailboxPermiss...
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/GetGroupMembers.ps1
GetGroupMembers.ps1
Param($GROUPNAME) Get-ADGroupMember -identity "$GROUPNAME" -Recursive | foreach{ get-aduser $_} | select SamAccountName, GivenName, Surname, ObjectClass
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/GetDistributionListMembership.ps1
GetDistributionListMembership.ps1
Param($DL_ALIAS) Get-DistributionGroupMember $DL_ALIAS | sort -Property DisplayName | Select DisplayName, Alias, PrimarySmtpAddress, Department
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/GetDistributionListOwners.ps1
GetDistributionListOwners.ps1
Param($DL_ALIAS) Get-DistributionGroup -Identity $DL_ALIAS | Format-List ManagedBy
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/AddManagerToDL.ps1
AddManagerToDL.ps1
Param($DLALIAS, $MANAGERNETID) $newmanager = get-user $MANAGERNETID $group = Get-DistributionGroup $DLALIAS $managers = $group.ManagedBy $newmanagers = $managers + $newmanager Set-DistributionGroup -BypassSecurityGroupManagerCheck -ManagedBy $newmanagers -Identity $DLALIAS
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/AddMembersToDLFromCSV.ps1
AddMembersToDLFromCSV.ps1
Param($DLALIAS, $CSVFILENAME) Import-CSV "$CSVFILENAME" | ForEach {Add-DistributionGroupMember -Identity "$DLALIAS" -Member $_.Name}
PowerShellCorpus/Github/tothebeat_powershell/OnPrem/UnhideMailbox.ps1
UnhideMailbox.ps1
Param($MAILBOXALIAS) Set-Mailbox $MAILBOXALIAS -HiddenFromAddressListsEnabled $false
PowerShellCorpus/Github/jfairchild_PowerShellScripts/StartFBTorn.ps1
StartFBTorn.ps1
$ff = Get-Process firefox if($ff -ne $null) { Stop-Process -Id $ff.Id } Start-Process 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe' -ArgumentList "-new-window http://facebook.torn.com"
PowerShellCorpus/Github/anfeng8379_Fullsee/MvcApplication1/packages/jQuery.2.1.3/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/anfeng8379_Fullsee/MvcApplication1/packages/jQuery.2.1.3/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/anfeng8379_Fullsee/MvcApplication1/packages/jQuery.2.1.3/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/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/packages/Newtonsoft.Json.6.0.8/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) # open json.net splash page on package install # don't open if json.net is installed as a dependency try { $url = "http://james.newtonking.com/json/install?version=" + $package.Version $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWin...
PowerShellCorpus/Github/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/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/anfeng8379_Fullsee/MvcApplication1/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/TUCTechnologies_MySQLBackup/mysql-backup.ps1
mysql-backup.ps1
Set-ExecutionPolicy Unrestricted # Obtain formatted date (1970-01-01_23-01-59)" $date = Get-Date -UFormat "%Y-%m-%d_%H-%M-%S" # Location of backup files $filePath = "C:\TempPath\mysql_labtech_" + $date $backupFilePath = $filePath + ".sql" $archiveFilePath = $filePath + ".7z" #$logFilePath = $filePath + ".log...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/Inventory.ps1
Inventory.ps1
############################################################################## ## ## Inventory ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## <# .SYNOPSIS Serves as the ...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/TabExpansion.ps1
TabExpansion.ps1
############################################################################## ## ## TabExpansion2 ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## function TabExpansion2 { ...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/VerifyCategoryRule.ps1
VerifyCategoryRule.ps1
## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) Set-StrictMode -Version 3 if($message.Body -match "book") { [Console]::WriteLine("This is a message about the book.") } else { [Console]::WriteLine("This is an unknown message.") }
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/LibraryDirectory.ps1
LibraryDirectory.ps1
## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) Set-StrictMode -Version 3 ## Get the size of all the items in the current directory function Get-DirectorySize { <# .EXAMPLE PS > $DebugPreference = "Continue" PS > Get-DirectorySize DE...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/LibraryPrompt.ps1
LibraryPrompt.ps1
############################################################################## ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## Set-StrictMode -Version 3 function Prompt { ...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/LibraryProperties.ps1
LibraryProperties.ps1
############################################################################## ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## filter Get-PropertyValue($property) { $_.$pro...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/LibraryInvocation.ps1
LibraryInvocation.ps1
## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) Set-StrictMode -Version 3 ## Return the name of the currently executing script ## By placing this in a function, we drastically simplify ## the logic it takes to determine the currently running ## script functi...
PowerShellCorpus/Github/LeeHolmes_PowerShellCookbook/LibraryInputComparison.ps1
LibraryInputComparison.ps1
## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) Set-StrictMode -Version 3 ## Process each element in the pipeline, using a ## foreach statement to visit each element in $input function Get-InputWithForeach($identifier) { Write-Host "Beginning InputWithFore...
PowerShellCorpus/Github/inesphreis_Servidor/TesteServico/packages/EntityFramework.6.1.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/inesphreis_Servidor/TesteServico/packages/EntityFramework.6.1.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/Inf-matheus_Isys/heck.ps1
heck.ps1
#Checking services that Should be Started $GenServices = Get-Service -Name ConfigServerST_1,DBServer_1,GDA,LCA,TSrvAvayaTSAPI_3 foreach ($serv in $GenServices) { if ($serv.status -ne "Running") { write-host $serv.Name erro } } #Checking services that Should be Stopped $GenServices = G...
PowerShellCorpus/Github/Inf-matheus_Isys/check_Services.ps1
check_Services.ps1
#Checking services that Should be Started $GenServices = Get-Service -Name ConfigServerST_1,DBServer_1,GDA,LCA,TSrvAvayaTSAPI_3 foreach ($serv in $GenServices) { if ($serv.status -eq "Running") { write-host $serv.Name ok } else {write-host $serv.name NOK - VERIFIQUE} } #Checking service...
PowerShellCorpus/Github/Inf-matheus_Isys/find_tomcat_error.ps1
find_tomcat_error.ps1
#find the file by filter (-fi) name, contaning stderr $Logfolder = "C:\Temp\Tocmat" $err = gci $LogFolder -fi *stderr* if ($err -eq $null) {Echo "Arquivo n„o encontrado"} else { #get last modifying date echo "Arquivo encontrado:" ; $err.LastwriteTime #Checa se o arquivo foi modificado nas ultimas 24h if ($err....
PowerShellCorpus/Github/alexbazzi_timAer/timAer.ps1
timAer.ps1
#TimAer #Clocking system for employee time logging #Author: Alexander Bazzi #Released June 18 2014 $title = "Check in/out" $message = "Are you checking in or out?" $in = New-Object System.Management.Automation.Host.ChoiceDescription "&In", ` "Checks the user in" $out = New-Object System.Management.Automat...
PowerShellCorpus/Github/DegJ_INFBCsharpProject/Rss Reader/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/DegJ_INFBCsharpProject/Rss Reader/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/OPS-E2E-PPE_E2E_D_Provision_2017_4_27_20_58_39/.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/nvpnathan_powercli/shutdowndelete.ps1
shutdowndelete.ps1
set-PowerCLIConfiguration -invalidCertificateAction "ignore" -confirm:$false $vlabesx80="192.168.79.80" $vlabesx90="192.168.79.90" $vlabesx100="192.168.79.100" #Connect to vlabesx80 server Connect-VIServer $vlabesx80 -user root -password $vmObj = Get-VM foreach($active in $vmObj){ if($active.PowerState -eq...
PowerShellCorpus/Github/nvpnathan_powercli/poweroffvms.ps1
poweroffvms.ps1
$vlabesx80="192.168.79.80" $vlabesx90="192.168.79.90" $vlabesx100="192.168.79.100" #Connect to vlabesx80 server connect-viserver $vlabesx80 -user root -p $vmservers=Get-VM | Where-Object {$_.powerstate -eq ‘PoweredOn’} #power off vm's $vmservers | stop-vm -Confirm:$false
PowerShellCorpus/Github/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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/NeilRelatado_mitoNavigator/mitoNavigator/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...