full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/2328.ps1 | 2328.ps1 | function Get-EC2InstanceMetadata
{
[CmdletBinding()]
[OutputType('System.Management.Automation.PSCustomObject')]
param
(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]$Path,
[Parameter()]
[ValidateNotNullOrEmpty()]
[string]$BaseUri = 'http://169.254.169.254/latest/meta-data'
)
$Uri ... |
combined_dataset/train/non-malicious/sample_64_43.ps1 | sample_64_43.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/Get-ADSite-byIP.ps1 | Get-ADSite-byIP.ps1 | #get-site-byIP, ipv4
#written by Nathan Linley
# http://myitpath.blogspot.com
Param(
[Parameter(Mandatory=$true,HelpMessage="IP Address")][validatepattern('^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$')]$ip,
[Parameter(Mandatory=$false,HelpMessage="Netmask")]$nmask,
[Parameter(Mandatory=$false,HelpMessa... |
combined_dataset/train/non-malicious/Monitor ESX with WS-MAN.ps1 | Monitor ESX with WS-MAN.ps1 | # WS-MAN monitoring of ESX with PowerShell.
# This requires PowerShell v2 CTP3 and requires the new WS-MAN CTP
# from MS (currently 64 bit only)
# You will also need to allow basic auth.
# (run winrm set winrm/config/client/auth @{Basic="true"} from command prompt)
function Get-VMHostWSManInstance {
param (
[P... |
combined_dataset/train/non-malicious/find-localadmins.ps1 | find-localadmins.ps1 | <#
.SYNOPSIS
List users in specified local group
.DESCRIPTION
Created: March 17, 2011 Jeff Patton
This script searches ActiveDirectory for computers. It then queries each computer for the list of users who
are in the local Administrators group.
.PARAMETER ADSPath
The LDAP URI of the container you ... |
combined_dataset/train/non-malicious/sample_39_18.ps1 | sample_39_18.ps1 | #
# Module manifest for module 'Az.ManagedServices'
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.ManagedServices.psm1'
# Version number of this module.
ModuleVersion = '3.0.1'
# Support... |
combined_dataset/train/non-malicious/3166.ps1 | 3166.ps1 |
if(-not $PSScriptRoot)
{
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
}
$PSVersion = $PSVersionTable.PSVersion.Major
$Verbose = @{}
if($env:APPVEYOR_REPO_BRANCH -and $env:APPVEYOR_REPO_BRANCH -notlike "master")
{
$Verbose.add("Verbose",$True)
}
Import-Module $PSScriptRoot\..\Invoke-Paralle... |
combined_dataset/train/non-malicious/sample_52_53.ps1 | sample_52_53.ps1 | #
# Module manifest for module 'OCI.PSModules.Filestorage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Filestorage.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEdition... |
combined_dataset/train/non-malicious/sample_40_95.ps1 | sample_40_95.ps1 | # Localized 05/06/2022 10:07 PM (GMT) 303:7.0.30723 Microsoft.PowerShell.ODataUtilsStrings.psd1
# Localized PSODataUtils.psd1
ConvertFrom-StringData @'
###PSLOC
SelectedAdapter=Dot sourcing '{0}'.
ArchitectureNotSupported=This module is not supported on your processor architecture ({0}).
ArguementNullError=Fai... |
combined_dataset/train/non-malicious/sample_40_96.ps1 | sample_40_96.ps1 |
function Get-AzDataProtectionPolicyTemplate {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.IBackupPolicy')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Gets default policy template for a selected datasourc... |
combined_dataset/train/non-malicious/ConvertTo-JaggedObjects.ps1 | ConvertTo-JaggedObjects.ps1 | function ConvertTo-JaggedObjects {
###################################################################################################
# .Synopsis
# Convert a hashtable full of arrays into formattable objects
# .Description
# When you have multiple arrays that you need to somehow group together for output, C... |
combined_dataset/train/non-malicious/sample_52_77.ps1 | sample_52_77.ps1 | #
# Module manifest for module 'OCI.PSModules.Clusterplacementgroups'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Clusterplacementgroups.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
... |
combined_dataset/train/non-malicious/sample_33_40.ps1 | sample_33_40.ps1 | /*!---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*----------------------------------------------------------*/
module.exports = {
isInstalled: function () { return false; }
};
// SIG // Begin signature block
// SIG // MIIatwYJKoZIhvc... |
combined_dataset/train/non-malicious/sample_25_65.ps1 | sample_25_65.ps1 | ##############################################################################
# PREVIEW VERSION OF PSAKE SCRIPT FOR MODULE BUILD & PUBLISH TO THE PSGALLERY
##############################################################################
#
# We are hoping to add support for publishing modules to the PowerShell galler... |
combined_dataset/train/non-malicious/sample_55_25.ps1 | sample_55_25.ps1 | #=======================================================================================================================================================================
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# Description:
# RemoveMDS.ps1
# Kill all Monitoring processes and clean up tra... |
combined_dataset/train/non-malicious/sample_63_23.ps1 | sample_63_23.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
function Get-ServiceFabricApp... |
combined_dataset/train/non-malicious/sample_63_62.ps1 | sample_63_62.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/SearchZIP_1.psm1 .ps1 | SearchZIP_1.psm1 .ps1 | function SearchZIPfiles {
<#
.SYNOPSIS
Search for (filename) strings inside compressed ZIP or RAR files (V2.2).
.DESCRIPTION
In any directory containing a large number of ZIP/RAR compressed Web Page files
this procedure will search each individual file name for simple text strings,
listing both the source RAR... |
combined_dataset/train/non-malicious/sample_28_9.ps1 | sample_28_9.ps1 | #
# Module manifest for module 'OCI.PSModules.Osubsubscription'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osubsubscription.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported... |
combined_dataset/train/non-malicious/4256.ps1 | 4256.ps1 | $Global:SocksClientLoaded = $False
$Global:SocksServerLoaded = $False
$Global:Socks = $null
$Global:BoolStart = $null
$iLogOutput = $null
$Comms = $null
function SharpSocks {
param(
[Parameter(Mandatory=$True)][string]$Uri,
[Parameter(Mandatory=$False)]$URLs="Upload",
[Parameter(Mandatory=$False)][switch]$Server,
[... |
combined_dataset/train/non-malicious/394.ps1 | 394.ps1 | param (
$TestGeneral = $true,
$TestFunctions = $true,
[ValidateSet('None', 'Default', 'Passed', 'Failed', 'Pending', 'Skipped', 'Inconclusive', 'Describe', 'Context', 'Summary', 'Header', 'Fails', 'All')]
$Show = "None",
$Include = "*",
$Exclude = ""
)
Write-Host "Starting Tests"
Write-Host "Importing M... |
combined_dataset/train/non-malicious/Set-IISLogLocation.ps1 | Set-IISLogLocation.ps1 | Function Set-IISLogLocation {
<#
.SYNOPSIS
This command will allow you to set the IIS log location on a server or multiple servers.
.DESCRIPTION
This command will allow you to set the IIS log location on a server or multiple servers.
.PARAMETER computer
Name of computer to set log location on... |
combined_dataset/train/non-malicious/sample_46_94.ps1 | sample_46_94.ps1 | #
# Module manifest for module 'OCI.PSModules.Opensearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Opensearch.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_32_43.ps1 | sample_32_43.ps1 | #
# Module manifest for module 'OCI.PSModules.Bastion'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Bastion.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSEditions
Compat... |
combined_dataset/train/non-malicious/4278.ps1 | 4278.ps1 | $scriptblock =
{
function Invoke-MS16-032
{
Param(
[Parameter(ParameterSetName = "CustomCommand", Position = 0)]
[String]
$Command
)
Set-StrictMode -Version 2
$RemoteScriptBlock = {
[CmdletBinding()]
Param(
[Parameter(Position = 0, Mandatory = $true)]
[String]
$PEBytes64,
[Parameter(... |
combined_dataset/train/non-malicious/4223.ps1 | 4223.ps1 | function Get-Netstat {
[OutputType('System.Management.Automation.PSObject')]
[CmdletBinding()]
param(
[Parameter(Position=0)]
[System.String]$ProcessName='*',
[Parameter(Position=1)]
[System.String]$Address='*',
[Parameter(Position=2)]
$Port='*',
[Parameter(Position=3,
... |
combined_dataset/train/non-malicious/sample_10_11.ps1 | sample_10_11.ps1 | #
# Module manifest for module 'OCI.PSModules.Aidocument'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aidocument.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/Parse nmap XML output.ps1 | Parse nmap XML output.ps1 | ####################################################################################
# Script: parse-nmap.ps1
# Purpose: Parse the XML output file of the nmap port scanner and emit custom
# objects with properties containing data from XML file.
# Example: dir *.xml | .\\parse-nmap.ps1
# Author: Jason ... |
combined_dataset/train/non-malicious/3617.ps1 | 3617.ps1 |
function Test-AddGetListSetRemoveActionGroup
{
Write-Output "Starting Test-SetActivityLogAlert"
$resourceGroupName = 'Default-ActivityLogAlerts'
$actionGroupName = 'andygroup-donotuse'
$shortName = 'andygroup'
[bool]$t = $true
[bool]$f = $false
$emptyString=""
try
{
Write-Verbose " ... |
combined_dataset/train/non-malicious/sample_9_82.ps1 | sample_9_82.ps1 | ConvertFrom-StringData @'
id_evalmediachecking=Checking information for Evaluation Media
'@
# SIG # Begin signature block
# MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAVAd... |
combined_dataset/train/non-malicious/sample_10_92.ps1 | sample_10_92.ps1 | ConvertFrom-StringData @'
id_pagedpoold2dsymevent_sd=This Windows Server 2003 may run out of paged pool due to a version of symevent.sys.
id_kerneltagtokekb982010_sd=This machine have high usage of kernel memory pool tag Toke possibly caused by the DisableWindowsUpdateAccess user policy.
id_kerneltagrxm4setikb264745... |
combined_dataset/train/non-malicious/Compare Table & DataRow.ps1 | Compare Table & DataRow.ps1 |
function Compare-DataRow
{
param( $a, $b)
# @bernd_k http://pauerschell.blogspot.com/
$diff = ''
$a_columncount = $a.Table.columns.count
$b_columncount = $b.Table.columns.count
if ( $a_columncount -ne $b_columncount)
{
Write-host "Tables have different num... |
combined_dataset/train/non-malicious/263.ps1 | 263.ps1 | function Get-SCSMWorkItemRelatedCI
{
PARAM (
[parameter()]
[Alias()]
$GUID
)
PROCESS
{
$WorkItemObject = Get-SCSMObject -id $GUID
Get-SCSMRelationshipObject -BySource $WorkItemObject |
Where-Object { $_.relationshipid -eq 'd96c8b59-8554-6e77-0aa7-f51448868b43' }
}
} |
combined_dataset/train/non-malicious/1166.ps1 | 1166.ps1 |
$tempDir = $null
$xmlFilePath = $null
$xdtFilePath = $null
$resultFilePath = $null
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve)
function Assert-XmlTransformed
{
$resultFilePath | Should -Exist
$newContext = Get-Content $resultFilePath
($newContex... |
combined_dataset/train/non-malicious/sample_15_50.ps1 | sample_15_50.ps1 | ConvertFrom-StringData @'
id_clustercsvd=Cluster Shared Volume information
id_clustercsvdesc=Obtaining information about Cluster Shared Volumes
'@
# SIG # Begin signature block
# MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
... |
combined_dataset/train/non-malicious/4064.ps1 | 4064.ps1 |
[CmdletBinding()]
param
(
[ValidateNotNullOrEmpty()][string]$OutputFile = 'WindowsUpdatesReport.csv',
[ValidateNotNullOrEmpty()][string]$ExclusionsFile = 'Exclusions.txt',
[switch]$Email,
[string]$From,
[string]$To,
[string]$SMTPServer,
[string]$Subject = 'Windows Updates Build Report',
[string]$Body = "List o... |
combined_dataset/train/non-malicious/sample_41_75.ps1 | sample_41_75.ps1 | #
# Module manifest for module 'Microsoft.SME.CertificateManager'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.SME.CertificateManager.psm1'
# Version number of this module.
ModuleVersion = '4.10.2'
# Supported PSEditions
# CompatiblePSEditions = @()
... |
combined_dataset/train/non-malicious/2357.ps1 | 2357.ps1 |
if (!(Get-Module 'GroupPolicy') -or !(Get-Module 'Internal')) {
Write-Error 'One or more required modules not loaded';
return;
}
$bRemediate = $false;
$aDefaultGpos = @('Default Domain Controllers Policy');
$aGposToRead = Get-GPOReport -ReportType XML -All;
foreach ($sGpo in $aGposToRead) {
$xGpo = (... |
combined_dataset/train/non-malicious/1535.ps1 | 1535.ps1 |
function Get-MrNetFirewallState {
[CmdletBinding()]
param (
[ValidateNotNullOrEmpty()]
[string[]]$ComputerName = $env:COMPUTERNAME,
[System.Management.Automation.Credential()]$Credential = [System.Management.Automation.PSCredential]::Empty
)
$ScriptBlock =
@'
... |
combined_dataset/train/non-malicious/2912.ps1 | 2912.ps1 | Framework "2.0"
task default -depends MsBuild
task MsBuild {
if ( $IsMacOS -OR $IsLinux ) {
$output = &dotnet build -version -nologo 2>&1
Assert ($output -NotLike "15.3") '$output should contain 15.3'
}
}
|
combined_dataset/train/non-malicious/Get-ExchangeDBSizes_1.ps1 | Get-ExchangeDBSizes_1.ps1 | <#
.SYNOPSIS
Get-ExchangeDBSizes - Gather data on Exchange 2007 / 2010 Mailbox Databases.
.DESCRIPTION
Gathers data from Exchange mailbox servers.
These data include:
Server\\StorageGroup\\Database (2007) or Database (2010),
Total Size (in GB) of the disk,
Size of the .edb file (in GB),
... |
combined_dataset/train/non-malicious/2787.ps1 | 2787.ps1 |
if (Get-Command logparser.exe) {
$lpquery = @"
SELECT
COUNT(ForeignAddress,
ForeignPort,
Process) as ct,
ForeignAddress,
ForeignPort,
Process
FROM
*netstat.csv
WHERE
ConPid not in ('0'; '4') and
ForeignAddress not like '10.%' and... |
combined_dataset/train/non-malicious/sample_32_46.ps1 | sample_32_46.ps1 | #
# Module manifest for module 'Microsoft.SME.SoftwareDefinedDataCenter'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.SME.SoftwareDefinedDataCenter.psm1'
# Version number of this module.
ModuleVersion = '2.335.0'
# Supported PSEditions
# CompatiblePS... |
combined_dataset/train/non-malicious/sample_12_36.ps1 | sample_12_36.ps1 | # Load Common Library
# Load Reporting Utilities
#_#$debug = $false
. ./utils_cts.ps1
. ./TS_RemoteSetup.ps1
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue
Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.S... |
combined_dataset/train/non-malicious/sample_17_12.ps1 | sample_17_12.ps1 | ConvertFrom-StringData @'
id_mats_networkadapter=Network Adapter
id_mats_networkadaptertype=Type
id_mats_networkadapterspeed=Speed
id_mats_ipaddresses=IP Addresses
id_mats_defaultgateway=Default Gateway
id_mats_dnsservers=DNS Servers
id_mats_proxyenabled=Proxy Server
id_enabled=Enabled
id_mats_proxyserveradd=P... |
combined_dataset/train/non-malicious/sample_27_73.ps1 | sample_27_73.ps1 | ##------------------------------------------------------------------
## <copyright file="Install-StandaloneObservability.ps1" company="Microsoft">
## Copyright (C) Microsoft. All rights reserved.
## </copyright>
##------------------------------------------------------------------
[CmdletBinding(SupportsShou... |
combined_dataset/train/non-malicious/sample_1_13.ps1 | sample_1_13.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/Search-Twitter.ps1 | Search-Twitter.ps1 | ##############################################################################\n##\n## Search-Twitter\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\nSearch Tw... |
combined_dataset/train/non-malicious/PoSh Email Tester GUI.ps1 | PoSh Email Tester GUI.ps1 | <#
.NOTES
Name : PoSh Email Tester GUI
Author : Bryan Jaudon <bryan.jaudon@gmail.com>
Version : 1.0
Date : 10/30/2012
.Description
GUI Email tester program utilizing PowerShell Send-MailMessage cmdlet.
#>
#requires -version 2
#region IconExtrator TypeDef
$code... |
combined_dataset/train/non-malicious/PowerShell Template_2.ps1 | PowerShell Template_2.ps1 | Function New-Script
{
$strName = $env:username
$date = get-date -format d
$name = Read-Host "Filename"
if ($name -eq "") { $name="NewTemplate" }
$email = Read-Host "eMail Address"
if ($email -eq "") { $email="genemagerr@hotmail.com" }
$comment=@();
while($s = (Read-Host "Comment").Trim()){$comment+="$s`r`n#"}
... |
combined_dataset/train/non-malicious/499.ps1 | 499.ps1 |
function Get-PPApp{
param(
[Parameter(Mandatory=$false)]
[String]
$Name,
[switch]
$Installed,
[switch]
$CurrentInstalled
)
$CurrentLocation = (Get-Location).Path
$CurrentAppDataFile = Join-Path $CurrentLocation $P... |
combined_dataset/train/non-malicious/sample_67_16.ps1 | sample_67_16.ps1 | # Localized 05/01/2024 11:12 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=&Ja
PromptNoString=&Nein
BundleFound=Bundle gefunden: {0}
PackageFound=Paket gefunden: {0}
EncryptedBundleFound=Verschlüsseltes Bundle gefunden: {0}
EncryptedPackag... |
combined_dataset/train/non-malicious/sample_7_13.ps1 | sample_7_13.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 = '92.1.0'
# Sup... |
combined_dataset/train/non-malicious/Scan VB6 Code.ps1 | Scan VB6 Code.ps1 | #requires -version 2
# some PowerShell Functions to scan VB 6 Projects for patterns
# e.g. some SQL calls
# by Bernd Kriszio http://pauerschell.blogspot.com/
function Get-VBProject ($file)
{
# this is developed for use with Visual Basic 6
# to extract the files the contain VB Code
pushd (Spli... |
combined_dataset/train/non-malicious/sample_6_40.ps1 | sample_6_40.ps1 | #************************************************
# DC_TrustList.ps1
# Version 1.0
# Date: 1/14/2014
# Author: Tim Springston [MS]
# Description: This script queries for the user and computer domain
# and returns details about those domains.
#************************************************
Import-Local... |
combined_dataset/train/non-malicious/Help Differ 10000 v_2.01.ps1 | Help Differ 10000 v_2.01.ps1 | # These functions are meant to help generate a table that shows differences between
# cmdlets among different versions of a module.
# You will need a MoinMoin wiki to render the output.
# If you don't have a MoinMoin wiki you might be able to use the sandbox at http://moinmo.in/WikiSandBox
# Extracts some data fr... |
combined_dataset/train/non-malicious/sample_31_5.ps1 | sample_31_5.ps1 | #
# Module manifest for module 'OCI.PSModules.Aivision'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aivision.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Comp... |
combined_dataset/train/non-malicious/Format-PoshTable.ps1 | Format-PoshTable.ps1 | function Format-PoshTable {
#.Synopsis
# Format-PoshTable puts the output in a WPF DataGrid (inline in PoshConsole)
#.Description
# Outputs a WPF datagrid of the objects (and properties) specified.
# This grid can be sorted, rearranged, etc
[CmdletBinding()]
param(
[parameter(ValueFromPipeline=$tru... |
combined_dataset/train/non-malicious/2974.ps1 | 2974.ps1 |
param (
[Parameter(Mandatory)]
[String] $CertificateThumbprint,
[Parameter(Mandatory)]
[String] $NugetApiKey,
[String] $ChocolateyApiKey,
[Parameter(Mandatory)]
[String] $PsGalleryApiKey
)
.\updateGherkinLanguageFile.ps1
$ErrorActionPreference = 'Stop'
$process = Start-Process powersh... |
combined_dataset/train/non-malicious/2014.ps1 | 2014.ps1 |
. "$psscriptroot/TestRunner.ps1"
$AssemblyName = "Microsoft.PowerShell.Commands.Utility"
$excludeList = "CoreMshSnapinResources.resx",
"ErrorPackageRemoting.resx",
"FormatAndOut_out_gridview.resx",
"UtilityMshSnapinResources.resx",
"OutPrinterDisplayStrings.resx",
"UpdateListStrings.resx",
... |
combined_dataset/train/non-malicious/sample_33_66.ps1 | sample_33_66.ps1 | ---
- name: Get System information.
ansible.builtin.uri:
url: "https://{{ hostname }}:{{ https_port }}{{ api_manager
}}/Oem/Dell/DellAttributes/{{ computer_system_id }}"
register: sys_attr
delegate_to: "{{ idrac_gather_facts_delegate }}"
- name: Get Manager information.
ansible.builtin.uri:
url: ... |
combined_dataset/train/non-malicious/3719.ps1 | 3719.ps1 |
function Test-RecordSetCrud
{
$zoneName = Get-RandomZoneName
$recordName = getAssetname
$resourceGroup = TestSetup-CreateResourceGroup
$zone = New-AzDnsZone -Name $zoneName -ResourceGroupName $resourceGroup.ResourceGroupName
$createdRecord = New-AzDnsRecordSet -Name $recordName -ZoneName $zoneNa... |
combined_dataset/train/non-malicious/824c3a01-0fdd-4a67-90af-bd398fb95b05.ps1 | 824c3a01-0fdd-4a67-90af-bd398fb95b05.ps1 | # Description: Create Events in Application log
# Date: 03-05-2007
# Author: Stefan Stranger & Ken
# Explanation: If you only wish to write to the event log you must do two things. The first is to create or specify a Source.
# The second is to call the WriteEntry method. The source would be your applicatio... |
combined_dataset/train/non-malicious/2315.ps1 | 2315.ps1 |
[CmdletBinding()]
[OutputType()]
param (
[Parameter(Mandatory)]
[string]$InvoiceTitle,
[Parameter(Mandatory)]
[string]$InvoiceNumber,
[Parameter(Mandatory)]
[string]$ClientCompany,
[Parameter(Mandatory)]
[string]$ClientName,
[Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)]
[hashtable[... |
combined_dataset/train/non-malicious/sample_38_56.ps1 | sample_38_56.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 = '75.1.0'
# Supported PSEditions
Compatib... |
combined_dataset/train/non-malicious/sample_54_39.ps1 | sample_54_39.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/Out-DataTable_2.ps1 | Out-DataTable_2.ps1 | #######################
<#
.SYNOPSIS
Creates a DataTable for an object
.DESCRIPTION
Creates a DataTable based on an objects properties.
.INPUTS
Object
Any object can be piped to Out-DataTable
.OUTPUTS
System.Data.DataTable
.EXAMPLE
$dt = Get-Alias | Out-DataTable
This example creates a DataTable fro... |
combined_dataset/train/non-malicious/powershell ise config_3.ps1 | powershell ise config_3.ps1 | <configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
|
combined_dataset/train/non-malicious/1642.ps1 | 1642.ps1 |
if (([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)) {
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + ' (Elevated)'
$Host.UI.RawUI.BackgroundColor = 'DarkBlue'
Clea... |
combined_dataset/train/non-malicious/3175.ps1 | 3175.ps1 | function Open-ISEFunction {
[cmdletbinding()]
param(
[ValidateScript({ Get-Command -commandtype function -name $_ })]
[string[]]$function
)
foreach($fn in $function){
$definition = (Get-Command -commandtype function -name $fn).definition
... |
combined_dataset/train/non-malicious/PowerChart 0.52.ps1 | PowerChart 0.52.ps1 | function New-PowerChart() {
#.Synopsis
# Create a chart using the WPF DataVisualization Toolkit (WPFToolkit)
#.Example
# New-PowerChart Area { ls | ? {!$_.PSIsContainer} } -IndependentValue Name -DependentValue Length -Show
#.Example
# New-PowerChart Pie { ps | sort WS -desc | select -first 10 } Name WS -Sh... |
combined_dataset/train/non-malicious/sample_17_31.ps1 | sample_17_31.ps1 | @{
GUID = "1DA87E53-152B-403E-98DC-74D7B4D63D59"
Author = "PowerShell"
CompanyName = "Microsoft Corporation"
Copyright = "Copyright (c) Microsoft Corporation."
ModuleVersion = "7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion = "3.0"
CmdletsToExport = @(
'Export-Alias', 'Get-Alias', 'Import-Alias', 'New-Al... |
combined_dataset/train/non-malicious/sample_48_25.ps1 | sample_48_25.ps1 |
///////////////////////////////////////////////////////////////////////////////
// Helper to set a designer prop
///////////////////////////////////////////////////////////////////////////////
function setDesignerProp(tname, ttype, tvalue) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)... |
combined_dataset/train/non-malicious/973.ps1 | 973.ps1 |
$SubscriptionId = ''
$resourceGroupName = "myResourceGroup-$(Get-Random)"
$location = "westus2"
$vNetName = "myVnet-$(Get-Random)"
$vNetAddressPrefix = "10.0.0.0/16"
$defaultSubnetName = "myDefaultSubnet-$(Get-Random)"
$defaultSubnetAddressPrefix = "10.0.0.0/24"
$miSubnetName = "myMISubnet-$(Get-Random)"
$miSubnetA... |
combined_dataset/train/non-malicious/sample_21_89.ps1 | sample_21_89.ps1 | # Compiling deqp
$ProgressPreference = "SilentlyContinue"
$MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent
. "$MyPath\mesa_init_msvc.ps1"
$source_dir = Join-Path -Path "$PWD" -ChildPath "src"
$deqp_source = Join-Path -Path "$source_dir" -ChildPath "VK-GL-CTS"
$deqp_build = Join-Path -Path "$PWD" -ChildPath... |
combined_dataset/train/non-malicious/1709.ps1 | 1709.ps1 | Function Remove-ServiceNowAttachment {
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSAvoidUsingConvertToSecureStringWithPlainText','')]
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSAvoidGlobalVars','')]
[CmdletBinding(DefaultParameterSetName,SupportsShouldProcess=$true)]
Param(
... |
combined_dataset/train/non-malicious/sample_23_56.ps1 | sample_23_56.ps1 | @{
GUID="CA046F10-CA64-4740-8FF9-2565DBA61A4F"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
FunctionsToExport = @()
CmdletsToExport="Get-WinEvent", "New-WinEvent", "Get-C... |
combined_dataset/train/non-malicious/1673.ps1 | 1673.ps1 |
function Setup-Network {
param (
[switch]$dhcp,
$ip,
$mask,
$gateway,
$dns1,
$dns2
)
$admin = reg query "HKU\S-1-5-19\Environment" 2>&1
if ($admin -match 'denied') { Throw 'You are not admin' }
if (!$dhcp -and !$ip) { Throw 'Must specify I... |
combined_dataset/train/non-malicious/950.ps1 | 950.ps1 |
$apiVersion = "2015-04-08"
$resourceGroupName = "myResourceGroup"
$accountName = "mycosmosaccount"
$keyspaceName = "keyspace1"
$tableName = "table1"
$keyspaceThroughputResourceName = $accountName + "/cassandra/" + $keyspaceName + "/throughput"
$keyspaceThroughputResourceType = "Microsoft.DocumentDb/databaseAccounts/a... |
combined_dataset/train/non-malicious/sample_11_3.ps1 | sample_11_3.ps1 | ConvertFrom-StringData @'
id_detectmtu1514_activity=Detect MTU of 1514
id_detectmtu1514_status=Checking network adapters for an MTU of 1514.
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# K... |
combined_dataset/train/non-malicious/sample_29_81.ps1 | sample_29_81.ps1 | #
# Module manifest for module 'OCI.PSModules.Capacitymanagement'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Capacitymanagement.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Suppo... |
combined_dataset/train/non-malicious/sample_62_44.ps1 | sample_62_44.ps1 | # diag_sha.psm1
# Created by tdimli
# March 2020
#
# Diagnostic functions for SHA area
# version
$SHA_version = "1.0.200425.0"
# Area and Area/Component arrays
# Example: $AREA = @("Component1", "Component2")
$SHA = @()
#Component/Diagnostic Function arrays
# Example: $Component1 = @("Diag_Func1", "Dia... |
combined_dataset/train/non-malicious/sample_52_23.ps1 | sample_52_23.ps1 |
@{
# This file should have the product name, else powershell module will not work please read "Use the correct Module Directory Name" section here https://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx
# Script module or binary module file associated with this manifest
RootModule = '..\..\AIP.dll'
# Ve... |
combined_dataset/train/non-malicious/sample_19_53.ps1 | sample_19_53.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
[CmdletBinding(DefaultParamet... |
combined_dataset/train/non-malicious/sample_65_34.ps1 | sample_65_34.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 = '83.3.0'
# Supported PSEditi... |
combined_dataset/train/non-malicious/sample_28_44.ps1 | sample_28_44.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\rollup@4.9.6\node_modules\rollup\dist\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\rollup... |
combined_dataset/train/non-malicious/sample_17_4.ps1 | sample_17_4.ps1 | #************************************************
# TS_UnableToAddNetworkPrintersErrorCheck.ps1
# Version 1.0.1
# Date: 7/19/2013
# Author: v-kaw
# Description: [KSE Rule] [ Windows V3] Presence of lots of folders inside \spool\prtprocs\ causes failure to install print queues
# Rule number: d4047602-196c-443f-9... |
combined_dataset/train/non-malicious/sample_58_87.ps1 | sample_58_87.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_24_24.ps1 | sample_24_24.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_85.ps1 | sample_49_85.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/3110.ps1 | 3110.ps1 |
function Get-WindowsProductKey
{
[CmdletBinding()]
param(
[Parameter(
Position=0,
HelpMessage='ComputerName or IPv4-Address of the remote computer')]
[String[]]$ComputerName = $env:COMPUTERNAME,
[Parameter(
Position=1,
HelpMessage='Credentials to authenticate agains a remote computer')]
... |
combined_dataset/train/non-malicious/Select-Xml 2.1.ps1 | Select-Xml 2.1.ps1 | #requires -version 2.0
# Select-Xml 2.1 and Remove-XmlNamespace
function Select-Xml {
#.Synopsis
# This improved version of the Select-XML cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the Content, Path, or Xml parameter to specify the XML to be ... |
combined_dataset/train/non-malicious/1039.ps1 | 1039.ps1 |
[CmdletBinding()]
param(
)
Set-StrictMode -Version Latest
& (Join-Path $PSScriptRoot ..\Import-Carbon.ps1 -Resolve)
$ccservicePath = 'Path\to\ccservice.exe'
$ccserviceUser = 'example.com\CCServiceUser'
$ccservicePassword = 'CCServiceUserPassword'
Install-Service -Name CCService -Path $ccservicePath -Use... |
combined_dataset/train/non-malicious/sample_1_45.ps1 | sample_1_45.ps1 | # Copyright ?2008, Microsoft Corporation. All rights reserved.
#
# You may use this code and information and create derivative works of it,
# provided that the following conditions are met:
# 1. This code and information and any derivative works may only be used for
# troubleshooting a) Windows and b) products fo... |
combined_dataset/train/non-malicious/sample_38_47.ps1 | sample_38_47.ps1 | #************************************************
# DC_Firewall-Component.ps1
# Version 1.0
# Version 1.1: Altered the runPS function correctly a column width issue.
# Date: 2009, 2014, 2020/waltere: add NetworkIsolation
# Author: Boyd Benson (bbenson@microsoft.com)
# Description: Collects information about the W... |
combined_dataset/train/non-malicious/1283.ps1 | 1283.ps1 |
function Resolve-CNetPath
{
[CmdletBinding()]
param(
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
Write-Warning ('Resolve-CNetPath is obsolete and will be removed in a future major version of Carbon. Do not use.')
... |
combined_dataset/train/non-malicious/3566.ps1 | 3566.ps1 | Register-ArgumentCompleter -CommandName New-AzSubscription -ParameterName OfferType -ScriptBlock {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
$values = "MS-AZR-0017P", "MS-AZR-0148P"
$values |
ForEach-Object {
[System.Management.Automation.Comple... |
combined_dataset/train/non-malicious/sample_46_57.ps1 | sample_46_57.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
$ErrorActionPreference = 'Stop'
$observabilityNuget... |
combined_dataset/train/non-malicious/2219.ps1 | 2219.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true,HelpMessage="Site server where the SMS Provider is installed")]
[ValidateNotNullOrEmpty()]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[string]$SiteServer,
[parameter(Mandatory=$true,HelpMessage=... |
combined_dataset/train/non-malicious/sample_26_39.ps1 | sample_26_39.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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.