full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/Add-SqlTable_5.ps1
Add-SqlTable_5.ps1
try {add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop} catch {add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo"} try {add-type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=8...
combined_dataset/train/non-malicious/3984.ps1
3984.ps1
function ServiceBusSubscriptionTests { $location = Get-Location $resourceGroupName = getAssetName "RGName-" $namespaceName = getAssetName "Namespace-" $nameTopic = getAssetName "Topic-" $subName = getAssetName "Subscription-" Write-Debug "Create resource group" New-...
combined_dataset/train/non-malicious/sample_0_69.ps1
sample_0_69.ps1
ConvertFrom-StringData @' id_ctstcpip=TCPIP id_ctstcpipdescription=Collects information about TCPIP. '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlA...
combined_dataset/train/non-malicious/sample_63_97.ps1
sample_63_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/VMware Daily Report_2.ps1
VMware Daily Report_2.ps1
# vCheck - Daily Error Report # # Changes: # Version 1.12 - Added Hosts in Maintenance Mode and not responding + Bug Fixes # Version 1.11 - Simplified mail function. # Version 1.10 - Added How many days old the snapshots are # Version 1.9 - Added ability to change user account which makes the WMI calls # Versi...
combined_dataset/train/non-malicious/842.ps1
842.ps1
Param( [parameter(Mandatory=$true)] $CsvFilePath ) $ErrorActionPreference = "Stop" $scriptsPath = $PSScriptRoot if ($PSScriptRoot -eq "") { $scriptsPath = "." } . "$scriptsPath\asr_logger.ps1" . "$scriptsPath\asr_common.ps1" . "$scriptsPath\asr_csv_processor.ps1" Function ProcessItemImpl($processor, $cs...
combined_dataset/train/non-malicious/sample_4_56.ps1
sample_4_56.ps1
# Name tss_FindUserBadPwdAttempts.ps1 <# .SYNOPSIS Script to find sAMAccountName, pwdLastSet, lockoutTime, DC, lastLogon, logonCount, badPwdCount, badPasswordTime for a username. .DESCRIPTION Script to assist in troubleshooting accounts experiencing bad password attempts. It can also be used to investiga...
combined_dataset/train/non-malicious/sample_18_34.ps1
sample_18_34.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
combined_dataset/train/non-malicious/Invoke-AddTypeTypeDefini.ps1
Invoke-AddTypeTypeDefini.ps1
#############################################################################\n##\n## Invoke-AddTypeTypeDefinition\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS...
combined_dataset/train/non-malicious/121.ps1
121.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 ($Aa...
combined_dataset/train/non-malicious/sample_2_53.ps1
sample_2_53.ps1
// Copyright (c) 2016 Dell Inc. or its subsidiaries.. All rights reserved. [dynamic, provider("dcismprovider"), Association, Version ( "2.34.0" ), UMLPackagePath ( "CIM::Core::CoreElements" ), Description ( "CIM_ElementView is used to associate an instance of CIM_View " "with an instan...
combined_dataset/train/non-malicious/sample_11_24.ps1
sample_11_24.ps1
##---------------------------------------------------------------------------- ## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved. ##---------------------------------------------------------------------------- # Import string constants . ./StringConstants.ps1 Stop-Service -Name $ServiceConsta...
combined_dataset/train/non-malicious/sample_27_10.ps1
sample_27_10.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll' # Version number of this module. ModuleVersion...
combined_dataset/train/non-malicious/sample_47_84.ps1
sample_47_84.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Troubleshooting Troubleshoot_DetectDVDDevice=Checking DVD device ... Troubleshoot_DetectDVDvideoDecoder=Checking video decoder for DVD playback ... Troubleshoot_DetectDVDAudioDecoder...
combined_dataset/train/non-malicious/319.ps1
319.ps1
function Register-PSFMessageEvent { [CmdletBinding(PositionalBinding = $false, HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Register-PSFMessageEvent')] Param ( [Parameter(Mandatory = $true)] [string] $Name, [Parameter(Mandatory = $true)] [System.Management.Automation.ScriptBloc...
combined_dataset/train/non-malicious/sample_59_66.ps1
sample_59_66.ps1
]Calculated table '%{oii_table/}' must have only one partition with source of type Calculated.ĸDirect Lake मोड के लिए Direct Lake डेटा स्रोत की आवश्यकता होती है. Direct Lake मोड में तालिकाएँ SQL या OneLake डेटास्रोत प्रकार होनी चाहिए. कृपया निम्न Direct Lake तालिकाओं%{oii_TableNames/} की डेटा स्रोत परिभाषाओं को सत्यापि...
combined_dataset/train/non-malicious/sample_32_52.ps1
sample_32_52.ps1
# # Module manifest for module 'OCI.PSModules.Cloudguard' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudguard.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/Add new smtp_set prmary_4.ps1
Add new smtp_set prmary_4.ps1
#alias,addnewemailaddress import-csv .\\source.csv | foreach { $user = Get-Mailbox $_.alias $user.emailAddresses+= $_.addnewemailaddress $user.primarysmtpaddress = $_.addnewemailaddress Set-Mailbox $user -emailAddresses $user.emailAddresses set-Mailbox $user -PrimarySmtpAddress $user.primarysmtpaddress }
combined_dataset/train/non-malicious/Yet another hex2dec.ps1
Yet another hex2dec.ps1
@set @script=0 /* @echo off set @script= if "%1" neq "" cscript //nologo //e:jscript "%~dpnx0" %1 && goto:eof if "%1" equ "?" cscript //nologo //e:jscript "%~dpnx0" %1 && goto:eof setlocal echo Hex2dec v3.07 - converts hex to decimal and vice versa echo Copyright (C) 2012-2013 greg...
combined_dataset/train/non-malicious/sample_56_68.ps1
sample_56_68.ps1
# # Module manifest for module 'OCI.PSModules.Aispeech' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aispeech.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/3653.ps1
3653.ps1
function Test-CreateTargetGroup { $a1 = Create-ElasticJobAgentTestEnvironment try { Test-CreateTargetGroupWithDefaultParam $a1 Test-CreateTargetGroupWithParentObject $a1 Test-CreateTargetGroupWithParentResourceId $a1 Test-CreateTargetGroupWithPiping $a1 } finally { Remove-ResourceGroup...
combined_dataset/train/non-malicious/4157.ps1
4157.ps1
[CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [string]$SCCMModule = '<UNCPath>\ConfigurationManager.psd1', [ValidateNotNullOrEmpty()] [string]$SCCMServer = '<FQDN of SCCM Server>', [ValidateNotNullOrEmpty()] [string]$SCCMSiteDescription = '<SCCM Server Description>', [ValidateNotNullOrEmpty()] [string]$...
combined_dataset/train/non-malicious/sample_1_19.ps1
sample_1_19.ps1
# # Module manifest for module 'OCI.PSModules.Dataintegration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dataintegration.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported P...
combined_dataset/train/non-malicious/4314.ps1
4314.ps1
if($IsMacOS) { return } function SuiteSetup { Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue $script:ProgramFilesModulesPath = Get-AllUsersModulesPath $script:MyDocumentsModulesPath ...
combined_dataset/train/non-malicious/sample_4_81.ps1
sample_4_81.ps1
#************************************************ # TS_UploadSingleFile # Version 1.2.1 # Date: 02-19-2012 # Author: Andre Teixeira - andret@microsoft.com # Description: This script ask customer a file name giving the option for them to upload the selected file #************************************************ ...
combined_dataset/train/non-malicious/Test-Certificate.ps1
Test-Certificate.ps1
##################################################################### # Test-Certificate.ps1 # Version 0.63 # # Tests specified certificate for certificate chain and revocation # # Vadims Podans (c) 2009 # http://www.sysadmins.lv/ ##################################################################### #requires ...
combined_dataset/train/non-malicious/sample_52_52.ps1
sample_52_52.ps1
function Get-WACRFRoleAndFeatureDependencies { <# .SYNOPSIS Retrieves all Feature/Role/Role Services, and their dependencies, to be installed on the target server. .DESCRIPTION Retrieves all Feature/Role/Role Services, and their dependencies, to be installed on the target server. .PARAMETER FeatureName I...
combined_dataset/train/non-malicious/sample_8_10.ps1
sample_8_10.ps1
ConvertFrom-StringData @' id_registrysizelimitcheck=Checking Registry Size Limit id_registrysizelimitcheckdesc=Checking if Registry Size Limit setting is present on the system id_registrysizelimitcheckrc=The RegistrySizeLimit entry exists in the registry. This may cause the computer to stop responding as well as log...
combined_dataset/train/non-malicious/sample_23_32.ps1
sample_23_32.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ResourceGraph.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Module]::Instance # Export nothing to clear implici...
combined_dataset/train/non-malicious/Send-XmppMessage.ps1
Send-XmppMessage.ps1
# Download XMPP SDK from http://www.ag-software.de/index.php?page=agsxmpp-sdk function Send-XmppMessage { param ( $From = $( Throw "You must specify a Jabber ID for the sender." ), $Password, # Leave blank to be prompted for password $To = $( Throw "You must specify a Jabber ID for the recipient." ), $Bo...
combined_dataset/train/non-malicious/sample_24_18.ps1
sample_24_18.ps1
# # Module manifest for module 'OCI.PSModules.Loadbalancer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loadbalancer.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditi...
combined_dataset/train/non-malicious/3359.ps1
3359.ps1
$excludedExtensions = @(".dll", ".zip", ".msi", ".exe") function Get-Transcript { param([string] $path) return Get-Content $path | Select-String -InputObject {$_} -Pattern "^Start Time\s*:.*" -NotMatch | Select-String -InputObject {$_} -Pattern "^End Time\s*:.*" -NotMatch | Select-S...
combined_dataset/train/non-malicious/sample_25_49.ps1
sample_25_49.ps1
# # Module manifest for module 'OCI.PSModules.Certificatesmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificatesmanagement.dll' # Version number of this module. ModuleVersion = '83.1.0' ...
combined_dataset/train/non-malicious/sample_31_98.ps1
sample_31_98.ps1
ASCII Code 备忘清单 === 这份速查表是 ASCII 码表的完整列表,包含了它们的数字和名称 ASCII 代码表 --- <!--rehype:body-class=cols-1&style=display:none;--> ### ASCII 代码表 | Symbol(符号) | Dec | Oct | Hex | Bin | |------------------------------------|------|------|------|----------| | NUL (Null) ...
combined_dataset/train/non-malicious/SqlProxy_6.psm1.ps1
SqlProxy_6.psm1.ps1
# --------------------------------------------------------------------------- ### <Author> ### Chad Miller ### </Author> ### <Description> ### Based on functions in SQLPSX. SqlProxy.psm1 module is used for administering ### SQL Server logins, users, and roles. Designed to be used with PS Remoting. ### All actio...
combined_dataset/train/non-malicious/sample_9_80.ps1
sample_9_80.ps1
#************************************************ # TS_SwithesInBootiniCheck.ps1 # Version 1.0.1 # Date: 2/28/2013 # Author: v-blchen # Description: [Idea ID 5091] [Windows] Super Rule-To check if both 3GB and PAE switch is present in boot.ini for a 32bit OS (Pre - Win 2k8) # Rule number: 5091 # Rule URL: htt...
combined_dataset/train/non-malicious/Compare 2 foldertrees.ps1
Compare 2 foldertrees.ps1
function Compare-Foldertrees { param( $path1, $path2 ) $len1 = $path1.length $len2 = $path2.length . Require-function Get-MD5 Write-Host "====== First path only =======`n" gci $path1 -rec | ? {! $_.PSISContainer} | % { $fileName1 = $_.fullN...
combined_dataset/train/non-malicious/sample_15_98.ps1
sample_15_98.ps1
#************************************************ # TS_SurfacePro3DetectWifiDriverVersion.ps1 # Version 1.0.09.19.14: Created and tested SurfacePro3 scripts from Sep12-19 # Version 1.1.10.09.14: Modified the detection method from file version to product version because the file version does not change between versio...
combined_dataset/train/non-malicious/powershell ise config.ps1
powershell ise config.ps1
<configuration> <startup> <supportedRuntime version="v4.0" /> <supportedRuntime version="v2.0.50727" /> <process> <rollForward enabled="false" /> </process> </startup> <runtime> <loadFromRemoteSources enabled="true"/> </runtime> </configuration>
combined_dataset/train/non-malicious/Test-ADCredentials.ps1
Test-ADCredentials.ps1
Function Test-ADCredentials { Param($username, $password, $domain) Add-Type -AssemblyName System.DirectoryServices.AccountManagement $ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain $pc = New-Object System.DirectoryServices.AccountManagement.PrincipalContext($ct, $domain) New-Object PSOb...
combined_dataset/train/non-malicious/Get Active Sync devices .ps1
Get Active Sync devices .ps1
<# .SYNOPSIS Get-InactiveActiveSyncDevices pulls all user mailboxes with an Active Sync partnership and then selects the Active Sync devices that haven't synced in the specified period. These devices are sorted in ascending order and placed in a HTML table which is emailed to the specified user using a specified repl...
combined_dataset/train/non-malicious/vCenterRetentionPolicy.ps1
vCenterRetentionPolicy.ps1
function Get-vCenterRetentionPolicy { $settings = get-view -id OptionManager-VpxSettings if ($settings) { $maxAge = ($settings.Setting | where { $_.Key -eq "task.maxAge" }).Value $maxAgeEnabled = ($settings.Setting | where { $_.Key -eq "task.maxAgeEnabled" }).Value $obj = New-Object -TypeName PSObject ...
combined_dataset/train/non-malicious/Out-DataTable_4.ps1
Out-DataTable_4.ps1
####################### function Get-Type { param($type) $types = @( 'System.Boolean', 'System.Byte[]', 'System.Byte', 'System.Char', 'System.Datetime', 'System.Decimal', 'System.Double', 'System.Guid', 'System.Int16', 'System.Int32', 'System.Int64', 'System.Single', 'System.UInt16', 'System.UIn...
combined_dataset/train/non-malicious/sample_9_34.ps1
sample_9_34.ps1
ConvertFrom-StringData @' progressbar_id_turnofffetchthrottling_exists=Verifying TurnOffFetchThrottling Registry Setting progressbar_id_turnofffetchthrottling_existsdesc=Determining setting of TurnOffFetchThrottling registry value '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkg...
combined_dataset/train/non-malicious/sample_22_6.ps1
sample_22_6.ps1
[CmdletBinding()] param () if (!(Test-Path "$PsScriptRoot\Modules")) { mkdir "$PsScriptRoot\Modules" | Out-Null } if (!(Test-Path "$PsScriptRoot\Modules\Az")) { Save-Module -Name Az -Repository PSGallery -Path "$PsScriptRoot\Modules\" } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCC...
combined_dataset/train/non-malicious/1097.ps1
1097.ps1
function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Test-ShouldFindExistingSection { Assert-True (Test-IisConfigurationSection -SectionPath 'system.webServer/cgi') } function Test-ShouldNotFindMissingSection { $error.Clear() Ass...
combined_dataset/train/non-malicious/Deploy Multiple VMs v1.ps1
Deploy Multiple VMs v1.ps1
############################################################# # Deploy-VM.ps1 v1.1 # David Summers 2011/8/2 # Script to deploy VM(s) from Template(s) and set appropriate # IP config for Windows VMs. Also sets # of CPUs, MemoryMB, # port group, and several custom attributes. # Moves deployed VM to specific VMs/Te...
combined_dataset/train/non-malicious/sample_63_71.ps1
sample_63_71.ps1
# # Script module for module 'Az.Nginx' that is executed when 'Az.Nginx' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 07/31/2024 06:54:56 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { if ...
combined_dataset/train/non-malicious/sample_42_67.ps1
sample_42_67.ps1
# # Module manifest for module 'OCI.PSModules.Usageapi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usageapi.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/Access Jira (REST).ps1
Access Jira (REST).ps1
param($Issue, $Credentials = $(Get-Credential), $BaseURI = "https://your.jira.server/jira") function ConvertTo-UnsecureString( [System.Security.SecureString][parameter(mandatory=$true)]$SecurePassword) { $unmanagedString = [System.IntPtr]::Zero; try { $unmanagedString = [Runtime.Interop...
combined_dataset/train/non-malicious/sample_37_90.ps1
sample_37_90.ps1
FChỉ có thể sử dụng tham chiếu lịch trong các hàm thời gian thông minh.zHàm SELECTCOLUMNS cần có tên cột là số đối số %I64d{iArg/}. Chỉ có thể bỏ qua tên cột đối với các tham chiếu cột đơn giản.:Tên cột mới chỉ có thể là một chuỗi không trống không đổi.ĎChúng tôi không thể xử lý yêu cầu vì yêu cầu sẽ cần dự phòng về ch...
combined_dataset/train/non-malicious/3558.ps1
3558.ps1
$JobQueryWaitTimeInSeconds = 0 $ResourceGroupName = "E2ERg" $VaultName = "E2ETest" $FabricNameToBeCreated = "ReleaseFabric" $PrimaryFabricName = "IDCLAB-A137.ntdev.corp.microsoft.com" $RecoveryFabricName = "IDCLAB-A147.ntdev.corp.microsoft.com" $PolicyName = "E2EPolicy1" $PrimaryProtectionContainerName ...
combined_dataset/train/non-malicious/3466.ps1
3466.ps1
function Test-GetNonExistingDataBoxJob { $dfname = Get-DataBoxJobName $rgname = Get-ResourceGroupName $rglocation = Get-ProviderLocation ResourceManagement New-AzResourceGroup -Name $rgname -Location $rglocation -Force Assert-ThrowsContains { Get-AzDataBoxJob -Resourc...
combined_dataset/train/non-malicious/3497.ps1
3497.ps1
function Write-InstallationCheckToFile { Param($installationchecks) if (Get-Module AzureRM.Profile -ListAvailable -ErrorAction Ignore) { Write-Warning ("Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script...
combined_dataset/train/non-malicious/1975.ps1
1975.ps1
$Day = DATA { ConvertFrom-StringData @' messageDate = Today is d0 = Sunday d1 = Monday d2 = Tuesday d3 = Wednesday d4 = Thursday d5 = Friday d6 = Saturday '@ } Import-LocalizedData -BindingVariable Day $a = $Day.d0, $Day.d1, $Day.d2, $Day.d3, $Day.d4, $Day.d5, $Day.d6 ...
combined_dataset/train/non-malicious/Get-Parameter 2.0.ps1
Get-Parameter 2.0.ps1
#Requires -version 2.0 #.Synopsys # Enumerates the parameters of one or more commands #.Notes # With many thanks to Hal Rottenberg, Oisin Grehan and Shay Levy # Version 0.* - By Hal Rottenberg http://poshcode.org/549 # Version 0.* - By Oisín Grehan http://poshcode.org/446 # - Added resolving ali...
combined_dataset/train/non-malicious/sample_36_71.ps1
sample_36_71.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 = '82.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/3237.ps1
3237.ps1
class StorageProvider : BaseLogger { [string]$ConfigPath StorageProvider([Logger]$Logger) { $this.Logger = $Logger $this.ConfigPath = $script:defaultPoshBotDir } StorageProvider([string]$Dir, [Logger]$Logger) { $this.Logger = $Logger $this.ConfigPath = $Dir } ...
combined_dataset/train/non-malicious/sample_12_30.ps1
sample_12_30.ps1
#************************************************ # DC_DFSServer-Component.ps1 # Version x # Date: 20022 # Author: WalterE # Description: Collects information about DFS Server. # Called from: Networking Diags #******************************************************* Trap [Exception] { # Handle exception a...
combined_dataset/train/non-malicious/sample_67_56.ps1
sample_67_56.ps1
# # Module manifest for module 'OCI.PSModules.Blockchain' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Blockchain.dll' # Version number of this module. ModuleVersion = '90.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/Set-Clipboard.ps1
Set-Clipboard.ps1
#############################################################################\n##\n## Set-Clipboard\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\nSends the g...
combined_dataset/train/non-malicious/1312.ps1
1312.ps1
function Write-CFile { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] $Path, [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [AllowEmptyCollection()] [AllowEmptyString()] [string[]]$InputObject, ...
combined_dataset/train/non-malicious/2354.ps1
2354.ps1
$PswaServerName = 'PSWA' $DomainControllerName = 'LABDC' $JeaRoleName = 'ADUserManager' $AdGroupName = 'ADUserManagers' $DomainName = 'lab.local' New-ADGroup -Name ADUserManagers -GroupScope DomainLocal $functionText = "@ function New-User { [CmdletBinding()] param ( [Parameter(Mandatory)] [Valida...
combined_dataset/train/non-malicious/sample_4_30.ps1
sample_4_30.ps1
ConvertFrom-StringData @' id_ctscertificates=Certificates id_ctscertificatesdescription=Collects information about Certificates. id_ctscertificatesmachinestore=Certificates id_ctscertificatesmachinestoredescription=Collecting information about certificates in the machine store. id_ctscertificatesuserstore=Certific...
combined_dataset/train/non-malicious/sample_42_87.ps1
sample_42_87.ps1
# # Module manifest for module 'OCI.PSModules.Aianomalydetection' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aianomalydetection.dll' # Version number of this module. ModuleVersion = '82.0.0' # Suppo...
combined_dataset/train/non-malicious/Check latest BIOS Rev.ps1
Check latest BIOS Rev.ps1
$BiosRev = Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName -Credential $Credentials # Shortened URL for the Dell Support page, fileid=441102, appears to be the identifier for BIOS downloads # I tested this on a few different models of Dell workstations. $DellBIOSPage = "http://support.dell.com/suppor...
combined_dataset/train/non-malicious/sample_61_31.ps1
sample_61_31.ps1
# # Module manifest for module 'OCI.PSModules.Licensemanager' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Licensemanager.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSE...
combined_dataset/train/non-malicious/sample_17_45.ps1
sample_17_45.ps1
# # Module manifest for module 'OCI.PSModules.Mediaservices' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEdi...
combined_dataset/train/non-malicious/2650.ps1
2650.ps1
Import-Module SQLPS -DisableNameChecking $AGName = 'TestAG1' $PrimaryNode = 'SQLNODE1' $FailoverNode = 'SQLNODE2' $IPs = @('10.152.18.25/255.255.255.0','10.152.19.160/255.255.255.0','10.152.20.119/255.255.255.0') $replicas = @() $cname = (Get-Cluster -name $PrimaryNode).name $nodes = (get-clusternode -Cluster $cname...
combined_dataset/train/non-malicious/sample_40_93.ps1
sample_40_93.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 = '82.0.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_61_91.ps1
sample_61_91.ps1
# # Module manifest for module 'OCI.PSModules.Cims' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cims.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/3290.ps1
3290.ps1
enum DiscordPremiumType { NitroClassic = 1 Nitro = 2 } enum DiscordVisibilityType { None = 0 Everyone = 1 } class DiscordUser : Person { [string]$Discriminator [string]$Avatar [bool]$IsBot [bool]$IsMfaEnabled [string]$Locale ...
combined_dataset/train/non-malicious/VerifyCategoryRule_1.ps1
VerifyCategoryRule_1.ps1
## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) Set-StrictMode -Version Latest if($message.Body -match "book") { [Console]::WriteLine("This is a message about the book.") } else { [Console]::WriteLine("This is an unknown message.") }
combined_dataset/train/non-malicious/477.ps1
477.ps1
function Get-QuoteOfTheDay{ $Metadata = @{ Title = "Get quote of the Day" Filename = "Get-QuoteOfTheDay.ps1" Description = "" Tags = "" Project = "" Author = "Janik von Rotz" AuthorContact = "www.janikvonrotz.ch" CreateDate = "2013-05-16" LastEditDate = "2013-05-16" Version = "1.0.0" License =...
combined_dataset/train/non-malicious/4236.ps1
4236.ps1
$firewallName = "" $serverPort = "" function Invoke-DaisyChain { param( [Parameter(Mandatory=$true)][string]$port, [Parameter(Mandatory=$true)][string]$daisyserver, [Parameter(Mandatory=$true)][string]$c2server, [Parameter(Mandatory=$true)][string]$c2port, [Parameter(Mandatory=$true)][string]$URLs, [Parameter(Manda...
combined_dataset/train/non-malicious/SqlProxy_8.psm1.ps1
SqlProxy_8.psm1.ps1
# --------------------------------------------------------------------------- ### <Author> ### Chad Miller ### </Author> ### <Description> ### Based on functions in SQLPSX. SqlProxy.psm1 module is used for administering ### SQL Server logins, users, and roles. Designed to be used with PS Remoting. ### All actio...
combined_dataset/train/non-malicious/sample_43_37.ps1
sample_43_37.ps1
# # Module manifest for module 'OCI.PSModules.Threatintelligence' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Threatintelligence.dll' # Version number of this module. ModuleVersion = '82.0.0' # Suppo...
combined_dataset/train/non-malicious/sample_67_13.ps1
sample_67_13.ps1
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'https://aka...
combined_dataset/train/non-malicious/sample_60_96.ps1
sample_60_96.ps1
# # Module manifest for module 'OCI.PSModules.Opsi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opsi.dll' # Version number of this module. ModuleVersion = '90.0.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/sample_10_60.ps1
sample_10_60.ps1
#************************************************ # TS_B2693877_Sophos_BEFLTCheck.ps1 # Version 1.0.1 # TemplateVersion 1.2 # Date: 04/26/2012 11:29:18 # Author: jasonf # Description: Check for the presence of Sophos BEFLT.SYS version 5.60.1.7 #************************************************ Import-Localize...
combined_dataset/train/non-malicious/Get-BogonList_2.ps1
Get-BogonList_2.ps1
function Get-BogonList { <# .SYNOPSIS Gets the bogon list. .DESCRIPTION The Get-BogonList function retrieves the bogon prefix list maintained by Team Cymru. A bogon prefix is a route that should never appear in the Internet routing table. A packet routed over the public Internet (not including over ...
combined_dataset/train/non-malicious/sample_26_59.ps1
sample_26_59.ps1
# # Module manifest for module 'OCI.PSModules.Emwarehouse' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Emwarehouse.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEdition...
combined_dataset/train/non-malicious/sample_51_78.ps1
sample_51_78.ps1
# # Module manifest for module 'OCI.PSModules.Queue' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Queue.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_48_76.ps1
sample_48_76.ps1
@{ GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 " Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" ModuleToProcess="PSDiagnostics.psm1" Func...
combined_dataset/train/non-malicious/sample_65_20.ps1
sample_65_20.ps1
# # Module manifest for module 'OCI.PSModules.Genericartifactscontent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Genericartifactscontent.dll' # Version number of this module. ModuleVersion = '89.0.0...
combined_dataset/train/non-malicious/2481.ps1
2481.ps1
function Copy-AzureItem { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipelineByPropertyName)] [ValidateNotNullOrEmpty()] [ValidateScript({ Test-Path -Path $_ -PathType Leaf })] [Alias('FullName')] [string]$FilePath, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Cont...
combined_dataset/train/non-malicious/sample_29_78.ps1
sample_29_78.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/sample_49_26.ps1
sample_49_26.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Import Observability EventSource $observabili...
combined_dataset/train/non-malicious/1260.ps1
1260.ps1
function Get-CProgramInstallInfo { [CmdletBinding()] [OutputType([Carbon.Computer.ProgramInstallInfo])] param( [string] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( -not (Test-Pat...
combined_dataset/train/non-malicious/sample_45_63.ps1
sample_45_63.ps1
# # Module manifest for module 'OCI.PSModules.Osuborganizationsubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osuborganizationsubscription.dll' # Version number of this module. ModuleVersion...
combined_dataset/train/non-malicious/1086.ps1
1086.ps1
& (Join-Path -Path $PSScriptRoot 'Initialize-CarbonTest.ps1' -Resolve) Describe 'Get-FirewallRule.when getting all rules' { It 'should get firewall rules' { [Carbon.Firewall.Rule[]]$rules = Get-FirewallRule $rules | Should -Not -BeNullOrEmpty $expectedCount = netsh advf...
combined_dataset/train/non-malicious/sample_13_95.ps1
sample_13_95.ps1
:2+?Vb/0/+MQ+>>E%+>>E%+>,Mo>p)<p %+?ht35!C)O4<Q:2+BosH+>GPm>p(dT+?Vb/0/+M24<Q:2+BosB/heD%/heD#2'?0I5!C)Q4s3$Q+?Vb/0/+MQ+>t>s0d'aE0/4S3 %4<Q:2+?Vb/0/+MQ+>>E%+>>E%+>,Mo>p)<p+?ht35!C)O4<Q:2+BosH+>GVo>p(dT+?Vb/0/+M24<Q:2+BosB/heD%/heD#2'?0I %5!C)Q4s3$Q+?Vb/0/+MQ+>t>s1E]sG0/4S34<Q:2+?Vb/0/+MQ+>>E%+>>E%+>,Mo>p)<p+?ht35!C)...
combined_dataset/train/non-malicious/sample_27_92.ps1
sample_27_92.ps1
# # Module manifest for module 'OCI.PSModules.Vbsinst' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/3154.ps1
3154.ps1
function Test-IsVanillaWindow { $hasAnsiSupport = (Test-AnsiTerminal) -or ($Env:ConEmuANSI -eq "ON") -or ($env:PROMPT) -or ($env:TERM_PROGRAM -eq "Hyper") -or ($env:TERM_PROGRAM -eq "vscode") return !$hasAnsiSupport } function Test-AnsiTerminal { return $Host.UI.SupportsVirtualTerminal } function Test-Ps...
combined_dataset/train/non-malicious/sample_42_36.ps1
sample_42_36.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
combined_dataset/train/non-malicious/sample_35_92.ps1
sample_35_92.ps1
# # Module manifest for module 'OCI.PSModules.Ocicontrolcenter' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported...
combined_dataset/train/non-malicious/sample_50_58.ps1
sample_50_58.ps1
export function displayLastSelectedItem(id) { var item = document.getElementById(id); var scroll = document.getElementById(id + "-scroll"); if (!!item && !!scroll) { try { // To be optimized (how to detect the end of scroll container?) for (var i = 0; i < 10; i++) { ...
combined_dataset/train/non-malicious/2592.ps1
2592.ps1
Param( [string]$zone, [string]$domain, [string]$dc, [switch]$csv, [switch]$help ) function dumpByteArray([System.Byte[]]$array, [int]$width = 9) { $hex = "" $chr = "" $int = "" $i = $array.Count "Array contains {0} elements" -f $i $index = 0 $count = 0 while ($i-- -gt 0) { $val...
combined_dataset/train/non-malicious/NetBackup Backup Report.ps1
NetBackup Backup Report.ps1
################################################################################################### # # NAME: NBU-BackupReport.ps1 # # AUTHOR: Martijn Jonker # # COMMENT: Script to create a backup report from Netbackup jobs on windows platform. # Adjust variables below this section. # The script generates a rep...
combined_dataset/train/non-malicious/4052.ps1
4052.ps1
param([hashtable]$Theme) Set-StrictMode -Version Latest $Theme.HostBackgroundColor = if ($Pscx:IsAdmin) { 'DarkRed' } else { 'Black' } $Theme.HostForegroundColor = if ($Pscx:IsAdmin) { 'White' } else { 'Gray' } $Theme.PromptForegroundColor = if ($Pscx:IsAdmin) { 'Yellow' } else { 'White' } $Theme...