full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/3220.ps1 | 3220.ps1 |
InModuleScope PoshBot {
describe 'Get-PoshBotStatefulData' {
BeforeAll {
$PSDefaultParameterValues = @{
'Get-PoshBotStatefulData:Verbose' = $false
}
$global:PoshBotContext = [pscustomobject]@{
Plugin = 'TestPl... |
combined_dataset/train/non-malicious/sample_51_53.ps1 | sample_51_53.ps1 | ConvertFrom-StringData @'
EnvironmentErrorAlreadyExists=Variabel lingkungan nama dan tipe ini sudah ada.
EnvironmentErrorDoesNotExists=Variabel lingkungan nama dan tipe ini tidak ada.
'@
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBg... |
combined_dataset/train/non-malicious/sample_29_27.ps1 | sample_29_27.ps1 | #
# Module manifest for module 'OCI.PSModules.Dns'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dns.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/Get-FileHash.ps1 | Get-FileHash.ps1 | ##############################################################################\n##\n## Get-FileHash\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\nGet the has... |
combined_dataset/train/non-malicious/sample_42_8.ps1 | sample_42_8.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/Findup_11.ps1 | Findup_11.ps1 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using System.IO;
namespace Findup
{
public class FileInfoExt
{
public FileInfoExt(FileInfo fi)
... |
combined_dataset/train/non-malicious/sample_35_28.ps1 | sample_35_28.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/Get-ProcAddress.ps1 | Get-ProcAddress.ps1 | function Get-ProcAddress {
<#
.Synopsis
Returns the address of the desired Windows API function.
.Description
The Get-ProcAddress function returns the address of the desired Windows API
function. The technique used to get the address does not rely upon P/Invoke or
compiling C# code. GetProcAddress can be acces... |
combined_dataset/train/non-malicious/Set Logfile length_5.ps1 | Set Logfile length_5.ps1 | <#
.SYNOPSIS
Set any text file to a fixed number of lines. Use 'Get-Help .\\SetFileLines
-full' to view Help for this file.
.DESCRIPTION
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 p... |
combined_dataset/train/non-malicious/sample_27_99.ps1 | sample_27_99.ps1 | # region Generated
# ----------------------------------------------------------------------------------
# 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 obt... |
combined_dataset/train/non-malicious/1736.ps1 | 1736.ps1 |
Describe "Failing test used to test CI Scripts" -Tags 'CI' {
It "Should fail" {
1 | should be 2
}
}
|
combined_dataset/train/non-malicious/Powershell iTunes_1.ps1 | Powershell iTunes_1.ps1 | #
#*****************************************************************
#
# Powershell iTunes v1 $Rev: 754 $
# (c) 2004-2010 Thomas Maurer. All rights reserved.
# created by Thomas Maurer
#
# http://www.thomasmaurer.ch
# http://www.thomasmaurer.ch/projects
#
# last Update by $Author: tmaurer $ on $Date: 2010-11... |
combined_dataset/train/non-malicious/2564.ps1 | 2564.ps1 |
param
(
[string]$serverInstance = "(local)",
[string]$tempDir = "C:\Dexma\TEMP\",
[switch]$verbose,
[switch]$debug
)
function main()
{
if ($verbose) {$VerbosePreference = "Continue"}
if ($debug) {$DebugPreference = "Continue"}
Get-MSSQL-ServerAttrib-Html $serverInstance $tempDir
}
function G... |
combined_dataset/train/non-malicious/sample_1_91.ps1 | sample_1_91.ps1 | # *********************************************************************
# Version 1.0
# Date: 03-27-2012, 2021
# Author: Vinay Pamnani - vinpa@microsoft.com
# Description:
# Gets SMS, CCM and WSUS Registry Keys
# Uses Export-RegKey function (defined in utils_Shared.ps1)
# replaced _RegistryKey_ with _Reg_
# *... |
combined_dataset/train/non-malicious/Deploy Folder .ps1 | Deploy Folder .ps1 | Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue #This is needed to pull computers from AD
Clear-Host
$Skipped = @() #Create Array for Skipped Computers
$Finished = @() #Create Array for Finished Computers
$Offline = @() #Create Array for Offline Computers
$Computers = Get-QADComputer -Sea... |
combined_dataset/train/non-malicious/sample_15_48.ps1 | sample_15_48.ps1 | function trySetDesignerProp(tname, ttype, val) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0);
trait.value = val;
}
if (command.getTrait("state").value == 0) {
command.getTrait("state").value = 2;
trySetDesignerProp("exportAsText", "bool", true);
}
else {
command.g... |
combined_dataset/train/non-malicious/1602.ps1 | 1602.ps1 |
function Get-SKU {
param (
[object]$comps = $env:COMPUTERNAME
)
foreach ($computer in $comps) {
try {
[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$computer).OpenSubKey('HARDWARE\DESCRIPTION\System\BIOS').GetValue('SystemSku')... |
combined_dataset/train/non-malicious/sample_45_13.ps1 | sample_45_13.ps1 | #
# Module manifest for module 'OCI.PSModules.Osmanagementhub'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osmanagementhub.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported P... |
combined_dataset/train/non-malicious/954.ps1 | 954.ps1 |
$uniqueId=$(-join ((97..122) + (48..57) | Get-Random -Count 15 | % {[char]$_}))
$apiVersion = "2015-04-08"
$location = "West US 2"
$resourceGroupName = "myResourceGroup"
$accountName = "mycosmosaccount-$uniqueId"
$resourceType = "Microsoft.DocumentDb/databaseAccounts"
$keyKind = @{ "keyKind"="Primary" }
$locatio... |
combined_dataset/train/non-malicious/TabExpansion for V2CTP_7.ps1 | TabExpansion for V2CTP_7.ps1 | ## Tab-Completion
#################
## For V2CTP3.
## This won't work on V1 and V2CTP and V2CTP2.
## Please dot souce this script file.
## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list.
##
## What this can do is:
##
## [datetime]::n<tab>
## [datetime]::now.d... |
combined_dataset/train/non-malicious/sample_57_17.ps1 | sample_57_17.ps1 | #
# Module manifest for module 'OCI.PSModules.Audit'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Audit.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEditions
Compatible... |
combined_dataset/train/non-malicious/Invoke-Generic_2.ps1 | Invoke-Generic_2.ps1 | function Invoke-Generic {
#.Synopsis
# Invoke Generic method definitions via reflection:
[CmdletBinding()]
param(
[Parameter(Position=0,Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[Alias('On')]
$InputObject
,
[Parameter(Position=1,ValueFromPipelineByPropertyName=$true)]
[Alias('Na... |
combined_dataset/train/non-malicious/4330.ps1 | 4330.ps1 | function Get-EnvironmentVariable
{
param
(
[parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[parameter(Mandatory = $true)]
[int]
$Target
)
if ($Target -eq $script:EnvironmentVariableTarget.Process)
{
return [S... |
combined_dataset/train/non-malicious/3227.ps1 | 3227.ps1 | Set-StrictMode -Version latest
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'MetaFixers.psm1') -Verbose:$false -Force
$projectRoot = $ENV:BHProjectPath
if(-not $projectRoot) {
$projectRoot = $PSScriptRoot
}
Describe 'Text files formatting' {
$allTextFiles = Get-TextFilesList $projectRoot
... |
combined_dataset/train/non-malicious/New-StoredProcFunction_1.ps1 | New-StoredProcFunction_1.ps1 | # New-StoredProcFunction.ps1
# Steven Murawski
# http://blog.usepowershell.com
# 04/08/2009
# Example: ./New-StoredProcFunction.ps1 'DataSource=MySqlServer;Database=Northwind;User=AnythingButSa;Password=abc123' sp_createnewcustomer
# Example 'sp_createnewcustomer | ./New-StoredProcFunction.ps1 'DataSource=MySqlS... |
combined_dataset/train/non-malicious/1123.ps1 | 1123.ps1 |
param(
[Parameter(Mandatory=$true)]
[string]
$ProtectedString
)
Set-StrictMode -Version 'Latest'
Add-Type -AssemblyName 'System.Security'
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\..\Carbon\Carbon.psd1' -Resolve)
Unprotect-CString -ProtectedString $ProtectedStrin... |
combined_dataset/train/non-malicious/sample_35_95.ps1 | sample_35_95.ps1 | #
# Module manifest for module 'OCI.PSModules.Governancerulescontrolplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Governancerulescontrolplane.dll'
# Version number of this module.
ModuleVersion =... |
combined_dataset/train/non-malicious/New-Shortcut_1.ps1 | New-Shortcut_1.ps1 | #requires -version 2.0
function New-Shortcut {
<#
.SYNOPSIS
Creates a new shortcut (.lnk file) pointing at the specified file.
.DESCRIPTION
The New-Shortcut script creates a shortcut pointing at the target in the location you specify. You may specify the location as a folder path (which must exist), with a n... |
combined_dataset/train/non-malicious/set-localpwd.ps1 | set-localpwd.ps1 | # Sets local account passwords on one or more computers
# usage [computerName1,computerName2,... | ] ./set-localpwd.ps1 [-user] <userName> [-password] <password> [[-computers] computerName1,computerName2,...]
param(
[string] $User
, [string] $Password
, [string[]] $ComputerNames = @()
)
$ComputerNames ... |
combined_dataset/train/non-malicious/convert CSV_s to Excel.ps1 | convert CSV_s to Excel.ps1 | Function Release-Ref ($ref)
{
([System.Runtime.InteropServices.Marshal]::ReleaseComObject(
[System.__ComObject]$ref) -gt 0)
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()
}
Function ConvertCSV-ToExcel
{
<#
.SYNOPSIS
Converts one or more C... |
combined_dataset/train/non-malicious/1513.ps1 | 1513.ps1 |
function Assert-LastProcessFailed
{
[CmdletBinding()]
param(
[Parameter(Position=0)]
[string]
$Message
)
Set-StrictMode -Version 'Latest'
if( $LastExitCode -eq 0 )
{
Fail "Expected process to fail, but it succeeded (exit code: $LastEx... |
combined_dataset/train/non-malicious/4165.ps1 | 4165.ps1 |
Set-Variable -Name Errors -Value $null -Scope Global -Force
Set-Variable -Name RelativePath -Scope Global -Force
Set-Variable -Name Title -Scope Global -Force
Function ConsoleTitle ($Title){
$host.ui.RawUI.WindowTitle = $Title
}
Function DeclareGlobalVariables {
$Global:Title = "Windows Management Framework 4.0"... |
combined_dataset/train/non-malicious/sample_59_27.ps1 | sample_59_27.ps1 | [CmdletBinding()]
param (
[string]$OutFile,
[string]$AltDownload,
[string]$Proxy,
[string]$AltHisEndpoint
)
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$refVersion = [version] '4.5'
$provider = 'Microsoft.HybridCompute'
# Error codes used by azcmagent are in r... |
combined_dataset/train/non-malicious/finddupe_14.ps1 | finddupe_14.ps1 | # new version avoids recalculating MD5s, has delete/noprompt options, and by default checks the current directory.
function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvide... |
combined_dataset/train/non-malicious/Hack ESXi_5.ps1 | Hack ESXi_5.ps1 | $screen = " You see here a virtual switch. ------------ ------
#...........| |....|
--------------- ###------------ |...(|
|..%...........|########## ###-@...|
... |
combined_dataset/train/non-malicious/9cae4b8c-e40a-43f0-8dea-dd78acab16c3.ps1 | 9cae4b8c-e40a-43f0-8dea-dd78acab16c3.ps1 | [reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint") | out-null
[reflection.assembly]::LoadWithPartialName("Microsoft.Office.Server") | out-null
[reflection.assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") | out-null
@@#NOTE: I've set strict crawl freshness/crawl duration/success rati... |
combined_dataset/train/non-malicious/sample_29_83.ps1 | sample_29_83.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/224.ps1 | 224.ps1 | function Get-HelpMessage
{
[CmdletBinding()]
[Alias('HelpMsg')]
PARAM($Id)
[ComponentModel.Win32Exception] $id
} |
combined_dataset/train/non-malicious/sample_64_55.ps1 | sample_64_55.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/3117.ps1 | 3117.ps1 |
function Remove-TrustedHost
{
[CmdletBinding(DefaultParameterSetName='TrustedHost', SupportsShouldProcess=$true, ConfirmImpact="High")]
param(
[Parameter(
ParameterSetName='TrustedHost',
Position=0,
Mandatory=$true)]
[String[]]$TrustedHost,
... |
combined_dataset/train/non-malicious/Search-AD.ps1 | Search-AD.ps1 |
# add enumerations and types required for functions
Add-Type @'
using System;
namespace redtoo {
namespace AD {
public enum Provider : int {
LDAP,
GC,
}
}
public class ADsPathPart {
public string Provider;
public string Server;
... |
combined_dataset/train/non-malicious/Set-WebConfig_2.ps1 | Set-WebConfig_2.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/1447.ps1 | 1447.ps1 |
function Test-CIisAppPool
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$Name
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$appPool = Get-CIisAppPool -Name $Name
... |
combined_dataset/train/non-malicious/1174.ps1 | 1174.ps1 |
Set-StrictMode -Version 'Latest'
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve)
$mof1Path = $null
$mof2Path = $null
$notAMofPath = $null
$mof3Path = $null
$tempDir = $null
$mof = $null
$clearedMof = @'
/*
@TargetNode='********'
*/
/* ...snip... */
instance of ... |
combined_dataset/train/non-malicious/sample_38_66.ps1 | sample_38_66.ps1 | #
# Module manifest for module 'OCI.PSModules.Fleetsoftwareupdate'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Fleetsoftwareupdate.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Sup... |
combined_dataset/train/non-malicious/sample_63_24.ps1 | sample_63_24.ps1 | #
# Module manifest for module 'OCI.PSModules.Datalabelingservice'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datalabelingservice.dll'
# Version number of this module.
ModuleVersion = '84.0.0'
# Sup... |
combined_dataset/train/non-malicious/sample_52_56.ps1 | sample_52_56.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\mockjs@1.1.0\node_modules\mockjs\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\mockjs@1.1.... |
combined_dataset/train/non-malicious/Set-WindowTransparent.ps1 | Set-WindowTransparent.ps1 | ## Set-WindowTransparent.ps1
##
##
Add-Type -Type @"
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace TE
{
public static class Win32Methods
{
internal const int GWL_EXSTYLE = -20;
internal const int WS_EX_LAYERED = 0x80000;
internal const int LWA_ALPHA... |
combined_dataset/train/non-malicious/sample_32_66.ps1 | sample_32_66.ps1 | Windows 7/Windows Server 2008 R2Valitse aloituspainike ja sen jðlkeen Ohjauspaneeli > Nðytð laitteet ja tulostimet kohdasta Laitteisto jaððnet ja napsauta sitten Lisðð tulostin.Windows Vista/Windows Server 2008Valitse aloituspainike ja sen jðlkeen Ohjauspaneeli > Tulostimet kohdasta Laitteisto ja ððnet ja napsautasit... |
combined_dataset/train/non-malicious/2818.ps1 | 2818.ps1 |
if (Get-Command logparser.exe) {
$lpquery = @"
SELECT
COUNT(ImagePath, LaunchString, Publisher) as ct,
ImagePath,
LaunchString,
Publisher
FROM
*autorunsc.tsv
WHERE
(ImagePath not like 'File not found%')
GROUP BY
ImagePath,
LaunchStri... |
combined_dataset/train/non-malicious/sample_14_59.ps1 | sample_14_59.ps1 | #************************************************
# TS_ClusterValidationTests.ps1
# Version 1.0.1
# Date: 07-24-2009
# Author: Andre Teixeira - andret@microsoft.com
# Hacked by Jacques Boulet - jaboulet@microsoft.com - 2019-02-21
# Description: This script is used to obtain cluster validation report.
# ... |
combined_dataset/train/non-malicious/CreateVDS_2.ps1 | CreateVDS_2.ps1 | function CreateVDS(
$vdsName, $datacenter, $vmHost, $physicalNic, $portGroupType = "earlyBinding", `
[array]$portGroupNameList = @(),[array]$uplinkList = @() ) {
# ------- Create vDS ------- #
$vdsCreateSpec = New-Object VMware.Vim.DVSCreateSpec
$vdsCreateSpec.configSpec = New-Object VMware.V... |
combined_dataset/train/non-malicious/4243.ps1 | 4243.ps1 | function Get-Keystrokes {
[CmdletBinding()] Param (
[Int32]
$PollingInterval = 40,
[Int32]
$RunningTime = 60
)
$scriptblock = @"
function KeyLog {
`$PollingInterval = $PollingInterval
[Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null
try
... |
combined_dataset/train/non-malicious/1489.ps1 | 1489.ps1 |
param(
)
Set-StrictMode -Version 'Latest'
& {
$originalVerbosePreference = $Global:VerbosePreference
$Global:VerbosePreference = [Management.Automation.ActionPreference]::SilentlyContinue
if( (Get-Module -Name 'Blade') )
{
Remove-Module 'Blade'
}
Import-Module -Name (Join-Path -Pat... |
combined_dataset/train/non-malicious/4436.ps1 | 4436.ps1 | function Update-ScriptFileInfo {
[CmdletBinding(PositionalBinding = $false,
DefaultParameterSetName = 'PathParameterSet',
SupportsShouldProcess = $true,
HelpUri = 'https://go.microsoft.com/fwlink/?LinkId=619793')]
Param
(
[Parameter(Mandatory = $true,
Positio... |
combined_dataset/train/non-malicious/241.ps1 | 241.ps1 | function Get-SCSMWorkItemAffectedUser
{
[CmdletBinding(DefaultParameterSetName = 'GUID')]
param
(
[Parameter(ParameterSetName = 'SMObject',
Mandatory = $true,
ValueFromPipeline = $true)]
$SMObject,
[Parameter(ParameterSetName = 'GUID',
... |
combined_dataset/train/non-malicious/sample_16_2.ps1 | sample_16_2.ps1 | #************************************************
# DC_Setup_AppCompat.ps1
# Version 1.0
# Date: 2009-2019
# Author: Walter Eder (waltere@microsoft.com)
# Description: Collects additional AppCompat information.
# Called from: TS_AutoAddCommands_Setup.ps1
#*******************************************************
... |
combined_dataset/train/non-malicious/sample_39_33.ps1 | sample_39_33.ps1 | @{
ModuleVersion = '7.0.1'
GUID = '3859ddf6-1713-4701-adf3-477aeaa06333'
Author="Microsoft Corporation"
CompanyName="Microsoft Corporation"
Copyright="Microsoft® Corporation. All rights reserved."
NestedModules="Newtonsoft.Json.dll"
}
# SIG # Begin signature block
# MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDz... |
combined_dataset/train/non-malicious/sample_11_13.ps1 | sample_11_13.ps1 | Signature-Version: 1.0
SHA-256-Digest-Manifest-Main-Attributes: 6O7HmBCrTSNxX243vN9FnfZPeGnR4
HdagZa0WCFVhWg=
SHA-256-Digest-Manifest: 2Mg/wtAdxyVaqshqUkObkEICHRS1s8WLRtNCmuswMQM=
Created-By: 1.8.0_112 (Oracle Corporation)
Name: com/microsoft/azure/toolkit/lib/appservice/deploy/FlexFunctionDe
ployHandler.html... |
combined_dataset/train/non-malicious/sample_13_23.ps1 | sample_13_23.ps1 | #************************************************
# TS_InfoCacheLevelCheck.ps1
# Version 1.0
# Date: 1-2-2012
# Author: v-anecho
# Description: If you are experiencing slow logons or slow enumeration of shares, the InfoCacheLevel registry value may resolve the issue.
#*********************************************... |
combined_dataset/train/non-malicious/324.ps1 | 324.ps1 | function Write-PSFHostColor
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")]
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Write-PSFHostColor')]
Param (
[Parameter(ValueFromPipeline = $true)]
[string[]]
$String,
[ConsoleColor]
$De... |
combined_dataset/train/non-malicious/get windows product key_6.ps1 | get windows product key_6.ps1 | function get-windowsproductkey([string]$computer)
{
$Reg = [WMIClass] ("\\\\" + $computer + "\\root\\default:StdRegProv")
$values = [byte[]]($reg.getbinaryvalue(2147483650,"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion","DigitalProductId").uvalue)
$lookup = [char[]]("B","C","D","F","G","H","J","K","M","P","Q","R"... |
combined_dataset/train/non-malicious/120.ps1 | 120.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_14_56.ps1 | sample_14_56.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/sample_61_44.ps1 | sample_61_44.ps1 | #
# Script module for module 'Az.CosmosDB' that is executed when 'Az.CosmosDB' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 07/04/2024 08:22:40
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
{
... |
combined_dataset/train/non-malicious/sample_44_26.ps1 | sample_44_26.ps1 | # Localized ArchiveResources.psd1
ConvertFrom-StringData @'
###PSLOC
PathNotFoundError=The path '{0}' either does not exist or is not a valid file system path.
ExpandArchiveInValidDestinationPath=The path '{0}' is not a valid file system directory path.
InvalidZipFileExtensionError={0} is not a supported archive... |
combined_dataset/train/non-malicious/4434.ps1 | 4434.ps1 | function Get-InstalledModule
{
[CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=526863')]
Param
(
[Parameter(ValueFromPipelineByPropertyName=$true,
Position=0)]
[ValidateNotNullOrEmpty()]
[String[]]
$Name,
[Parameter(ValueFromPi... |
combined_dataset/train/non-malicious/sample_22_47.ps1 | sample_22_47.ps1 |
@{
GUID = '90eaa9df-133a-450c-8728-91055cd946a1'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = '© Microsoft Corporation. All rights reserved.'
ModuleVersion = '2.0.0.0'
PowerShellVersion = ... |
combined_dataset/train/non-malicious/sample_66_44.ps1 | sample_66_44.ps1 | @{
GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
FunctionsToExport = @()
CmdletsToExport="Start-Transcript", "Stop-Transcript"
AliasesTo... |
combined_dataset/train/non-malicious/2455.ps1 | 2455.ps1 |
[CmdletBinding()]
param (
[Parameter(Mandatory = $True,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True)]
[string]$Computername,
[Parameter(Mandatory = $True,
ValueFromPipeline = $False,
ValueFromPipelineByPropertyName = $False)]
[string]$FolderPath,
[Parameter(Mandatory... |
combined_dataset/train/non-malicious/sample_58_88.ps1 | sample_58_88.ps1 | #
# Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker'
#
# Generated by: Microsoft Corporation
#
# Generated on: 19/01/2022
#
@{
# Script module or binary module file associated with this manifest.
RootModule = ''
# Version number of this module.
ModuleVersion = '1.2100.26... |
combined_dataset/train/non-malicious/1728.ps1 | 1728.ps1 | function New-ServiceNowQuery {
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions','')]
[CmdletBinding()]
[OutputType([System.String])]
param(
[parameter(mandatory=$false)]
[string]$OrderBy='opened_at',
[p... |
combined_dataset/train/non-malicious/SyntaxHighlighter Brush.ps1 | SyntaxHighlighter Brush.ps1 | //
/**
* PowerShell 2.0 Brush for highlighter 2.0
*
* SyntaxHighlighter http://alexgorbatchev.com/wiki/SyntaxHighlighter
*
* @version
* 2.1.0 (April 07 2009)
*
* @copyright
* Copyright (C) 2008-2009 Joel Bennett http://HuddledMasses.org/
*
* @license
* This file is for SyntaxHighlighter.
... |
combined_dataset/train/non-malicious/sample_66_43.ps1 | sample_66_43.ps1 | param(
# Folder access path for observability drive
[string]
[parameter(Mandatory=$true)]
$AccessPath,
# Name of subfolder config file to read
[string]
[Parameter(Mandatory=$true)]
$SubFolderConfigFileName
)
$observabilityNugetPath = "$PSScriptRoot\..\.."
Import-Module "$o... |
combined_dataset/train/non-malicious/Get-WebSite_4.ps1 | Get-WebSite_4.ps1 | function Get-WebPage {
<#
.SYNOPSIS
Downloads web page from site.
.DESCRIPTION
Downloads web page from site and displays source code or displays total bytes of webpage downloaded
.PARAMETER Url
URL of the website to test access to.
.PARAMETER UseDefaultCredentials
Use the currently authentica... |
combined_dataset/train/non-malicious/PS2WCF_2.ps1 | PS2WCF_2.ps1 | # Call WCF Services With PowerShell V1.0 22.12.2008
#
# by Christian Glessner
# Blog: http://www.iLoveSharePoint.com
# Twitter: http://twitter.com/cglessner
# Codeplex: http://codeplex.com/iLoveSharePoint
#
# requires .NET 3.5
# load WCF assemblies
[void][System.Reflection.Assembly]::LoadWithPartialName("Sy... |
combined_dataset/train/non-malicious/76.ps1 | 76.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_12_9.ps1 | sample_12_9.ps1 | ConvertFrom-StringData @'
id_appxregistrykeys_title=Registry Keys
id_appxregistrykeys_status=Collecting Appx Registry Keys
id_appxfiles_title=Appx Files
id_appxfiles_status=Collecting Appx Files
id_dirlistings_title=Dir Listings
id_dirlistings_status=Collecting Appx Directory Listings
id_appxdatalogs_title=Appx ... |
combined_dataset/train/non-malicious/646.ps1 | 646.ps1 | function Get-TestUser() {
if (-not $env:RsUser) {
throw 'Environment variable RsUser is not defined!'
}
return $env:RsUser
}
Describe "Grant and Revoke Access On RS Catalog Items" {
$user = Get-TestUser
Context "Granting permission on catalog item to test user" {
$catalogItemPath ... |
combined_dataset/train/non-malicious/sample_0_42.ps1 | sample_0_42.ps1 | #************************************************
# TS_DCDiag.ps1
# Version 1.1.1
# Date: 04-11-2011
# Authors : Andre Teixeira/ David Fisher (CSS)/ Craig Landis
# Description: Run DCDiag utility to obtain log files
#************************************************
if($debug -eq $true){[void]$shell.popup("R... |
combined_dataset/train/non-malicious/1827.ps1 | 1827.ps1 |
function Get-RandomString
{
param ( [int]$Length = 8 )
$chars = .{ ([int][char]'a')..([int][char]'z');([int][char]'A')..([int][char]'Z') }
([char[]]($chars | Get-Random -Count $Length)) -join ""
}
function Get-NonExistantProviderName
{
param ( [int]$Length = 8 )
do {
$providerName = Get-R... |
combined_dataset/train/non-malicious/sample_62_70.ps1 | sample_62_70.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 = '88.1.0'
# Supported PSEditi... |
combined_dataset/train/non-malicious/DekiWiki Module 1.0.ps1 | DekiWiki Module 1.0.ps1 | ## DekiWiki Module -note this is a v2 module, but I think you can dot-source in v1 if you remove the last line ;)
####################################################################################################
## The first of many script cmdlets for working with DekiWiki, based on their REST api sdk "Dream"
## ... |
combined_dataset/train/non-malicious/sample_29_30.ps1 | sample_29_30.ps1 | #
# Module manifest for module 'PSScriptAnalyzer'
#
@{
# Author of this module
Author = 'Microsoft Corporation'
# Script module or binary module file associated with this manifest.
RootModule = 'PSScriptAnalyzer.psm1'
# Version number of this module.
ModuleVersion = '1.22.0'
# ID used to uniquely identify this mod... |
combined_dataset/train/non-malicious/sample_37_50.ps1 | sample_37_50.ps1 | 袨斜褗械泻褌 写谢褟 锌芯褌芯泻芯胁芯泄 蟹邪锌懈褋懈 写邪薪薪褘褏 胁 褎芯褉屑邪褌械 JSON.
袟邪锌懈褋褘胁邪械褌 蟹薪邪褔械薪懈褟 褋谢械写褍褞褖懈屑 芯斜褉邪蟹芯屑:
* **袘褍谢械胁芯** 泻邪泻 `true` 懈谢懈 `false`
* **袘邪泄褌褘** 泻邪泻 褋褌褉芯泻褍 胁 褎芯褉屑邪褌械 base64
* **袧械芯锌褉械写械谢械薪芯** 泻邪泻 "null"
* **袛邪褌邪袙褉械屑褟** 胁 褎芯褉屑邪褌械 [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) (`"谐谐谐谐-袦袦-写写'T'效效:屑屑:褋褋.小小小"`).
* 袩褉懈屑械褉: ... |
combined_dataset/train/non-malicious/3761.ps1 | 3761.ps1 |
function Test-CreateIntegrationAccount
{
$resourceGroup = TestSetup-CreateResourceGroup
$integrationAccountName = "IA-" + (getAssetname)
$location = Get-Location "Microsoft.Logic" "integrationAccounts"
$integrationAccountNameBasic = "IA-Basic-" + (getAssetname)
$integrationAccount = New-AzIntegrati... |
combined_dataset/train/non-malicious/sample_21_86.ps1 | sample_21_86.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/1264.ps1 | 1264.ps1 |
function Get-CMsmqMessageQueuePath
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string]
$Name,
[Switch]
$Private
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCm... |
combined_dataset/train/non-malicious/Format-TablePlus.ps1 | Format-TablePlus.ps1 | ## Format-Table with wrapping and string trimming.
function Format-TablePlus() {
[CmdletBinding()]
param(
[Switch]
${AutoSize},
[Switch]
${HideTableHeaders},
[Switch]
${Wrap},
[Parameter(Position=0)]
[System.Object[]]
${Property},
[System.Object]
${GroupBy},
... |
combined_dataset/train/non-malicious/1147.ps1 | 1147.ps1 |
function Start-TestFixture
{
& (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Test-ShouldCreateDisplayNameProperty
{
$storeNameValues = [Enum]::GetValues( [Security.Cryptography.X509Certificates.StoreName] )
Get-Item cert:\*\* | ForEach-Object {
Asser... |
combined_dataset/train/non-malicious/Disable-SSLValidation.ps1 | Disable-SSLValidation.ps1 | function Disable-SSLValidation
{
<#
.SYNOPSIS
Disables SSL certificate validation
.DESCRIPTION
Disable-SSLValidation disables SSL certificate validation by using reflection to implement the System.Net.ICertificatePolicy class.
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
.N... |
combined_dataset/train/non-malicious/195.ps1 | 195.ps1 | function Disable-RemoteDesktop
{
[CmdletBinding(DefaultParameterSetName = 'CimSession',
SupportsShouldProcess = $true)]
PARAM (
[Parameter(
ParameterSetName = "Main",
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True)]
[Alias("CN", "__SERVER", "PSComputerName")]
[... |
combined_dataset/train/non-malicious/3113.ps1 | 3113.ps1 |
function Get-RandomPIN
{
[CmdletBinding(DefaultParameterSetName='NoClipboard')]
param(
[Parameter(
Position=0,
HelpMessage='Length of the PIN (Default=4)')]
[ValidateScript({
if($_ -eq 0)
{
throw "Length of the PIN can not be 0!"
}
else
{
return $true
}
})]
[Int32]$... |
combined_dataset/train/non-malicious/sample_29_3.ps1 | sample_29_3.ps1 | description = 'reactive-streams-tck'
dependencies {
api group: 'org.testng', name: 'testng', version:'7.3.0'
api project(':reactive-streams')
implementation project(':reactive-streams-examples')
}
jar {
bnd ('Bundle-Name': 'reactive-streams-jvm',
'Bundle-Vendor': 'Reactive Streams SIG',
... |
combined_dataset/train/non-malicious/4061.ps1 | 4061.ps1 | Function AddRemovePrograms($KeyName, $DisplayName, $Version){
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
Set-Variable -Name AddRemKey -Scope Local -Force
Set-Variable -Name guid -Scope Local -Force
Set-Variable -Name ProductsKey -Scope Local -Force
... |
combined_dataset/train/non-malicious/Get-SQLSaturdaySessions_1.ps1 | Get-SQLSaturdaySessions_1.ps1 | function Get-SQLSaturdaySessionList {
param(
[string] $Number = "111",
$GetUnscheduled
)
$baseUrl = "http://sqlsaturday.com/" + $Number
$url = $baseUrl + "/schedule.aspx"
$page = $null
try {
Write-Verbose "Initiating WebClient"
... |
combined_dataset/train/non-malicious/sample_64_36.ps1 | sample_64_36.ps1 | #
# Module manifest for module 'OCI.PSModules.Managementdashboard'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Managementdashboard.dll'
# Version number of this module.
ModuleVersion = '88.1.0'
# Sup... |
combined_dataset/train/non-malicious/sample_53_85.ps1 | sample_53_85.ps1 | @{
GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854'
Author="Microsoft Corporation"
CompanyName="Microsoft Corporation"
Copyright="Copyright (C) Microsoft Corporation. All rights reserved."
ModuleVersion = '1.0'
NestedModules = @( 'MSFT_MpComputerStatus.cdxml',
'MSFT_Mp... |
combined_dataset/train/non-malicious/sample_2_59.ps1 | sample_2_59.ps1 | #************************************************
# TS_ModernAppsFailureForRegistryPermissionCheck.ps1
# Version 1.0.1
# Date: 3/13/2013
# Author: v-kaw
# Description: [Idea ID 7510] [Windows] WinStore - Apps fail to start if default registry permissions modified
# Rule number: 7510
# Rule URL: http://sharepo... |
combined_dataset/train/non-malicious/sample_44_30.ps1 | sample_44_30.ps1 | ## DEVELOPERS NOTES & CONVENTIONS
##
## 1. All text displayed to the user except for Write-Debug (or $PSCmdlet.WriteDebug()) text must be added to the
## string tables in:
## en-US\Plaster.psd1
## Plaster.psm1
## 2. If a new manifest element is added, it must be added to the Schema\PlasterManifest... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.