full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/1048.ps1 | 1048.ps1 |
& (Join-Path $TestDir ..\Initialize-CarbonTest.ps1 -Resolve)
if( Test-AdminPrivilege )
{
$originalTrustedHosts = $null
function Start-Test
{
$originalTrustedHosts = @( Get-TrustedHost )
}
function Stop-Test
{
if( $originalTrustedHosts )
{
Set-T... |
combined_dataset/train/non-malicious/Read-Choice_2.ps1 | Read-Choice_2.ps1 | # function Read-Choice {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, ValueFromRemainingArguments=$true)]
[hashtable[]]$Choices
,
[Parameter(Mandatory=$False)]
[string]$Caption = "Please choose!"
,
[Parameter(Mandatory=$False)]
[string]$Message = "Choose one of the following option... |
combined_dataset/train/non-malicious/sample_28_81.ps1 | sample_28_81.ps1 | #
# Module manifest for module 'OCI.PSModules.Datasafe'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datasafe.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
Comp... |
combined_dataset/train/non-malicious/sample_20_17.ps1 | sample_20_17.ps1 | <#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line... |
combined_dataset/train/non-malicious/sample_14_35.ps1 | sample_14_35.ps1 |
. $PSScriptRoot\PathProcessingNonExistingPaths.ps1
. $PSScriptRoot\PathProcessingNoWildcards.ps1
. $PSScriptRoot\PathProcessingWildcards.ps1
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7... |
combined_dataset/train/non-malicious/sample_28_68.ps1 | sample_28_68.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 = '83.1.0'
# Supported... |
combined_dataset/train/non-malicious/218.ps1 | 218.ps1 | function Get-LocalUser
{
PARAM
(
[Alias('cn')]
[String[]]$ComputerName = $Env:COMPUTERNAME,
[String]$AccountName,
[System.Management.Automation.PsCredential]$Credential
)
$Splatting = @{
Class = "Win32_UserAccount"
Namespace = "root\cimv2"
Filter = "LocalAccount='$True'"
}
If ($PSBoundParam... |
combined_dataset/train/non-malicious/3127.ps1 | 3127.ps1 |
function Get-WLANProfile
{
[CmdletBinding()]
param(
[Parameter(
Position=0,
HelpMessage='Indicates that the password appears in plain text')]
[Switch]$ShowPassword,
[Parameter(
Position=1,
HelpMessage='Filter WLAN-Profiles by Name or SSID')]
[String]$Search,
[Parameter(
Position... |
combined_dataset/train/non-malicious/sample_13_47.ps1 | sample_13_47.ps1 | # Rule ID: 3416
#
# Rule checking to see if Power Plan of the server is set to High Performance
#
# Created: 7/19/2012
# Author: Jonathan Randall
#******************************************************************************************************************
Import-LocalizedData -BindingVariable Localized... |
combined_dataset/train/non-malicious/Get-Path_1.ps1 | Get-Path_1.ps1 | function Get-Path {
[CmdletBinding(DefaultParameterSetName="DriveQualified")]
Param(
[Parameter(Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
[Alias("PSPath")]
[String]
$Path,
[Parameter()]
[Switch]$ResolvedPath,
[Parameter(ParameterSetName="ProviderQuali... |
combined_dataset/train/non-malicious/Backup-ModifiedGPOs_2.ps1 | Backup-ModifiedGPOs_2.ps1 | ###########################################################################"
#
# NAME: Backup-ModifiedGPOs.ps1
#
# AUTHOR: Jan Egil Ring
# EMAIL: jan.egil.ring@powershell.no
#
# COMMENT: All Group Policy Objects modified in the specified timespan are backup up to the specified backup path.
# For more d... |
combined_dataset/train/non-malicious/Invoke-Command on subnet.ps1 | Invoke-Command on subnet.ps1 | $secpasswd = ConvertTo-SecureString "here the password" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ("Administrator@domain", $secpasswd)
$subnet="192.168.0."
$hosts=( New-IPRange -start ($subnet + 1) -end ($subnet + 255) | Test-Online | Get-HostName | ForEach-Object { $_.Ho... |
combined_dataset/train/non-malicious/1652.ps1 | 1652.ps1 |