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
function Get-ProductKey { < .SYNOPSIS Retrieves the product key and OS information from a local or remote system/s. ...
combined_dataset/train/non-malicious/sample_24_2.ps1
sample_24_2.ps1
# # Module manifest for module 'OCI.PSModules.Objectstorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Objectstorage.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEdi...
combined_dataset/train/non-malicious/sample_51_43.ps1
sample_51_43.ps1
# # Module manifest for module 'OCI.PSModules.Osubusage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubusage.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Co...
combined_dataset/train/non-malicious/sample_19_66.ps1
sample_19_66.ps1
#************************************************ # TS_DetectLowPathMTU.ps1 # Version 1.0 # Date: 02/06/2014 # Author: BBenson # Description: # Rule number: 262755 # Rule ID: d2aaab92-c906-4b3e-a4e5-67244c49c422 # Rule URL: https://kse.microsoft.com/Contribute/Idea/de6654f5-8b05-4f97-b67b-f9ad51bc78ab # P...
combined_dataset/train/non-malicious/sample_7_9.ps1
sample_7_9.ps1
// Copyright (c) 2010 Dell Inc. All rights reserved. // ================================================================== // DCIM_RAIDRegisteredProfile // ================================================================== [dynamic, provider("dcismprovider")] class DCIM_CMCRegisteredProfile : CIM_RegisteredProf...
combined_dataset/train/non-malicious/sample_34_91.ps1
sample_34_91.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Ilyen nevű és típusú környezeti változó már létezik. EnvironmentErrorDoesNotExists=Ilyen nevű és típusú környezeti változó nem létezik. '@ # SIG # Begin signature block # MIIoPQYJKoZIhvcNAQcCoIIoLjCCKCoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaT...
combined_dataset/train/non-malicious/3503.ps1
3503.ps1
function Test-GetApplicationInsightsApiKey { $rgname = Get-ApplicationInsightsTestResourceName; try { $appName = "app" + $rgname; $loc = Get-ProviderLocation ResourceManagement; $kind = "web"; New-AzResourceGroup -Name $rgname -Location $loc; New-AzA...
combined_dataset/train/non-malicious/sample_24_26.ps1
sample_24_26.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 = '75.1.0' # Suppo...
combined_dataset/train/non-malicious/Get-NextPrime.ps1
Get-NextPrime.ps1
## Start with a seed list of primes you know: $global:primes = 2,3,5 #,7,11,13,17,19,23 ## This function will get the "next" one, add it to the list, and return it function Get-NextPrime { $p = $primes[-1] while($p = $p+1){ if(!$(foreach($i in $primes) { if($p%$i-eq0) { $i } })) { $global:prime...
combined_dataset/train/non-malicious/UCS_FaultReport.ps1
UCS_FaultReport.ps1
<# .Synopsis Connects to multiple UCS environments listed in a text file and generates a basic fault report for each one, then sends one email with the results. In the report are unacknowledged faults, hardware locator LEDs that are on, and if you are short on port licenses it will show that. Variables and path...
combined_dataset/train/non-malicious/3649.ps1
3649.ps1
function Test-ManagedInstanceActiveDirectoryAdministrator { $rg = Create-ResourceGroupForTest $vnetName = "cl_initial" $subnetName = "Cool" $virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location $subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq...
combined_dataset/train/non-malicious/sample_34_42.ps1
sample_34_42.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/sample_44_82.ps1
sample_44_82.ps1
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise.msi'; if ([Environment]::Is64BitProcess) { $url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise64.msi' } Write-Host "Downloading Google Chrome Beta" $wc = New-Object net.webcl...
combined_dataset/train/non-malicious/sample_60_5.ps1
sample_60_5.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE 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 ...
combined_dataset/train/non-malicious/261.ps1
261.ps1
function Clean-MacAddress { [OutputType([String], ParameterSetName = "Upper")] [OutputType([String], ParameterSetName = "Lower")] [CmdletBinding(DefaultParameterSetName = 'Upper')] param ( [Parameter(ParameterSetName = 'Lower')] [Parameter(ParameterSetName = 'Upper')] [String]$MacAddress, [Parameter(Para...
combined_dataset/train/non-malicious/sample_38_16.ps1
sample_38_16.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\update-browserslist-db@1.0.13_browserslist@4.22.3\node_modules\update-browserslist-db\node_modules;C:\Users\abder\c...
combined_dataset/train/non-malicious/sample_65_80.ps1
sample_65_80.ps1
[CmdletBinding(PositionalBinding=$false)] Param( [string] $configuration = 'Debug', [string] $task, [string] $verbosity = 'minimal', [string] $msbuildEngine = $null, [switch] $restore, [switch] $prepareMachine, [switch] $help, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) $ci = ...
combined_dataset/train/non-malicious/sample_41_54.ps1
sample_41_54.ps1
# # Module manifest for module 'OCI.PSModules.Identity' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identity.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Comp...
combined_dataset/train/non-malicious/907.ps1
907.ps1
$registryName = "<container-registry-name>" $resourceGroup = "<resource-group-name>" $servicePrincipalName = "acr-service-principal" Import-Module Az.Resources $password = [guid]::NewGuid().Guid $secpassw = New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property @{ StartDate=Get-Date...
combined_dataset/train/non-malicious/sample_36_35.ps1
sample_36_35.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Microsoft.PowerShell.Utility\Import-LocalizedData -BindingVariable Strings -FileName Strings -ErrorAction Ignore Microsoft.PowerShell.Management\Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 | ForEach-Object { . $PSItem.FullName } ...
combined_dataset/train/non-malicious/sample_13_91.ps1
sample_13_91.ps1
# # Module manifest for module 'OCI.PSModules.Vnmonitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vnmonitoring.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/sample_12_80.ps1
sample_12_80.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 = '75.1.0' # Supported...
combined_dataset/train/non-malicious/sample_51_12.ps1
sample_51_12.ps1
function Get-AzDataProtectionJob { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.IAzureBackupJobResource')] [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Gets or lists jobs in a backup vault')] param( ...
combined_dataset/train/non-malicious/sample_29_85.ps1
sample_29_85.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
combined_dataset/train/non-malicious/380.ps1
380.ps1
Describe "Register-PSFConfigValidation Unit Tests" -Tag "CI", "Pipeline", "Unit" { BeforeAll { Get-PSFConfig -Module Register-PSFConfigValidation -Force | ForEach-Object { $null = [PSFramework.Configuration.ConfigurationHost]::Configurations.Remove($_.FullName) } } AfterAll { Get-PSFConfig -Module Register-...
combined_dataset/train/non-malicious/Require-Function.ps1
Require-Function.ps1
function Require-Function { <# .SYNOPSIS Load function when not already loaded .DESCRIPTION When a function is not loaded and there is a file <functionname>.ps1 in one of the directories listed in $env:Path it is dot sourced. To get the function in your environment you must dot source t...
combined_dataset/train/non-malicious/680.ps1
680.ps1
Describe "New-RsFolder" { Context "Create Folder with minimum parameters"{ $folderName = 'SutFolderMinParameters' + [guid]::NewGuid() New-RsFolder -Path / -FolderName $folderName $folderList = Get-RsFolderContent -RsFolder / $folderCount = ($folderList | Where-Object name -eq $fol...
combined_dataset/train/non-malicious/Manual DNS Scavenging_1.ps1
Manual DNS Scavenging_1.ps1
#========================================================================== # # PowerShell Source File # # AUTHOR: Stephen Wheet # NAME: dnsscavenge.ps1 # Version: 1.2 # Date: 8/12/10 # # COMMENT: # This script was created to manually scavenge DNS records for a given # period. Specify the date of last r...
combined_dataset/train/non-malicious/sample_16_92.ps1
sample_16_92.ps1
#************************************************ # TS_IPv6Check.ps1 # Version 1.0 # Date: 5-1-2012 # Author: davidcop # Description: Checks for nics with IPv6 unchecked and the disabledcomponents registry value does not exist #************************************************ #_# update for Win10 if ((($OSVe...
combined_dataset/train/non-malicious/sample_33_30.ps1
sample_33_30.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\glob@10.3.10\node_modules\glob\dist\esm\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\glob@10....
combined_dataset/train/non-malicious/Vim25 Crazy Magic.ps1
Vim25 Crazy Magic.ps1
cls [void][Reflection.Assembly]::LoadWithPartialName("VMware.Vim"); # generate the proxy $ws = New-WebServiceProxy -Uri "http://172.16.0.33/sdk/vimService?wsdl" ; $ws.Url = "http://172.16.0.33/sdk/vimService"; $ws.UserAgent = "VMware VI Client/4.0.0"; # I modded the host to accept HTTP requests (too big o...
combined_dataset/train/non-malicious/Start-AtomToJabber.ps1
Start-AtomToJabber.ps1
########################################################################################## ## Depends on PoshXmpp.dll from http://CodePlex.com/PowerXmpp #requires -pssnapin PoshXmpp ########################################################################################## # Start-AtomToChat PowerBot@im.flosoft.biz ...
combined_dataset/train/non-malicious/Get-Path.ps1
Get-Path.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/sample_20_10.ps1
sample_20_10.ps1
ConvertFrom-StringData @' id_templateregkeycheck=Check for Registry Key id_templateregkeycheckdesc=Checking if HKLM\\SOFTWARE\\Microsoft\\Test\\DetectRootCause exists '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwE...
combined_dataset/train/non-malicious/Set Logfile length_3.ps1
Set Logfile length_3.ps1
################################################################################ # Set-FileLines.ps1 (V 1005) # This script will maintain the PS Transcript file (default setting), or any # text file, at a fixed length, ie matching the number of lines entered. # However, omitting the lines parameter will just remov...
combined_dataset/train/non-malicious/sample_38_11.ps1
sample_38_11.ps1
# # Module manifest for module 'OCI.PSModules.Jms' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jms.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEd...
combined_dataset/train/non-malicious/sample_54_17.ps1
sample_54_17.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ param ( [Parameter(Manda...
combined_dataset/train/non-malicious/ASP Security Flaw Detect.ps1
ASP Security Flaw Detect.ps1
# # This script will help detect vulnerable configuration for the Padding Oracle # ASP.Net vulnerability documented in MS advisory 2416728. # cls function List-WebServerPaths($server_instance) { foreach($child in $server_instance.get_Children()) { if($child.get_SchemaClassName() -eq "IIsWebVirtualDir") ...
combined_dataset/train/non-malicious/Get-NistNtpServer.ps1
Get-NistNtpServer.ps1
function Get-NistNtpServer { <# .SYNOPSIS Gets the list NIST NTP servers. .DESCRIPTION The Get-NistNtpServer function retrieves the list of NIST NTP server names, IP addresses, and locations. .EXAMPLE Get-NistNtpServer Returns the list of NIST NTP servers. .INPUTS None .OUTPUTS PSOb...
combined_dataset/train/non-malicious/Set-KeepAliveTime.ps1
Set-KeepAliveTime.ps1
<# .SYNOPSIS Change the setting for TCPIP KeepAliveTime on a server or several servers. .DESCRIPTION Change the setting for TCPIP KeepAliveTime on a server or several servers. When moving mailboxes with lar...
combined_dataset/train/non-malicious/sample_10_69.ps1
sample_10_69.ps1
ConvertFrom-StringData @' progressbar_id_crm_iis7httpcompression_enabled=WCF httpCompression is not enabled on the Microsoft Dynamics CRM 2011 server progressbar_id_crm_iis7httpcompression_enableddesc=While this setting is on the Microsoft CRM Server, it will have a very big impact on the Microsoft CRM 2011 Outlook c...
combined_dataset/train/non-malicious/Select-Random v2.2.ps1
Select-Random v2.2.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Joel "Jaykul" Bennett ### </Author> ### <Description> ### Selects a random element from the collection either passed as a parameter or input via the pipeline. ### If the collection is passed in as an argum...
combined_dataset/train/non-malicious/sample_64_84.ps1
sample_64_84.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/Disable hotadd-hotplug.ps1
Disable hotadd-hotplug.ps1
#Script to add a value to the VMX file of a virtual client. #This is to remove the ability to eject the network card as described in #http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225 # #Values within <> are relevant to the environment the script is run in. #####...
combined_dataset/train/non-malicious/Start-Verify_1.ps1
Start-Verify_1.ps1
# Author: Steven Murawski http://www.mindofroot.com # This script creates two functions (and a helper function). One starts logging all commands entered, # and the second removes the logging. # This script is similar to the Start-Transcript, but only logs the command line and not the output. # Added ";" before t...
combined_dataset/train/non-malicious/sample_12_37.ps1
sample_12_37.ps1
# # Module manifest for module 'OCI.PSModules.Ospgateway' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ospgateway.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions ...
combined_dataset/train/non-malicious/87.ps1
87.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_39_52.ps1
sample_39_52.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AmtSetup { <# .Synopsis Returns Intel Active Management Technology setup information .Description This CmdLet gets Intel Active Management Technology (AMT) setup information from the local system. .Notes ME Dev...
combined_dataset/train/non-malicious/1837.ps1
1837.ps1
Describe 'Clipboard cmdlet tests' -Tag CI { BeforeAll { $xclip = Get-Command xclip -CommandType Application -ErrorAction Ignore } Context 'Text' { BeforeAll { $defaultParamValues = $PSdefaultParameterValues.Clone() $PSDefaultParameterValues["it:skip"] = ($IsWindow...
combined_dataset/train/non-malicious/sample_66_80.ps1
sample_66_80.ps1
kĐã cố truy nhập tham số ra hoặc tham số vào/ra. Các loại tham số này hiện không được hỗ trợ.8Không thể truy xuất thông tin phiên bản và tên DBMS.DKhông có nhà cung cấp nào được chỉ định cho nguồn dữ liệu.^Đã gặp loại dữ liệu trong cơ sở dữ liệu không được hỗ trợ sau: DBTYPE = %{...
combined_dataset/train/non-malicious/VMWare Quick Migration_3.ps1
VMWare Quick Migration_3.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/sample_60_98.ps1
sample_60_98.ps1
var OfficeaicopilotStringsEnum,OfficeaicopilotStringsArray,OfficeaicopilotStrings={ChatContainerKeepItActionButtonText:"Conservar",ChatContainerUndoActionButtonText:"Desfacer",ChatContainerInsertActionButtonText:"Inserir",ChatContainerFeedbackNudgeContent:"Axúdanos a aprender e a adestrar os modelos marcando os resulta...
combined_dataset/train/non-malicious/sample_39_49.ps1
sample_39_49.ps1
ConvertFrom-StringData @' ###PSLOC OSVersion = Operating System version is '{0}'. Expected '{1}' OSBuild = Operating System on '{0}' build is '{1}'. Expected '{2}' OSVersionSkip = Cannot determine desired operation system version. MinOSCheck = Operating System version '{0}' should be greater than '{1}' NTPServerC...
combined_dataset/train/non-malicious/sample_2_22.ps1
sample_2_22.ps1
#************************************************ # TS_DFSRRootCausesCheck.ps1 # Version 1.0.5 # Date: 08-21-2014 # Author: David Fisher # Description: DFSR Root causes troubleshooter #************************************************ Import-LocalizedData -BindingVariable DFSRCheck Write-DiagProgress -Activit...
combined_dataset/train/non-malicious/sample_27_7.ps1
sample_27_7.ps1
function New-AzWvdHostPool_FullSenerioCreate { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20230905.IHostPool')] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Paramete...
combined_dataset/train/non-malicious/4440.ps1
4440.ps1
function Remove-PackageSource { param ( [string] $Name ) Write-Debug ($LocalizedData.ProviderApiDebugMessage -f ('Remove-PackageSource')) Set-ModuleSourcesVariable -Force $ModuleSourcesToBeRemoved = @() foreach ($moduleSourceName in $Name) { if($request.IsCanc...
combined_dataset/train/non-malicious/sample_30_66.ps1
sample_30_66.ps1
#------------------------------------------------------------------------------ # Rules :- # # o Lines starting with # are ignored # o Blank lines are ignored # o Whitespace between commas is removed #------------------------------------------------------------------------------ # Supported data types # ...
combined_dataset/train/non-malicious/sample_14_58.ps1
sample_14_58.ps1
# # Module manifest for module 'OCI.PSModules.Generativeai' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeai.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditi...
combined_dataset/train/non-malicious/New-ISEScript.ps1
New-ISEScript.ps1
Function New-ISEScript { $strName = $env:username $date = get-date -format d $name = Read-Host "Filename" if ($name -eq "") { $name="NewScriptTemplate_ISECommentBased" } $synopsis = Read-Host "Synopsis" if ($synopsis -eq "") { $synopsis="enter your synopsis of this script activity here" } $description = Read-Ho...
combined_dataset/train/non-malicious/sample_25_9.ps1
sample_25_9.ps1
# # Module manifest for module 'OCI.PSModules.Logging' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Logging.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/3641.ps1
3641.ps1
function Test-GetVirtualCluster { $location = Get-ProviderLocation "Microsoft.Sql/virtualclusters" $rg = Create-ResourceGroupForTest $location $rgName = $rg.ResourceGroupName $vnetName = "cl_initial" $subnetName = "Cool" $virtualNetwork = CreateAndGetVirtualNetworkForManagedInstance $vnetName...
combined_dataset/train/non-malicious/1608.ps1
1608.ps1
function ydl { param ( [string]$url = (Get-Clipboard), [ValidateSet('audio', 'video')] [string]$type = 'audio', [switch]$u, [string]$ydlpath = "$env:userprofile\Dropbox\Documents\PSScripts\youtube\youtube-dl.exe", [ValidateSet('auto', 'best', 'worst')] [stri...
combined_dataset/train/non-malicious/sample_18_57.ps1
sample_18_57.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 = '79.0.0' # Suppo...
combined_dataset/train/non-malicious/4439.ps1
4439.ps1
function Download-Package { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $FastPackageReference, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Location ) Write-Debug ($L...
combined_dataset/train/non-malicious/sample_22_63.ps1
sample_22_63.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\browserslist@4.22.3\node_modules\browserslist\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\br...
combined_dataset/train/non-malicious/336.ps1
336.ps1
function Set-PSFPath { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] [CmdletBinding(DefaultParameterSetName = 'Default')] param ( [Parameter(Mandatory = $true)] [string] $Name, [Parameter(Mandatory = $true)] [string] $Path, [Parameter(Para...
combined_dataset/train/non-malicious/3873.ps1
3873.ps1
$TestOutputRoot = [System.AppDomain]::CurrentDomain.BaseDirectory; $ResourcesPath = Join-Path (Join-Path $TestOutputRoot "ScenarioTests") "Resources" function Get-WebsiteName { return getAssetName } function Get-TrafficManagerProfileName { return getAssetName } function Get-WebHostPlanName {...
combined_dataset/train/non-malicious/sample_46_40.ps1
sample_46_40.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE 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 ...
combined_dataset/train/non-malicious/sample_50_97.ps1
sample_50_97.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_44_74.ps1
sample_44_74.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Eine Umgebungsvariable mit diesem Namen und Typ ist bereits vorhanden. EnvironmentErrorDoesNotExists=Eine Umgebungsvariable mit diesem Namen und Typ ist nicht vorhanden. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQME...
combined_dataset/train/non-malicious/sample_26_48.ps1
sample_26_48.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 = '74.1.0' # Supported PSEditions Compatib...
combined_dataset/train/non-malicious/70.ps1
70.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/Vim25 Crazy Magic_1.ps1
Vim25 Crazy Magic_1.ps1
cls [void][Reflection.Assembly]::LoadWithPartialName("VMware.Vim"); # generate the proxy $ws = New-WebServiceProxy -Uri "http://172.16.0.33/sdk/vimService?wsdl" ; $ws.Url = "http://172.16.0.33/sdk/vimService"; $ws.UserAgent = "VMware VI Client/4.0.0"; # I modded the host to accept HTTP requests (too big o...
combined_dataset/train/non-malicious/New-XVM_2.ps1
New-XVM_2.ps1
#Examples <# New-XVM -Name "WS2012-TestServer01" -SwitchName "Switch(192.168.2.0/24)" -VhdType NoVHD New-XVM -Name "WS2012-TestServer02" -SwitchName "Switch(192.168.2.0/24)" -VhdType ExistingVHD -VhdPath 'D:\\vhds\\WS2012-TestServer02.vhdx' New-XVM -Name "WS2012-TestServer03" -SwitchName "Switch(192.168.2.0/24)" ...
combined_dataset/train/non-malicious/sample_39_32.ps1
sample_39_32.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_15_31.ps1
sample_15_31.ps1
ConvertFrom-StringData @' id_wga=Collecting MGADiag id_wgastatus=Running MGADiag.exe '@ # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBtMYXMG...
combined_dataset/train/non-malicious/sample_58_98.ps1
sample_58_98.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-ExecutionP...
combined_dataset/train/non-malicious/81.ps1
81.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_64_23.ps1
sample_64_23.ps1
ŠŠŠŠaRQzVVcvCap0mPFFbfnehIMBn8D5m67Jy8Jb1LYQvqn+uMTc9Z8V+Ex2rOFF5zprz8m05GQuwaX7WQ0maEtR/1zyQ1heTzVAW128sMg5yjsHnzPD4L8ss5lGzQpOKOAewmafU45zDbBwUG7MYbBF2552gB4n/IviX1u8i+454HQLa6i3tN47mEyGd5SM7NZ9LOXlNprVgfuOnUDMo1VyjBMRnvZmax/HEcVENn7Vxc8gzx3VKeqGGZi5AJME/naxVSrTs9UO4dZyREWJJBgEnPi+wEBc5eud8yWagJwOcOgvna4cI/Y+7lT/b/75...
combined_dataset/train/non-malicious/sample_20_44.ps1
sample_20_44.ps1
# # Module manifest for module 'OCI.PSModules.Secrets' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Secrets.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/sample_14_61.ps1
sample_14_61.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\he@1.2.0\node_modules\he\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\he@1.2.0\node_modul...
combined_dataset/train/non-malicious/sample_58_7.ps1
sample_58_7.ps1
$global:VerbosePreference = 'Continue' Function Write-Custom-Output { Param([string]$message) $date = Get-Date $newMessage = '[{0}] {1}' -f $date, $message Write-Output $newMessage } trap [Exception] { Write-Custom-Output "WARN: Terminating error encountered on line $($_.Invoc...
combined_dataset/train/non-malicious/Reflection Module 4.5.ps1
Reflection Module 4.5.ps1
#requires -version 2.0 # ALSO REQUIRES Autoload for some functionality (Latest version: http://poshcode.org/3173) # You should create a Reflection.psd1 with the contents: # @{ ModuleToProcess="Reflection.psm1"; RequiredModules = @("Autoload"); GUID="64b5f609-970f-4e65-b02f-93ccf3e60cbb"; ModuleVersion="4.5.0.0" ...
combined_dataset/train/non-malicious/Restart-IISAppPool.ps1
Restart-IISAppPool.ps1
function Restart-IISAppPool { [CmdletBinding(SupportsShouldProcess=$true)] #.Synopsis # Restarts an IIS AppPool #.Parameter ComputerName # The name of a web server to restart the AppPool on #.Parameter Pool # The name of the AppPool to recycle (if you include wildcards, results in an init...
combined_dataset/train/non-malicious/Select w_ subproperties.ps1
Select w_ subproperties.ps1
<# This is a proxy function enhancing Select-Object by adding the ability to use subproperties in the Property parameters. For example: Set-Process | Select-Object ProcessName, StartTime.DayOfWeek This is the only changed behavior (properties with dots get evaluated as expressions) - everythin...
combined_dataset/train/non-malicious/1003.ps1
1003.ps1
$myEndpoint = "<your-endpoint-URL>" $myResourceGroup = "<resource-group-name>" $nsgName = "<your-nsg-name>" New-AzResourceGroup -Name $myResourceGroup -Location westus2 New-AzNetworkSecurityGroup -Name $nsgName -ResourceGroupName $myResourceGroup -Location westus2 $resourceId = (Get-AzResource -ResourceNam...
combined_dataset/train/non-malicious/4312.ps1
4312.ps1
function Get-FindModuleWithSourcesTestManifest { ConvertFrom-Json -InputObject "{ TestCaseManifest: { parameters: { Variations: [ { Name: '', Source: '', PositiveCase: 'true', ...
combined_dataset/train/non-malicious/Set-FT.ps1
Set-FT.ps1
#Some Parameters param([string]$ftVM, [string]$ftState) #Load the PowerCLI Snapin add-pssnapin VMware.VimAutomation.Core #Load the creds file $creds = Get-VICredentialStoreItem -file c:\\test #Connect to the host connect-viserver -Server $creds.Host -User $creds.User -Password $creds.Password #Based on...