full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/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/x00090749_androidsample/RESTful Services/GradeCalc/packages/jQuery.1.8.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/x00090749_androidsample/RESTful Services/GradeCalc/packages/jQuery.1.8.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/x00090749_androidsample/RESTful Services/GradeCalc/packages/jQuery.1.8.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/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/x00090749_androidsample/RESTful Services/Hello/packages/jQuery.1.8.2/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Determine the file paths $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName if (Test-Path $projectIntelliSense...
PowerShellCorpus/Github/x00090749_androidsample/RESTful Services/Hello/packages/jQuery.1.8.2/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # VS 11 and above supports the new intellisense JS files $vsVersion = [System.Version]::Parse($dte.Version) $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 if (-not $supportsJsIntelliSenseFile) { $displayVersio...
PowerShellCorpus/Github/x00090749_androidsample/RESTful Services/Hello/packages/jQuery.1.8.2/Tools/common.ps1
common.ps1
function Get-Checksum($file) { $cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider" $fileInfo = Get-Item $file trap { ; continue } $stream = $fileInfo.OpenRead() if ($? -eq $false) { # Couldn't open file for reading return $null } $bytes = $...
PowerShellCorpus/Github/abettadapur_BellyofAuthorityMX/TheBellyofAuthority/AppPackages/TheBellyofAuthority_1.0.0.2_AnyCPU_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/abettadapur_BellyofAuthorityMX/TheBellyofAuthority/AppPackages/TheBellyofAuthority_1.0.0.1_AnyCPU_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/abettadapur_BellyofAuthorityMX/TheBellyofAuthority/AppPackages/TheBellyofAuthority_1.0.0.3_AnyCPU_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/abettadapur_BellyofAuthorityMX/TheBellyofAuthority/AppPackages/TheBellyofAuthority_1.0.0.0_AnyCPU_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/skywing_AzureScripts/HDInsight/Create-HDInsight-Hadoop-Cluster.ps1
Create-HDInsight-Hadoop-Cluster.ps1
# declaring variable for names to be used in Hadoop cluster $resourceGroupName = "Test-YOUR_RESOURCE_GROUP_NAME_HERE" $location = "East US" $storageAccountName = "s$resourceGroupName" $containerName = "hdp$resourceGroupName" $clusterName = $containerName $clusterNode = 2 $httpUserName = "HDUser" $sshUserName = ...
PowerShellCorpus/Github/atanasyan_GMailFont/package.ps1
package.ps1
function ZipFiles( $zipfilename, [string[]]$files ) { Add-Type -Assembly System.IO.Compression Add-Type -Assembly System.IO.Compression.FileSystem $archMode = [System.IO.Compression.ZipArchiveMode]::Create $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal if (Test-Path $zipfilena...
PowerShellCorpus/Github/chirra_Hostograf/Hostograf/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/chirra_Hostograf/Hostograf/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/gwaldo_dotfiles/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
# This file belongs in ~\Documents\WindowsPowerShell as Microsoft.PowerShell_profile.ps1 # Because Microsoft sucks at file names and paths # Powershell is awesome, but for all of the coders in the place, they # can't figure out intelligent file paths. # At least they ditched "Documents and Settings" for "Users" # ...
PowerShellCorpus/Github/willemdh_check_ms_win_network_connections/check_ms_win_network_connections.ps1
check_ms_win_network_connections.ps1
# Script name: check_ms_win_network_connections.ps1 # Version: v2.04.160811 # Created on: 19/08/2014 # Author: Willem D'Haese # Purpose: Checks Microsoft Windows connections, allowing filters on IP address, portnumber or processname, returning number of # established, listening, t...
PowerShellCorpus/Github/OPS-E2E-Prod_E2E_P_NewRepo_2017_4_26_20_47_18/.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/lake28_Powershell/File and Print/Printer_Queue_Audit.ps1
Printer_Queue_Audit.ps1
# Script name: PrinterQueueAudit.ps1 # Created on: 2010-11-18 # # Purpose: A script used to audit Printer Queues on a server (local or remote) # to determine when the queues were last used or if at all. A CSV # file (PrinterQueueAudit.csv) is then generated ...
PowerShellCorpus/Github/lake28_Powershell/Exchange/Hybrid_NewRemoteMailbox_MultipleUsers.ps1
Hybrid_NewRemoteMailbox_MultipleUsers.ps1
#http://blog.greypuddles.net/?p=240 #Runs on Exchange onpremise shell #Creates mulitple users from Excel spreadsheet just need to update domain and add users first name and second name, the script will ask for a password. # Creates users in AD as well so you just need to run DirSync after #CreateMailboxes.xlsx is a...
PowerShellCorpus/Github/lake28_Powershell/Machine Builds/UpdateOffice365andMountWimtocopy.ps1
UpdateOffice365andMountWimtocopy.ps1
#import modules for dism? #check date modified on the Office 365 folder #update re download business premium if needed #mount windows 10 build image via dism? Mount-WindowsImage -ImagePath "D:\RemoteInstall\Images\Windows 10 Pro\W10_Build1703.wim" -Index 2 -Path "D:\JL\W10_Offline" -Optimize #once moun...
PowerShellCorpus/Github/lake28_Powershell/RDS/Delete profile with GUI v2.ps1
Delete profile with GUI v2.ps1
#GUI interface to delete user profiles from remote desktop session host server #v2 - added support to select multiple users at once # added increased error logging #Setup script variables #add computers to computers variable to search for profiles on those computers [array] $Computers = "DESKTOP-BCBM...
PowerShellCorpus/Github/lake28_Powershell/Default Profile/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
$Shell.WindowTitle="Mr Lake" Function Connect-Exonline { Import-Module MSOnline $O365Cred = Get-Credential $O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection Import-PSSession $O365Se...
PowerShellCorpus/Github/MauRiEEZZZ_CleanupChildvhds/Find-OrphanedVHD.ps1
Find-OrphanedVHD.ps1
$computername = "." $vhdsUsed=@() $vhdsOnDisk=@() $vhdsOnDisk += Get-ChildItem -path (Get-VMHost -ComputerName $computername).VirtualHardDiskPath -Attributes !readonly foreach ($vm in (Get-VM -ComputerName $computername)) { Write-Verbose $vm.VMName foreach ($hardDrive in $vm.HardDrives) { $vhds...
PowerShellCorpus/Github/aershov24_docx2wiki/convert.ps1
convert.ps1
##convert.ps1## param( ) $Source = ".\Source" Get-ChildItem $Source\ -filter *.docx | ` Foreach-Object{ $docx_file = ".\Source\"+$_ $homedir = (Get-Item -Path ".\" -Verbose).FullName $zipdir = ".\Source\"+$_.BaseName $wikidir = ".\wiki\"+$_.BaseName $wikidirimage = ".\wiki\"+$_.BaseName+"\images" ...
PowerShellCorpus/Github/marcjoha_deploy-fastproperties/Deploy-FastIndexSchema.ps1
Deploy-FastIndexSchema.ps1
<# .SYNOPSIS Deploys properties on a local FAST Search for SharePoint farm. .DESCRIPTION In FAST Search for SharePoint, the index schema is represented by a set of 'managed properties' populated with content by being mapped to a set of 'crawled properties'. This cmdlet alleviates deployment and management of ...
PowerShellCorpus/Github/uacaps_PushNotificationsTemplate/Push Server Template/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/uacaps_PushNotificationsTemplate/Push Server Template/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/uacaps_PushNotificationsTemplate/Push Server Template/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/uacaps_PushNotificationsTemplate/Push Server Template/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/uacaps_PushNotificationsTemplate/Push Server Template/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/uacaps_PushNotificationsTemplate/Push Server Template/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/par-texx_Trinimbus/BuildEnvironment.ps1
BuildEnvironment.ps1
#Import Modules Import-Module AWSPowerShell #SetDefaults #$CredentialProfile = "JbestTest" $CredentialProfile = "Trinimbus" Set-DefaultAWSRegion -Region us-east-1 $Region = "us-east-1" $DBUsername = "dbadmin" $DBPassword = "mypassword" #By Default all will be created in the default VPC. $VPC = Get-EC2VPC ...
PowerShellCorpus/Github/glopesdev_eye-drive/setup/start-drive.ps1
start-drive.ps1
# Get subject name and current date time $subjectName = Read-Host "Enter Subject Id" $date = [DateTimeOffset]::Now # Compute session data path $dataPath = "..\data" $dataPath = Join-Path -Path $dataPath -ChildPath $subjectName $dataPath = Join-Path -Path $dataPath -ChildPath ($date).ToString("yyyy_MM_dd-HH_mm")...
PowerShellCorpus/Github/CCMH_SCCM/Operational Collection.ps1
Operational Collection.ps1
############################################################################# # Author : Benoit Lecours # Website : www.SystemCenterDudes.com # Twitter : @scdudes # # Version : 1.0 # Created : 2014/07/17 # Modified : # 2014/08/14 - Added Collection 34,35,36 # 2014/09/23 - Changed collection 4 to CU3 instead...
PowerShellCorpus/Github/CCMH_SCCM/CreateFoldersAndCollections.ps1
CreateFoldersAndCollections.ps1
$CM12XmlFile = "FolderAndCollection_Software_Updates.xml" $CM12ModuleFile = "CM12Functions.ps1" $ComputerInfo = Get-WmiObject Win32_ComputerSystem $ComputerFQDN = $ComputerInfo.Name + '.' + $ComputerInfo.Domain $CM12ProviderLocation = Get-CimInstance -Query "Select * From SMS_ProviderLocation where ProviderForLoc...
PowerShellCorpus/Github/CCMH_SCCM/Invoke-CMApplication.ps1
Invoke-CMApplication.ps1
function Invoke-CmAppAction { param( [string]$ComputerName = '.', [ValidateSet('Install','Uninstall')][string]$Action = 'Install' ) [hashtable]$params = @{ ComputerName = $ComputerName Namespace = 'root\CCM\ClientSDK' Class = 'CCM_Application' } ...
PowerShellCorpus/Github/CCMH_SCCM/move-application.ps1
move-application.ps1
param($ID = "*",$Site = "CCM",$server = "siteserver") #import assemblies [System.Reflection.Assembly]::LoadFrom("C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.ApplicationManagement.dll") [System.Reflection.Assembly]::LoadFrom("C:\Program Files\Microsoft Configura...
PowerShellCorpus/Github/CCMH_SCCM/CM12Functions.ps1
CM12Functions.ps1
Function Write-Log{ [CmdletBinding()] PARAM( [parameter(Mandatory=$true)] [String]$Message, [parameter(Mandatory=$false)] [int]$Severity = 1 ) $TimeZoneBias = Get-WmiObject -Query "Select Bias from Win32_TimeZone" $Date1= Get-Date -Format "HH:mm:ss.fff" $Date2= Get-Date -...
PowerShellCorpus/Github/CCMH_SCCM/MACs.ps1
MACs.ps1
<# .Synopsis Lets you exclude MAC addresses in SCCM .DESCRIPTION We really don't want the MAC addresses for the USB ethernet adapters being tied to a computer, (SMSBIOS UUID is much better). .EXAMPLE .\MACs.ps1 -macs @("00:00:00:00:00:00","00:00:00:00:00:01") .EXAMPLE #> [CmdletBinding()] [Alias()...
PowerShellCorpus/Github/CCMH_SCCM/move-driver.ps1
move-driver.ps1
#Drivers param($ID = "*",$Site = "CCM") $drivers = Get-WmiObject SMS_Driver -Namespace root\SMS\site_$Site $drivers | Where-object { $_.ContentSourcePath -like "*fileserver\e$*" -and $_.PackageID -like $ID } | ForEach-Object { $_.ContentSourcePath = $_.ContentSourcePath -replace "\\e\$", ''; $_.Put() }
PowerShellCorpus/Github/CCMH_SCCM/move-osimage.ps1
move-osimage.ps1
#Drivers param($ID = "*",$Site = "CCM") $osimage = Get-WmiObject SMS_ImagePackage -Namespace root\SMS\site_$Site $osimage | Where-object { $_.PkgSourcePath -like '*fileserver\OS\Captures*' -and $_.PackageID -like $ID } | ForEach-Object { $_.PkgSourcePath = $_.PkgSourcePath -replace 'fileserver\\OS\\Captures'...
PowerShellCorpus/Github/CCMH_SCCM/EnableUpdateRing.ps1
EnableUpdateRing.ps1
# EnableUpdateRing enables fast ring to opt in 1606 # Get these as an input Param ( [Parameter(Mandatory=$True,Position=0, ParameterSetName="SiteServer Name or IP address", HelpMessage="Top level site server name or IP address.")] [string]$siteServer ) $WmiObjectSiteClass = "SMS_SCI_SiteDefinition" $WmiObj...
PowerShellCorpus/Github/CCMH_SCCM/Get-CMFailedPackage.ps1
Get-CMFailedPackage.ps1
$siteserver="siteserver" $query = 'SELECT * FROM SMS_PackageStatusDistPointsSummarizer WHERE State = 2 OR State = 3' Get-CimInstance -ComputerName "$siteserver" -Namespace 'root\SMS_CCM' -Query $query | Select-Object packageID,@{n='DistributionPoint';e={$_.ServerNALPath.Split('')[2]}},@{n='DPOnline';e={Test-Conn...
PowerShellCorpus/Github/CCMH_SCCM/DocumentCM12R2v2.ps1
DocumentCM12R2v2.ps1
#Requires -Version 3.0 #This File is in Unicode format. Do not edit in an ASCII editor. #region help text <# .SYNOPSIS Demonstrates script functionality using Microsoft Word, PDF, formatted text or HTML. .DESCRIPTION Creates a sample report of various Word functionality using Microsoft Word, PDF, formatte...
PowerShellCorpus/Github/CCMH_SCCM/Get-CMBadMIF.ps1
Get-CMBadMIF.ps1
$FolderPath = '\\siteserver\SMS_CCM\inboxes\auth\dataldr.box\BADMIFS' ## Get all of the MIF files we'll be querying $Mifs = Get-ChildItem $FolderPath -Filter '*.mif' -Recurse -Force -ErrorAction SilentlyContinue ## Find all the MIF files that match the regex string '//KeyAttribute<NetBIOS Name><(.*)>' $Matches ...
PowerShellCorpus/Github/CCMH_SCCM/Get-ClientHealth.ps1
Get-ClientHealth.ps1
# take a look at line 34-44 to figure out how to parse the computer name from your log files. # ## Set -auto parameter, if used script will run without prompting user to confirm repairs. Param([switch]$Auto) ## Declare some variables #Enter Your log file path here: $logfilepath = "\\fileserver\LogFileShare\WMI" ...
PowerShellCorpus/Github/CCMH_SCCM/move-driverpackage.ps1
move-driverpackage.ps1
#Driver packages param($ID = "*",$Site = "CCM") $packages = Get-WmiObject SMS_DriverPackage -Namespace root\SMS\site_$Site $packages | Where-object { $_.PkgSourcePath -like '*software$\Packages' -and $_.PackageID -like $ID } | ForEach-Object { $_.PkgSourcePath = $_.PkgSourcePath -replace "Packages",'Drivers\...
PowerShellCorpus/Github/davidwallis3101_OrchestratorCOM/build.psake.ps1
build.psake.ps1
############################################################################## # PSAKE SCRIPT FOR MODULE BUILD & PUBLISH TO THE INTERNAL PSPRIVATEGALLERY ############################################################################## # # Requirements: PSake. If you don't have this module installed use the following...
PowerShellCorpus/Github/davidwallis3101_OrchestratorCOM/tests/OrchestratorCOM.Tests.ps1
OrchestratorCOM.Tests.ps1
param() <# .SYNOPSIS Tests for the OrchestratorCOM module .DESCRIPTION Contains various tests .EXAMPLE Example: Invoke-Pester .NOTES For additonal information please see https://github.com/davidwallis3101/OrchestratorCOM .LINK https://github.com/davidwallis3101/OrchestratorCOM #...
PowerShellCorpus/Github/16o1denRatio_scripts/Enable PS Remoting.ps1
Enable PS Remoting.ps1
# Add TrustedHosts winrm quickconfig -force set-item wsman:\localhost\Client\TrustedHosts -value * -force # Remote WMI netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes # Any why not ... Network Sharing: netsh firewall set service type=fileandprint mode=enable...
PowerShellCorpus/Github/16o1denRatio_scripts/ListSharedFolders-AskServer.ps1
ListSharedFolders-AskServer.ps1
<# .SYNOPSIS This script will list all shares on a computer, and list all the share permissions for each share. .DESCRIPTION The script will take a list all shares on a local or remote computer. .PARAMETER Computer Specifies the computer o...
PowerShellCorpus/Github/16o1denRatio_scripts/PullSystemPrograms.ps1
PullSystemPrograms.ps1
$loc = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall $names = $loc |foreach-object {Get-ItemProperty $_.PsPath} foreach ($name in $names) { Write-Host $name.Displayname }
PowerShellCorpus/Github/16o1denRatio_scripts/PullDownloadsDirectory-19 Desktops.ps1
PullDownloadsDirectory-19 Desktops.ps1
$hozts = @( #17 GH/SA desktops "CC-1638ZG2" "CC-1885ZG2" "CC-1785ZG2" "CC-17H5ZG2" "CC-16Y6ZG2" "CC-15L9ZG2" "CC-15G7ZG2" "CC-1863ZG2" "CC-15Q9ZG2" "CC-16Q3ZG2" "CC-16V8ZG2" "CC-17F3ZG2" "CC-17V7ZG2" "CC-1696ZG2" "CC-17S5ZG2" "CC-1708ZG2" "CC-17N3ZG2" #Accuflo and SLP - not deployed "CC-17X7ZG2" ...
PowerShellCorpus/Github/16o1denRatio_scripts/Windows Activation 19 computers.ps1
Windows Activation 19 computers.ps1
function Get-ActivationStatus { [CmdletBinding()] param( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [string]$DNSHostName = $Env:COMPUTERNAME ) process { try { $wpa = Get-WmiObject SoftwareLicensingProduct -ComputerName $DNSHost...
PowerShellCorpus/Github/16o1denRatio_scripts/list-users-and-output-file.ps1
list-users-and-output-file.ps1
$comp=[adsi]"WinNT://$($env:ComputerName)" $users = $comp.Children | ?{ $_.SchemaClassName -eq 'User' } $users | select @{L="Name";E={$_.psbase.Properties.Name.Value}}| out-file "C:\Users\mcurtin\Desktop\OTHER\list-users.txt"
PowerShellCorpus/Github/16o1denRatio_scripts/Uninstall Extra Office Products.ps1
Uninstall Extra Office Products.ps1
# # This script does the following: # -Uninstalls MS Office 2016 programs # -Removes Windows 10 Apps # -Cleans up Start Menu # Uninstall Office 16 Click-to-Run Licensing Component msiexec /x "{90160000-008F-0000-1000-0000000FF1CE}" /passive # Uninstall Office 16 Click-to-Run Extensibility Component 64-...
PowerShellCorpus/Github/16o1denRatio_scripts/Create dd DOT bat (runs as user).ps1
Create dd DOT bat (runs as user).ps1
Unregister-ScheduledTask "DD" Remove-Item "C:\IT\" -Recurse New-Item "C:\IT\" -type directory New-Item "C:\IT\dd.ps1" -type file echo "Remove-Item -recurse 'C:\users\$env:username\downloads\*'" | out-file "C:\it\dd.ps1" echo "Remove-Item -recurse 'C:\users\$env:username\documents\*'" | out-file -append "C:\i...
PowerShellCorpus/Github/16o1denRatio_scripts/Create DDD and Printers (Yes, PS).ps1
Create DDD and Printers (Yes, PS).ps1
# Quick shortcut creation script # This if the variable that will hold the computer name of your target device $computer = hostname # This command will create the shortcut object $WshShell = New-Object -ComObject WScript.Shell # This is where the shortcut will be created $Shortcut = $WshShell.CreateShortcut("\\...
PowerShellCorpus/Github/16o1denRatio_scripts/Download Time Systems (PS-Script).ps1
Download Time Systems (PS-Script).ps1
Invoke-WebRequest https://ntd.taserver.com/site/hcsetup.exe -OutFile C:\users\admin\downloads\hcsetup.exe ; Invoke-WebRequest https://ntd.taserver.com/site/hcupdate.exe -OutFile C:\users\admin\downloads\hcupdate.exe
PowerShellCorpus/Github/16o1denRatio_scripts/last-user-logon1.ps1
last-user-logon1.ps1
$comp=[adsi]"WinNT://$($env:ComputerName)" $users = $comp.Children | ?{ $_.SchemaClassName -eq 'User' } $users | select @{L="Name";E={$_.psbase.Properties.Name.Value}},@{L="LastLogin";E={$_.psbase.Properties.LastLogin.Value}}
PowerShellCorpus/Github/16o1denRatio_scripts/ConnectVPN-DisconnectVPN.ps1
ConnectVPN-DisconnectVPN.ps1
$computer = hostname $WshShell = New-Object -ComObject WScript.Shell $Shortcut = $WshShell.CreateShortcut("\\$computer\C$\Users\Public\Desktop\Connect VPN.lnk") # This is the program the shortcut will open $Shortcut.TargetPath = "C:\windows\system32\rasdial.exe" # This is the icon location that the shortcut will...
PowerShellCorpus/Github/16o1denRatio_scripts/Add DDD and Printer to Public Desktop.ps1
Add DDD and Printer to Public Desktop.ps1
Set-Content "$env:public\DDD Website.bat" "start iexplore.exe https://ddcmis.dhs.state.nj.us timeout 1 taskkill /f /im conhost.exe" -encoding ascii # Create a Shortcut with Windows PowerShell $TargetFile = "$env:public\DDD Website.bat" $ShortcutFile = "$env:Public\Desktop\DDD Website.lnk" $WScriptShell = New-...
PowerShellCorpus/Github/16o1denRatio_scripts/Get LockdownGroup members.ps1
Get LockdownGroup members.ps1
$users = @( "GH1510" "GH1545" "GH1638" "GH1640" "GH1701" "GH1722" "GH1831" "GH1960" "GH1986" "GH2027" "GH2109" "GH2223" "SA1213" "SA1394" "SA1426" ) foreach ($user in $users) { get-childitem -recurse C:\users\$user\* } Get-ADGroupMember -identity lockdown_group | format-wide -property name
PowerShellCorpus/Github/16o1denRatio_scripts/IN_THE_PROCESS Create RDP User.ps1
IN_THE_PROCESS Create RDP User.ps1
$cred = Get-Credential #Invoke-Command -Computer RDPServer -ScriptBlock {# #get-process Enter-PSSession RDPServer $RDPUser = Read-Host -Prompt "Enter the desired RDP Username" $Password = Read-Host -Prompt "Enter the desired password for $RDPUser" net user $RDPUser $Password /add net localgroup "remote des...
PowerShellCorpus/Github/16o1denRatio_scripts/GetLastRebootTime.ps1
GetLastRebootTime.ps1
Write-Host "When prompted, please use CCSCP\ Domain credentials!" -fore green $servername = Read-Host "What server do you want to connect to?" $cred = get-credential Invoke-Command -ComputerName $servername -Credential $cred -scriptblock { Get-EventLog System | where {$_.EventID -eq 1074} | Select-Object -first 5...
PowerShellCorpus/Github/16o1denRatio_scripts/GHs_Test-Connection_all.ps1
GHs_Test-Connection_all.ps1
$comps = @( <#"CC-1638ZG2" "CC-1885ZG2" "CC-1785ZG2" "CC-17H5ZG2" "CC-16Y6ZG2" "CC-15L9ZG2" "CC-17X7ZG2" #> "CC-18FAZG2" <# "CC-15G7ZG2" "CC-1863ZG2" "CC-15Q9ZG2" "CC-16Q3ZG2" "CC-16V8ZG2" "CC-17F3ZG2" "CC-17V7ZG2" "CC-1696ZG2" "CC-17S5ZG2" "CC-1708ZG2" "CC-17N3ZG2" #> ) $cred = Get-Credenti...
PowerShellCorpus/Github/16o1denRatio_scripts/19 Desktops get-childitem.ps1
19 Desktops get-childitem.ps1
$users = @( "GH1510" "GH1545" "GH1638" "GH1640" "GH1701" "GH1722" "GH1831" "GH1960" "GH1986" "GH2027" "GH2109" "GH2223" "SA1213" "SA1394" "SA1426" ) foreach ($user in $users) { get-childitem -recurse C:\users\$user\* } Get-ADGroupMember -identity lockdown_group | format-wide -property name
PowerShellCorpus/Github/16o1denRatio_scripts/Win10DeveloperMode.ps1
Win10DeveloperMode.ps1
# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode $RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" if (-not(Test-Path -Path $RegistryKeyPath)) { New-Item -Path $RegistryKeyPath -ItemType Directory -Force } # Add registry value to enable Devel...
PowerShellCorpus/Github/16o1denRatio_scripts/GH - RemoveDomainAdmin, AddLockdownGroup.ps1
GH - RemoveDomainAdmin, AddLockdownGroup.ps1
invoke-command -computer capcare-dc01 -scriptblock { $users = @( "GH1510" "GH1545" "GH1638" "GH1640" "GH1701" "GH1722" "GH1831" "GH1960" "GH1986" "GH2027" "GH2109" "GH2223" "SA1213" "SA1394" "SA1426" ) foreach ($user in $users) { # Add-ADGroupMember -Identity "Lockdown_Group" -members $user # Remo...
PowerShellCorpus/Github/16o1denRatio_scripts/PullSystemHotfixesWC.ps1
PullSystemHotfixesWC.ps1
Get-WmiObject -Class "win32_quickfixengineering" | Select-Object -Property "Description", "HotfixID", @{Name="InstalledOn"; Expression={([DateTime]($_.InstalledOn)).ToLocalTime()}} | out-file $env:userprofile\Desktop\hotfixes.txt <# ########## https://www.reddit.com/r/sysadmin/comments/6b3vqj/does_kb4019215...
PowerShellCorpus/Github/16o1denRatio_scripts/Remove Win 10 Apps.ps1
Remove Win 10 Apps.ps1
# ########################################### # # Remove Win10 Apps (Active user only) # # ########################################### $apps = @( # default Windows 10 apps 'Microsoft.3DBuilder' 'Microsoft.Appconnector' 'Microsoft.BingFinance' 'Microsoft.BingNews' 'Microsoft.BingSports' 'Microsoft.BingW...
PowerShellCorpus/Github/16o1denRatio_scripts/InitialLoadoutScript/Initial.ps1
Initial.ps1
# Set Execution Policy to "RemoteSigned" Write-Host "Setting Execution Policy to RemoteSigned" Set-ExecutionPolicy RemoteSigned # ########################################### # # Windows Update Utility # # ########################################### # Install Windows Update Utility Write-...
PowerShellCorpus/Github/16o1denRatio_scripts/Obsolete/Count Verify Files in InstallationFolder.ps1
Count Verify Files in InstallationFolder.ps1
set-ExecutionPolicy remotesigned New-PSDrive -Name M -PSProvider FileSystem -Root "\\appserver01\it guy" -Credential appserver01\mcurtin -Persist Copy-Item "\\appserver01\it guy\xfer\rnr\wireless passcodes.txt" "$env:UserProfile" Copy-Item "\\appserver01\it guy\xfer\rnr\DDD Site.bat" "$env:UserProfile" Copy-Item ...
PowerShellCorpus/Github/16o1denRatio_scripts/Obsolete/Chocolatey.ps1
Chocolatey.ps1
# Set Execution Policy Write-Host "# Set Execution Policy" set-executionpolicy RemoteSigned # Install Windows Update Utility write-host "# Install Windows Update Utility" Install-PackageProvider Nuget -Force Install-Module PSWindowsUpdate -Force Get-Command –module PSWindowsUpdate Add-WUServiceManag...
PowerShellCorpus/Github/16o1denRatio_scripts/LastStepScript/LastStepScript.ps1
LastStepScript.ps1
# Turns Legacy Default Printer Mode Settings On reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" /v LegacyDefaultPrinterMode /t REG_DWORD /d 1 /f # HIPAA Screen Saver Regulations (Type/Time-In-Seconds/Passsword_On_Wake) reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v SCRNSAVE...
PowerShellCorpus/Github/16o1denRatio_scripts/(Only-Use-Last-Step)OptimizationScript/OptimizationFolder/RemoveWin10Apps.ps1
RemoveWin10Apps.ps1
$apps = @( # default Windows 10 apps 'Microsoft.3DBuilder' 'Microsoft.Appconnector' 'Microsoft.BingFinance' 'Microsoft.BingNews' 'Microsoft.BingSports' 'Microsoft.BingWeather' 'Microsoft.FreshPaint' 'Microsoft.Getstarted' 'Microsoft.MicrosoftOfficeHub' 'Microsoft.M...
PowerShellCorpus/Github/16o1denRatio_scripts/(Only-Use-Last-Step)OptimizationScript/OptimizationFolder/CopyItems.ps1
CopyItems.ps1
Copy-Item "OptimizationFolder\wireless passcodes.txt" "$env:UserProfile" Copy-Item "OptimizationFolder\DDD Site.bat" "$env:UserProfile" Copy-Item "OptimizationFolder\Printers.lnk" "$env:UserProfile" # mkdir "C:\InstallationFiles\Print Drivers (Win 10)" # mkdir "C:\InstallationFiles\Office 2003" # mkdir "C:\In...
PowerShellCorpus/Github/v-peliao_E2E_NewRepo_1489641680402/.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/algattik_CISBotHackathon/Config/config.ps1
config.ps1
#region - used for creating Azure service names $namePrefix = [Environment]::UserName + "cisbot" #endregion #region - service names $resourceGroupName = "CISBot" $location = "East US 2" # Data Lake Store only available in few regions $dataFactoryLocation = "East US" $cognitiveServiceLocation = "West US" #endr...
PowerShellCorpus/Github/algattik_CISBotHackathon/Scripts/110-create-resource-group.ps1
110-create-resource-group.ps1
$ErrorActionPreference = "Stop" $scriptDir=($PSScriptRoot, '.' -ne "")[0] . "$scriptDir\Include\common.ps1" #region - Create a Resource Group Write-Host "Create a resource group ..." -ForegroundColor Green New-AzureRmResourceGroup ` -Name $resourceGroupName ` -Location $location #endregion
PowerShellCorpus/Github/algattik_CISBotHackathon/Scripts/310-create-data-warehouse.ps1
310-create-data-warehouse.ps1
$ErrorActionPreference = "Stop" $scriptDir=($PSScriptRoot, '.' -ne "")[0] . "$scriptDir\Include\common.ps1" #begin #region - create server and set firewall rule New-AzureRmSqlServer -ResourceGroupName $resourceGroupName -ServerName $sqlName -Location $location -SqlAdministratorCredentials $adminCredentials -Se...
PowerShellCorpus/Github/algattik_CISBotHackathon/Scripts/230-generate-ml-training-data.ps1
230-generate-ml-training-data.ps1
$ErrorActionPreference = "Stop" $scriptDir=($PSScriptRoot, '.' -ne "")[0] . "$scriptDir\Include\common.ps1" $temp=New-TemporaryFile substituteInTemplate "$scriptDir\..\Resources\PrepareMLTrainingSet\prepare-ml-training-set.usql" @{ '$storageAccountName' = $storageAccountName }| Out-File $temp $j=Sub...