full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/sample_57_91.ps1
sample_57_91.ps1
# # Module manifest for module 'OCI.PSModules.Databasemanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Databasemanagement.dll' # Version number of this module. ModuleVersion = '83.3.0' # Suppo...
combined_dataset/train/non-malicious/4094.ps1
4094.ps1
cls Function AutoCAD2013English{ Set-Variable -Name GUID -Value "{5783F2D7-B001-0000-0102-0060B0CE6BBA}" -Scope Local -Force Set-Variable -Name Arguments -Scope Local -Force Write-Host "AutoCAD 2013 - English" $Arguments = "/X"+[char]32+$GUID+[char]32+"/qb- /norestart" (Start-Process -FilePath "msiexec.exe" -...
combined_dataset/train/non-malicious/GPRS Online log_6.ps1
GPRS Online log_6.ps1
<# .SYNOPSIS Get-GprsTime (V4.0 Update for Windows 7 and allow time correction) Check the total connect time of any GPRS devices from a specified date. Use 'Get-Help .\\Get-GprsTime -full' to view Help for this script. .DESCRIPTION Display all the GPRS modem Event Log entries. While applications issued by the ...
combined_dataset/train/non-malicious/sample_65_60.ps1
sample_65_60.ps1
<# .SYNOPSIS Queries and exports attached peripheral information .DESCRIPTION Queries and exports attached peripheral information for use in Microsoft Teams Bring Your Own Device (BYOD) data entry in the Pro Management Portal (PMP) for enhanced reporting .EXAMPLE .\Get-TeamsBYODRoomDevices.ps1 .NOTES ...
combined_dataset/train/non-malicious/Hex dump sample.ps1
Hex dump sample.ps1
C:\\WINDOWS\\system32 PS > hexdmp wsock32.dll 4d 5a 90 00 03 00 00 00 04 00 MZ........ 00 00 ff ff 00 00 b8 00 00 00 ..ˇˇ...... 00 00 00 00 40 00 00 00 00 00 .......... e0 00 00 00 0e 1f ba 0e 00 b4 ‡.....∫... 09 cd 21 b8 01 4c cd 21 54 68 .Õ...LÕ.Th 69 73 20 70 72 6f 67 72 61 6d is.program 20 63 61 6e 6...
combined_dataset/train/non-malicious/938.ps1
938.ps1
$apiVersion = "2015-04-08" $resourceGroupName = "myResourceGroup" $accountName = "mycosmosaccount" $databaseName = "database1" $databaseThroughputResourceName = $accountName + "/gremlin/" + $databaseName + "/throughput" $databaseThroughputResourceType = "Microsoft.DocumentDb/databaseAccounts/apis/databases/settings" ...
combined_dataset/train/non-malicious/Get-LocalGroupMembership.ps1
Get-LocalGroupMembership.ps1
# ############################################################################# # NAME: FUNCTION-Get-LocalGroupMembership.ps1 # # AUTHOR: Francois-Xavier Cat # DATE: 2012/12/27 # EMAIL: fxcat@lazywinadmin.com # WEBSITE: LazyWinAdmin.com # TWiTTER: @lazywinadm # # COMMENT: This function get the local g...
combined_dataset/train/non-malicious/ConvertFrom-SDDL.ps1
ConvertFrom-SDDL.ps1
filter ConvertFrom-SDDL { <# .SYNOPSIS Convert a raw security descriptor from SDDL form to a parsed security descriptor. Author: Matthew Graeber (@mattifestation) .DESCRIPTION ConvertFrom-SDDL generates a parsed security descriptor based upon any string in raw security descriptor definition l...
combined_dataset/train/non-malicious/4428.ps1
4428.ps1
function Register-PSRepository { [CmdletBinding(DefaultParameterSetName = 'NameParameterSet', HelpUri = 'https://go.microsoft.com/fwlink/?LinkID=517129')] Param ( [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'NameParameterSet')] [Validat...
combined_dataset/train/non-malicious/sample_25_61.ps1
sample_25_61.ps1
# # Module manifest for module 'OCI.PSModules.Waa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waa.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/Get-UIChildItem.ps1
Get-UIChildItem.ps1
#requires -version 2.0 [CmdletBinding()] param($Path) <# Quick check to see if we have necessary module... #> if (!(Get-Module ShowUI)) { try { Import-Module ShowUI } catch { Write-Warning "Can't load ShowUI module. I quit! For more details about error use -Verbose parameter....
combined_dataset/train/non-malicious/sample_48_55.ps1
sample_48_55.ps1
# # Module manifest for module 'OCI.PSModules.Databasemigration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Databasemigration.dll' # Version number of this module. ModuleVersion = '77.0.0' # Support...
combined_dataset/train/non-malicious/2348.ps1
2348.ps1
$sDefaultGpoGuid = '{F6FE3FDE-4CD0-455D-B9BC-D134111BBF09}'; $sDefaultGpoGuid = "*$($sDefaultGpoGuid)*"; $ErrorActionPreference = "Stop"; $aComputerGPOs = Get-ADObject -Filter {(ObjectClass -eq "groupPolicyContainer")} $test = @(); if ($aComputerGpos -ne $null) { $aReport = @() foreach ($oGpo in $aComputerGpo...
combined_dataset/train/non-malicious/sample_49_36.ps1
sample_49_36.ps1
<# THE SCRIPT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETH...
combined_dataset/train/non-malicious/sample_56_98.ps1
sample_56_98.ps1
# # Module manifest for module 'OCI.PSModules.Vault' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vault.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/Run-Query (SharePoint)_4.ps1
Run-Query (SharePoint)_4.ps1
function Run-Query($siteUrl, $queryText) { [reflection.assembly]::loadwithpartialname("microsoft.sharePOint") | out-null [reflection.assembly]::loadwithpartialname("microsoft.office.server") | out-null [reflection.assembly]::loadwithpartialname("microsoft.office.server.search") | out-null $s = [microsoft.share...
combined_dataset/train/non-malicious/2504.ps1
2504.ps1
[CmdletBinding()] param() cls [array]$Clients = @(); [array]$Clients = Invoke-SQLCMD -ServerInstance XUTILSQL2 -Database DexmaSites -Query "SELECT DISTINCT dv.dv_value AS DocServer , [ce].[DatabaseName] , [ce].[DatabaseServer] FROM [DexmaSites].dbo.[clients] AS c JOIN dexmaSites.dbo.client_data_x...
combined_dataset/train/non-malicious/sample_7_63.ps1
sample_7_63.ps1
ConvertFrom-StringData @' id_adapterkb980486check=Checking 6to4 and physical adapters id_adapterkb980486checkdesc=Checking the number of 6to4 and physical adapters (KB 980486) '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3Ag...
combined_dataset/train/non-malicious/1798.ps1
1798.ps1
Describe "Get-ChildItem" -Tags "CI" { Context 'FileSystem provider' { BeforeAll { $item_a = "a3fe710a-31af-4834-bc29-d0b584589838" $item_B = "B1B691A9-B7B1-4584-AED7-5259511BEEC4" $item_c = "c283d143-2116-4809-bf11-4f7d61613f92" $item_D = "D39...
combined_dataset/train/non-malicious/sample_28_8.ps1
sample_28_8.ps1
# # Module manifest for module 'OCI.PSModules.Workrequests' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Workrequests.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditi...
combined_dataset/train/non-malicious/2594.ps1
2594.ps1
param($Path = "C:\Users\mmessano\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows PowerShell.lnk" ) $Black = 0 $DarkBlue = 1 $DarkGreen = 2 $DarkCyan = 3 $DarkRed = 4 $DarkMagenta = 5 $DarkYellow = 6 $Gray = 7 $DarkGray = 8 $Blue = 9 $Green = 10 $Cyan = 11 $...
combined_dataset/train/non-malicious/1392.ps1
1392.ps1
function Set-CDotNetConnectionString { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $Name, [Parameter(Mandatory=$true)] [string] $Value, [string] $ProviderName, ...
combined_dataset/train/non-malicious/3901.ps1
3901.ps1
function Test-RemoveComputeNodes { param([string]$poolId) $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $deallocationOption = ([Microsoft.Azure.Batch.Common.ComputeNodeRebootOption]::Terminate) $resizeTimeout = ([TimeSpan]::FromMinutes(8)) ...
combined_dataset/train/non-malicious/2760.ps1
2760.ps1
function Get-LogonSession { param ( [Parameter(Mandatory = $true)] [UInt32] $LogonId ) $LogonMap = @{} Get-WmiObject Win32_LoggedOnUser | %{ $Identity = $_.Antecedent | Select-String 'Domain="(.*)",Name="(.*)"' $LogonSession = $_.Dependent | Sele...
combined_dataset/train/non-malicious/sample_56_81.ps1
sample_56_81.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apa...
combined_dataset/train/non-malicious/ResetOutlookLivePassword.ps1
ResetOutlookLivePassword.ps1
function Reset-OutlookLivePassword { <# .SYNOPSIS Resets an Outlook Live account password. .DESCRIPTION The Reset-OutlookLivePassword function resets an Outlook Live (Live@edu) acccount password. A remote session is opened to the Outlook Live service. Connecting to the remote service requires administra...
combined_dataset/train/non-malicious/537.ps1
537.ps1
function Add-SPOTextFieldtoList { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string] $listTitle, [Parameter(Mandatory=$true, Position=2)] [string] $fieldName ) $newField = "<Field Type='Text' DisplayName='$fieldName' Name='$fieldName' required='FALSE' />" Add-SPOFiel...
combined_dataset/train/non-malicious/copy-data.ps1
copy-data.ps1
function copy-data { param($source, $dest) $counter = 0 $files = Get-ChildItem $source -Force -Recurse foreach($file in $files) { $status = "Copying file {0} of {1}: {2}" -f $counter, $files.count, $file.name Write-Progress -Activity "Copyng Files" -Status $status -PercentComplete ($counter/$files.coun...
combined_dataset/train/non-malicious/LibraryPrompt.ps1
LibraryPrompt.ps1
##############################################################################\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\nSet-StrictMode -Version Latest\n\nfunction Prompt\n...
combined_dataset/train/non-malicious/sample_7_48.ps1
sample_7_48.ps1
#************************************************ # TS_ClusterCAUWMINamespaceCheck.ps1 # Version 1.0.1 # Date: 1/16/2013 # Author: v-kaw # Description: [Idea ID 6519] [Windows] Invalid Class error on 2012 Clusters (SDP) # Rule number: 6519 # Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispF...
combined_dataset/train/non-malicious/4401.ps1
4401.ps1
function Add-ArgumentCompleter() { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string[]]$cmdlets, [Parameter(Mandatory=$true)] [string]$parameterName ) try { if(Get-Command -Name Register-ArgumentCompleter -ErrorAction SilentlyContinue) ...
combined_dataset/train/non-malicious/sample_4_79.ps1
sample_4_79.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/328.ps1
328.ps1
function ConvertFrom-PSFArray { [CmdletBinding()] param ( [Parameter(Position = 0)] [string] $JoinBy = ', ', [Parameter(Position = 1)] [string[]] $PropertyName = '*', [Parameter(ValueFromPipeline = $true)] $InputObject ) process { $props = [ordered]@{ } foreach ($property in $InputObje...
combined_dataset/train/non-malicious/sample_31_96.ps1
sample_31_96.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
combined_dataset/train/non-malicious/4475.ps1
4475.ps1
configuration PSRepository_RemoveRepositoryConfig { param ( [Parameter()] [System.String[]] $NodeName = 'localhost', [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.String] $RepositoryName ) Import-DscResource -ModuleName '...
combined_dataset/train/non-malicious/2550.ps1
2550.ps1
cls function Backup-SMCReplication { param ([string ] $sqlServer , [string] $outputDirectory ) Import-Module Repl [string] $path = "$outputDirectory\$((get-date).toString('yyyy-MMM-dd'))\" if ( -not (test-path $path)) { New-Item $path -ItemType Directory | Out-Null } foreach(...
combined_dataset/train/non-malicious/sample_55_44.ps1
sample_55_44.ps1
Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility #Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
combined_dataset/train/non-malicious/sample_21_92.ps1
sample_21_92.ps1
# # Module manifest for module 'OCI.PSModules.Dashboardservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dashboardservice.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported...
combined_dataset/train/non-malicious/sample_67_60.ps1
sample_67_60.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditi...
combined_dataset/train/non-malicious/sample_32_60.ps1
sample_32_60.ps1
# virtualenv activation module # Activate with `overlay use activate.nu` # Deactivate with `deactivate`, as usual # # To customize the overlay name, you can call `overlay use activate.nu as foo`, # but then simply `deactivate` won't work because it is just an alias to hide # the "activate" overlay. You'd need to call `...
combined_dataset/train/non-malicious/sample_16_37.ps1
sample_16_37.ps1
# # Module manifest for module 'OCI.PSModules.Budget' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Budget.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Compatib...
combined_dataset/train/non-malicious/sample_50_14.ps1
sample_50_14.ps1
# # Module manifest for module 'OCI.PSModules.Dts' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dts.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_14_14.ps1
sample_14_14.ps1
/* eslint-disable no-undef */ var plugin = require("plugin-vs-v2"); if (typeof plugin != "undefined") { plugin.Messaging.addEventListener("pluginready", function () { setHtmlText(); }); } function setHtmlText() { // resource strings used by docker.web.default.html setTextContent("#dockerWebCor...
combined_dataset/train/non-malicious/sample_18_18.ps1
sample_18_18.ps1
# # Module manifest for module 'OCI.PSModules.Apmtraces' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmtraces.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_44_89.ps1
sample_44_89.ps1
/////////////////////////////////////////////////////////////////////////////// // Helper to set a designer prop /////////////////////////////////////////////////////////////////////////////// function setDesignerProp(tname, ttype, tvalue) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)...
combined_dataset/train/non-malicious/2150.ps1
2150.ps1
$powershellexe = (get-process -id $PID).mainmodule.filename Describe "Clone array" -Tags "CI" { It "Cast in target expr" { (([int[]](42)).clone()) | Should -Be 42 (([int[]](1..5)).clone()).Length | Should -Be 5 (([int[]](1..5)).clone()).GetType() | Should -Be ([int[]]) } It "Cast...
combined_dataset/train/non-malicious/Get-FSMORoleOwner_2.ps1
Get-FSMORoleOwner_2.ps1
Function Get-FSMORoleOwner { <# .SYNOPSIS Retrieves the list of FSMO role owners of a forest and domain .DESCRIPTION Retrieves the list of FSMO role owners of a forest and domain .NOTES Name: Get-FSMORoleOwner Author: Boe Prox DateCreated: 06/9/2011 .EXAMPLE ...
combined_dataset/train/non-malicious/2389.ps1
2389.ps1
param($scan_results_file) $download_path = 'C:\Documents and Settings\abertram\Desktop\CONFIGMANAGER Vulnerabilities' $mht_contents = gc $scan_results_file $ie = New-Object -ComObject 'InternetExplorer.Application' $webclient = New-Object System.Net.WebClient $ie.Navigate2('file:///C:\Documents and Settings\abertram\D...
combined_dataset/train/non-malicious/sample_15_70.ps1
sample_15_70.ps1
# # Module manifest for module 'OCI.PSModules.Visualbuilder' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Visualbuilder.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEdi...
combined_dataset/train/non-malicious/2842.ps1
2842.ps1
function Test-ModuleVersion { [CmdletBinding()] param ( [string]$currentVersion, [string]$minimumVersion, [string]$maximumVersion, [string]$lessThanVersion ) begin { } process { $result = $true if("$minimumVersion$maximumVersion$lessth...
combined_dataset/train/non-malicious/sample_62_12.ps1
sample_62_12.ps1
Import-LocalizedData -BindingVariable VvsTxt -FileName AzStackHci.MOCStack.Strings.psd1 function Test-MOCStackVolume { <# .SYNOPSIS Verify if the available free space in the volume, meets the size threshold required by MOCStack during the deployment scenario. .DESCRIPTION Verify if the a...
combined_dataset/train/non-malicious/2229.ps1
2229.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [string]$SiteServer ) Begin { try { Write-Verb...
combined_dataset/train/non-malicious/2100.ps1
2100.ps1
Describe "Error position Tests" -Tags "CI" { BeforeAll { $switch_condition_script = @' $test = 1 switch ($null[0]) { "a" {}; } '@ $for_expression_initializer_script = @' $test = 1 for ($null[0]; $test -gt 1;) { } '@ $for_pipeline_initializer_script = @' $test = 1 for (Test-Path ...
combined_dataset/train/non-malicious/1749.ps1
1749.ps1
Import-Module Docker Pull-ContainerImage hello-world Run-ContainerImage hello-world cls Get-Container | Where-Object State -eq "exited" Get-Container | Where-Object State -eq "exited" | Remove-Container Remove-ContainerImage hello-world Get-ContainerImage
combined_dataset/train/non-malicious/sample_25_94.ps1
sample_25_94.ps1
$ErrorActionPreference = 'Stop' <# .Synopsis Returns payload information from glcm. This info is required to send a heart beat request to AA #> function Get-HeartbeatInfo { [CmdletBinding()] param() $glcm = Get-DscLocalConfigurationManager $configurationName = "" $aaServerU...
combined_dataset/train/non-malicious/sample_45_35.ps1
sample_45_35.ps1
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2012-2014,2018,2020 The Linux Foundation. All rights reserved. */ #ifndef _DT_BINDINGS_QCOM_SPMI_VADC_H #define _DT_BINDINGS_QCOM_SPMI_VADC_H /* Voltage ADC channels */ #define VADC_USBIN 0x00 #define VADC_DCIN 0x01 #define VADC_VCHG_SNS 0x02 #defin...
combined_dataset/train/non-malicious/sample_63_47.ps1
sample_63_47.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function Remove-ServiceFabric...
combined_dataset/train/non-malicious/sample_31_48.ps1
sample_31_48.ps1
# # Module manifest for module 'OCI.PSModules.Ailanguage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/Set-WebConfig_1.ps1
Set-WebConfig_1.ps1
function Set-WebConfigSqlConnectionString { param( [switch]$help, [string]$configfile = $(read-host "Please enter a web.config file to read"), [string]$connectionString = $(read-host "Please enter a connection string"), [switch]$backup = $TRUE ) $usage = "`$conString = `"Data S...
combined_dataset/train/non-malicious/688.ps1
688.ps1
function Register-RsPowerBI { [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( [Parameter(Mandatory = $True)] [string] $ClientId, [Parameter(Mandatory = $True)] [string] $ClientSecret, [Parameter(Mand...
combined_dataset/train/non-malicious/sample_56_2.ps1
sample_56_2.ps1
# # Module manifest for module 'OCI.PSModules.Functions' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Functions.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_21_36.ps1
sample_21_36.ps1
ConvertFrom-StringData @' id_officeinv=Collecting Office inventory '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBo2EP+d3PakosN # lVFQxSdq...
combined_dataset/train/non-malicious/sample_1_42.ps1
sample_1_42.ps1
ConvertFrom-StringData @' id_certs=Certificate information id_certsdesc=Collecting information on installed certificates '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBA...
combined_dataset/train/non-malicious/sample_49_25.ps1
sample_49_25.ps1
enum RepairAction { Repair = 1 Reset SilentUpdate } Set-Variable RECOVERY_VERSION -Option Constant -Value 1 Set-Variable SkypeUserAccountName -Option Constant -Value "Skype" Set-Variable WINDOWS_VERSION_MAJOR -Option Constant -Value 10 Set-Variable WINDOWS_VERSION_MINOR -Option Constant -Value 0 ...
combined_dataset/train/non-malicious/1677.ps1
1677.ps1
function Add-LocalAdmin { param ( [string]$comp, [string]$sam, [string]$domain = $env:USERDOMAIN ) if ($comp -match '^\s*$') { throw "Comp not found '$comp'" } if ($sam -match '^\s*$') { throw "Sam not acceptable '$sam'" } ([adsi]"WinNT://$comp/Admi...
combined_dataset/train/non-malicious/PowerShell Template_7.ps1
PowerShell Template_7.ps1
Function new-script { $strName = $env:username $date = get-date -format d $name = Read-Host "Filename" $email = Read-Host "eMail Address" $file = New-Item -type file "c:\\Scripts\\$name.ps1" -force add-content $file "#==========================================================================" add-content $file ...
combined_dataset/train/non-malicious/sample_35_83.ps1
sample_35_83.ps1
# # Module manifest for module 'OCI.PSModules.Generativeaiinference' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeaiinference.dll' # Version number of this module. ModuleVersion = '74.1.0' #...
combined_dataset/train/non-malicious/sample_8_77.ps1
sample_8_77.ps1
PARAM($XMLFilename) . ./utils_cts.ps1 SkipSecondExecution trap [Exception] { WriteTo-ErrorDebugReport -ErrorRecord $_ continue } if (Test-Path ($XMLFilename)) { $AlertDisplay = "Performance Monitor Warning" [xml] $ReportXML = Get-Content -Path $XMLFilename foreach ($Table in $ReportXML.Selec...
combined_dataset/train/non-malicious/sample_12_18.ps1
sample_12_18.ps1
##---------------------------------------------------------------------------- ## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved. ##---------------------------------------------------------------------------- # Import string constants . ./StringConstants.ps1 Stop-Service -Name $ServiceConsta...
combined_dataset/train/non-malicious/Import-ADUser.ps1
Import-ADUser.ps1
#############################################################################\n##\n## Import-AdUser\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n#############################################################################\n\n<#\n\n.SYNOPSIS\n\nCreate users...
combined_dataset/train/non-malicious/sample_51_93.ps1
sample_51_93.ps1
# # Module manifest for module 'OCI.PSModules.Limits' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Limits.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions Compatib...
combined_dataset/train/non-malicious/Resolve-Aliases 1.7.ps1
Resolve-Aliases 1.7.ps1
#requires -version 2.0 ## ResolveAliases Module v 1.6 ######################################################################################################################## ## Sample Use: ## Resolve-Aliases Script.ps1 | Set-Content Script.Resolved.ps1 ## ls *.ps1 | Resolve-Aliases -Inplace ##############...
combined_dataset/train/non-malicious/240.ps1
240.ps1
function Get-SCSMObjectPrefix { [OutputType([psobject])] param ( [ValidateSet( 'DependentActivity', 'ManualActivity', 'ParallelActivity', 'ReviewActivity', 'RunbookAutomationActivity', 'SequentialActivity', 'IncidentRequest', 'ServiceRequest', 'Change', ...
combined_dataset/train/non-malicious/New-Struct_1.ps1
New-Struct_1.ps1
## New-Struct ## Creates a Struct class and emits it into memory ## The Struct includes a constructor which takes the parameters in order... ## ## Usage: ## # Assuming you have a csv file with no header and columns: artist,name,length ## New-Struct Song @{ ## Artist=[string]; ## Name=[string]; ...
combined_dataset/train/non-malicious/117.ps1
117.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ...
combined_dataset/train/non-malicious/sample_41_83.ps1
sample_41_83.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
combined_dataset/train/non-malicious/sample_27_46.ps1
sample_27_46.ps1
@{ GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Get-Acl", "Set-Acl", "Get-PfxCertific...
combined_dataset/train/non-malicious/Move-VMThin SVMotion.ps1
Move-VMThin SVMotion.ps1
function Move-VMThin { PARAM( [Parameter(Mandatory=$true,ValueFromPipeline=$true,HelpMessage="Virtual Machine Objects to Migrate")] [ValidateNotNullOrEmpty()] [System.String]$VM ,[Parameter(Mandatory=$true,HelpMessage="Destination Datastore")] [ValidateNotNullOrE...
combined_dataset/train/non-malicious/Robocopy Wrapper.ps1
Robocopy Wrapper.ps1
function Copy-Robocopy { param ( [Parameter(Position=0, Mandatory=$true)] [String] $Source, [Parameter(Position=1, Mandatory=$true)] [String] $Target, [Parameter(Position=2, Mandatory=$false)] [String[]] $Files = @("*.*"), [Parameter(Position=3, Mandatory=$false)] [String] $Op...
combined_dataset/train/non-malicious/5a74e43a-a30a-486b-a5a6-349644cb654a.ps1
5a74e43a-a30a-486b-a5a6-349644cb654a.ps1
#You'll need admin perms on all the servers to run this... Write-Host "ComputerName in White, then Local Groups in Green, Local Groups' Members in White" #This feeds the script a list of server names (ServerList.txt, placed in the same directory) #for which I want the Local Groups and all those groups' Members. ...
combined_dataset/train/non-malicious/ESXiMgmt module sample 3.ps1
ESXiMgmt module sample 3.ps1
####################################################################################################################### # File: ESXiMgmt_machines_poweroff_sample.ps1 # # Author: Alexander Petrovskiy ...
combined_dataset/train/non-malicious/sample_58_72.ps1
sample_58_72.ps1
@{ GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Get-Credential", "Get-ExecutionPolicy", "Set-E...
combined_dataset/train/non-malicious/sample_49_5.ps1
sample_49_5.ps1
# # Module manifest for module 'OCI.PSModules.Oce' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oce.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_66_90.ps1
sample_66_90.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
combined_dataset/train/non-malicious/sample_41_5.ps1
sample_41_5.ps1
# <copyright> # INTEL CONFIDENTIAL # # Copyright 2022 Intel Corporation # # This software and the related documents are Intel copyrighted materials, and your use of # them is governed by the express license under which they were provided to you ("License"). # Unless the License provides otherwise, you may not us...
combined_dataset/train/non-malicious/Backup Cisco UCS FI.ps1
Backup Cisco UCS FI.ps1
<# .Synopsis Does a backup of a single UCS target. .Description Uses the UCS PowerTool cmdlet 'Backup-Ucs' and does all four types of UCS backup. Filenames include the UCS name, date/time stamp, and backup type. The backup directory is set by a variable in the script. If it doesn't exist the scr...
combined_dataset/train/non-malicious/1201.ps1
1201.ps1
if( Test-Path -Path 'env:APPVEYOR' ) { Write-Warning -Message 'Can''t test Initialize-Lcm under AppVeyor.' return } $originalLcm = $null $tempDir = $null $privateKeyPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Cryptography\CarbonTestPrivateKey.pfx' -Resolve $publicKeyPath = Join-Path -Path $...
combined_dataset/train/non-malicious/VMWare Quick Migration.ps1
VMWare Quick Migration.ps1
######################################### #Name: VMWare Quick Migration Function #Author: Justin Grote <jgrote NOSPAMAT enpointe DOT com> #Credit: Inspired by Mike DiPetrillo's Quick Migration Script: http://www.mikedipetrillo.com/mikedvirtualization/2008/10/quick-migration-for-vmware-the-power-of-powershell.html #...
combined_dataset/train/non-malicious/596.ps1
596.ps1
function Run-SQLServerAgentJob{ [CmdletBinding()] param( [Parameter(Mandatory = $true)] [String] $JobName, [Parameter(Mandatory = $false)] [String] $Hostname = $env:COMPUTERNAME, [Parameter(Mandatory=$false)] [ScriptBlock] $LogScriptBlock...
combined_dataset/train/non-malicious/sample_7_45.ps1
sample_7_45.ps1
# # Module manifest for module 'OCI.PSModules.Onesubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Onesubscription.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported P...
combined_dataset/train/non-malicious/1523.ps1
1523.ps1
function Assert-GreaterThan { [CmdletBinding()] param( [Parameter(Position=0)] [object] $InputObject, [Parameter(Position=1)] [object] $LowerBound, [Parameter(Position=2)] [string] $Message ...
combined_dataset/train/non-malicious/sample_28_97.ps1
sample_28_97.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
combined_dataset/train/non-malicious/2735.ps1
2735.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$True,Position=0)] [String]$LogName ) Get-WinEvent -LogName $LogName
combined_dataset/train/non-malicious/sample_43_48.ps1
sample_43_48.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/sample_43_5.ps1
sample_43_5.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. ##################################################################################################### # # Registers the WinRM endpoint for this instance of PowerShell. # # If the parameters '-PowerShellHome' were specified, it means that t...
combined_dataset/train/non-malicious/sample_22_45.ps1
sample_22_45.ps1
# # Module manifest for module 'OCI.PSModules.Operatoraccesscontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Operatoraccesscontrol.dll' # Version number of this module. ModuleVersion = '77.0.0' #...
combined_dataset/train/non-malicious/1116.ps1
1116.ps1
$appPoolName = 'Carbon-Get-IisWebsite' $siteName = 'Carbon-Get-IisWebsite' function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { Install-IisAppPool -Name $appPoolName $bindings = @( 'http/*:8401:', 'https/*:8401:', 'http/...
combined_dataset/train/non-malicious/Get-Parameter 2.2.ps1
Get-Parameter 2.2.ps1
#Requires -version 2.0 #.Synopsis # Enumerates the parameters of one or more commands #.Notes # With many thanks to Hal Rottenberg, Oisin Grehan and Shay Levy # Version 0.80 - April 2008 - By Hal Rottenberg http://poshcode.org/186 # Version 0.81 - May 2008 - By Hal Rottenberg http://poshcode.org/255 # Ver...
combined_dataset/train/non-malicious/sample_3_57.ps1
sample_3_57.ps1
ConvertFrom-StringData @' id_ctswinsock=Winsock Component id_ctswinsockdescription=Collects information about the Winsock component. '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBA...
combined_dataset/train/non-malicious/sample_28_4.ps1
sample_28_4.ps1
# Localized 08/28/2023 11:37 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Fejlfinding Troubleshoot_DetectNetworkCache=Kontrollerer netværkscache for Windows-medieafspiller ... Resolution_Title=Løsning Resolution_ResetConfiguration=Nulstiller alle konfigura...