full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/sample_24_27.ps1 | sample_24_27.ps1 | <#
.SYNOPSIS
Demonstrates how to write a command that works with paths that allow
wildards and must exist.
.DESCRIPTION
This command also demonstrates how you need to supply a LiteralPath
parameter when your Path parameter accepts wildcards. This is in order
to handle paths like foo[1].txt. ... |
combined_dataset/train/non-malicious/sample_62_26.ps1 | sample_62_26.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/Get-Software Function.ps1 | Get-Software Function.ps1 | Function Get-Software{
<#
.SYNOPSIS
Gets the software applications on a remote computer.
.DESCRIPTION
This function interrogates the remote registry for installed software products.
It then returns an array of powershell objects that can be sorted and parsed.
... |
combined_dataset/train/non-malicious/sample_32_93.ps1 | sample_32_93.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_47_17.ps1 | sample_47_17.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/1775.ps1 | 1775.ps1 |
Import-Module HelpersSecurity
try
{
$defaultParamValues = $PSDefaultParameterValues.Clone()
$PSDefaultParameterValues["it:Skip"] = !$IsWindows
Describe "Importing PowerShell script files are not allowed in ConstrainedLanguage" -Tags 'CI','RequireAdminOnWindows' {
BeforeAll {
... |
combined_dataset/train/non-malicious/sample_29_79.ps1 | sample_29_79.ps1 | #
# Module manifest for module 'OCI.PSModules.Keymanagement'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Keymanagement.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEdi... |
combined_dataset/train/non-malicious/Measure-File.ps1 | Measure-File.ps1 | #.Synopsis
# Calculate statistics about files
#.Description
# A lightweight simulation of unix's "wc" word count application
#.Parameter $file
# Accepts PIPELINE input
# The file name(s) or wildcard patterns for the file(s) you want to count
#.Example
# wc *.ps1
#
# Calculates line, word, and character ... |
combined_dataset/train/non-malicious/993.ps1 | 993.ps1 | Param(
[parameter(Mandatory=$true)]
$SubscriptionId,
[parameter(Mandatory=$true)]
$VaultName,
[parameter(Mandatory=$true)]
$ConfigurationServer,
[parameter(Mandatory=$true)]
$CsvOutput
)
class ProtectableItemInfo
{
[string]$Machine
[string]$ProtectionStatus
}
$currentContext = ... |
combined_dataset/train/non-malicious/1626.ps1 | 1626.ps1 | < |