full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/sample_36_18.ps1 | sample_36_18.ps1 | #
# Module manifest for module 'Az.DesktopVirtualization'
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.DesktopVirtualization.psm1'
# Version number of this module.
ModuleVersion = '4.3.1'
... |
combined_dataset/train/non-malicious/sample_5_60.ps1 | sample_5_60.ps1 | ConvertFrom-StringData @'
id_ctsDFSserver=DFS Server
id_ctsDFSserverDescription=Collects information about DFS Server.
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAI... |
combined_dataset/train/non-malicious/sample_56_5.ps1 | sample_56_5.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/Remove-LocalProfile_1.ps1 | Remove-LocalProfile_1.ps1 | <#
.SYNOPSIS
Interactive menu that allows a user to connect to a local or remote computer and remove a local profile.
.DESCRIPTION
Presents an interactive menu for user to first make a connection to a remote or local machine. After making connection to the machine,
the user is presented with... |
combined_dataset/train/non-malicious/RSS Enclosure Downloader.ps1 | RSS Enclosure Downloader.ps1 | # author: Alexander Grofl
# http://www.therightstuff.de/2008/07/25/RSS+Enclosure+Downloader+In+PowerShell.aspx
$feed=[xml](New-Object System.Net.WebClient).DownloadString("http://the/rss/feed/url")
foreach($i in $feed.rss.channel.item) {
$url = New-Object System.Uri($i.enclosure.url)
$url.ToString()
$url.Se... |
combined_dataset/train/non-malicious/get windows product key_5.ps1 | get windows product key_5.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/HelpModules 1.0.ps1 | HelpModules 1.0.ps1 | # HelpModules
# A Module for generating module stubs so you can Update-Help (or Save-Help)
# Includes two options for reading the help from those modules (StubFunctions or Get-ModuleHelp)
# 1.0 - 2013/2/1 - Initial release Friday, Feb 1st, 2013
$PSModuleHelpRoot = Convert-Path "~\\Documents\\WindowsPowerShe... |
combined_dataset/train/non-malicious/sample_43_19.ps1 | sample_43_19.ps1 | #
# Module manifest for module 'OCI.PSModules.Tenantmanagercontrolplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Tenantmanagercontrolplane.dll'
# Version number of this module.
ModuleVersion = '73... |
combined_dataset/train/non-malicious/Test-Port_2.ps1 | Test-Port_2.ps1 | function Test-Port{
<#
.SYNOPSIS
Tests port on computer.
.DESCRIPTION
Tests port on computer.
.PARAMETER computer
Name of server to test the port connection on.
.PARAMETER port
Port to test
.PARAMETER tcp
Use tcp port
.PARAMETER udp
Use udp port
.PARAMETER UDP... |
combined_dataset/train/non-malicious/sample_30_59.ps1 | sample_30_59.ps1 | function trySetDesignerProp(tname, ttype, val) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0);
trait.value = val;
// services.debug.trace(tname + "=" + val);
}
if (command.getTrait("state").value == 0) {
command.getTrait("state").value = 2;
trySetDesignerProp("snap",... |
combined_dataset/train/non-malicious/sample_45_29.ps1 | sample_45_29.ps1 | #
# Module manifest for module 'OCI.PSModules.Core'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Core.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
CompatiblePS... |
combined_dataset/train/non-malicious/659.ps1 | 659.ps1 |
$reportPortalUri = if ($env:PesterPortalUrl -eq $null) { 'http://localhost/reports' } else { $env:PesterPortalUrl }
$reportServerUri = if ($env:PesterServerUrl -eq $null) { 'http://localhost/reportserver' } else { $env:PesterServerUrl }
function VerifyCatalogItemExists()
{
param(
[Parameter(Mandatory = ... |
combined_dataset/train/non-malicious/sample_29_29.ps1 | sample_29_29.ps1 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
#-------------------------------------------------------------------------
#region Object Synchronization Diagnostic Options
Set-Variable DiagnoseObjectSyncIssues ... |
combined_dataset/train/non-malicious/sample_4_17.ps1 | sample_4_17.ps1 | ConvertFrom-StringData @'
id_check_zenographicsuititle=Checking for the presence of Zenographics Device Manager User Interface
id_check_zenographicsuidesc=Checking if Zenographics Device Manager User Interface is loaded and current version.
id_check_zenographicsuisd=The OEM HP driver SDDMUI.DLL was detected. This d... |
combined_dataset/train/non-malicious/2434.ps1 | 2434.ps1 |
[CmdletBinding()]
[OutputType('System.Management.Automation.PSCustomObject')]
param (
[Parameter(Mandatory)]
[string]$DnsZone,
[Parameter()]
[string]$DnsServer = (Get-ADDomain).ReplicaDirectoryServers[0],
[Parameter()]
[int]$WarningDays = 1
)
begin {
function Get-DnsHostname ($IPAddress)... |
combined_dataset/train/non-malicious/sample_18_20.ps1 | sample_18_20.ps1 | #
# Module manifest for module 'OCI.PSModules.Core'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Core.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
CompatiblePS... |
combined_dataset/train/non-malicious/sample_3_1.ps1 | sample_3_1.ps1 | #************************************************
# TS_MemoryManagerSystemPagesCheck.ps1
# Version 1.0.1
# Date: 5/14/2012
# Author: v-kaw
# Description: [Idea ID 2389] [Windows] Hang caused by kernel memory depletion due 'SystemPages' reg key with wrong value
# Rule number: 2389
# Rule URL: //sharepoint/site... |
combined_dataset/train/non-malicious/4002.ps1 | 4002.ps1 |
function Test-E2ECredentials
{
$resourceGroupName = "to-delete-01"
$automationAccountName = "fbs-aa-01"
$output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue
$User = "Contoso\Test"
$Password ... |
combined_dataset/train/non-malicious/sample_14_52.ps1 | sample_14_52.ps1 | #************************************************
# TS_2K3PoolUsageMaximum.ps1
# Version 1.0.1
# Date: 5/8/2012
# Author: v-kaw
# Description: [Idea ID 2446] [Windows] Determining the trimming threshold set by the Memory Manager
# Rule number: 2446
# Rule URL: //sharepoint/sites/rules/Rule%20Submissions/Forms... |
combined_dataset/train/non-malicious/sample_19_29.ps1 | sample_19_29.ps1 | #!/usr/bin/env pwsh
<#
.SYNOPSIS
Stub around Invoke-Pester command used by VSCode PowerShell extension.
.DESCRIPTION
The stub checks the version of Pester and if >= 4.6.0, invokes Pester
using the LineNumber parameter (if specified). Otherwise, it invokes
using the TestName parameter (if specif... |
combined_dataset/train/non-malicious/sample_60_16.ps1 | sample_60_16.ps1 | @{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.ServiceFabric.Powershell'
# Version number of this module.
ModuleVersion = '3.1.0.0'
# ID used to uniquely identify this module
GUID = 'd2c42633-5254-4a82-a312-1dc0697a55cd'
# Author of this module
Author = '... |
combined_dataset/train/non-malicious/Easy Migration Tool v2.1.ps1 | Easy Migration Tool v2.1.ps1 | #Generated Form Function
function GenerateForm {
########################################################################
# Code Generated By: Richard Yaw
# Generated On: 09/12/2010
#
# Easy Migration Script for VMware (Version 2.0)
# - Added a "Reload Tasks" feature.
# - Fixed issue with the Undo feature for S... |
combined_dataset/train/non-malicious/Get-SiSReport_4.ps1 | Get-SiSReport_4.ps1 | Function Get-SiSReport
{
<#
.SYNOPSIS
Get the overall SIS usage information.
.DESCRIPTION
This function uses the sisadmin command to get the usage
information for a SIS enabled drive.
.PARAMETER SisDisk
The drive letter of a disk that ... |
combined_dataset/train/non-malicious/Skip-Object_1.ps1 | Skip-Object_1.ps1 | function Skip-Object {
param(
[int]$First = 0, [int]$Last = 0, [int]$Every = 0, [int]$UpTo = 0,
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
$InputObject
)
begin {
if($Last) {
$Queue = new-object System.Collections.Queue $Last
}
$e = $every; $UpTo++; $u = 0
}
process {
... |
combined_dataset/train/non-malicious/sample_37_36.ps1 | sample_37_36.ps1 | # Localized 12/03/2020 06:20 PM (GMT) 303:4.80.0411 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=是(&Y)
PromptNoString=否(&N)
BundleFound=找到了捆绑: {0}
PackageFound=找到包: {0}
EncryptedBundleFound=找到加密的包: {0}
EncryptedPackageFound=找到加密的包: {0}
CertificateFound=找到证书: ... |
combined_dataset/train/non-malicious/sample_3_75.ps1 | sample_3_75.ps1 | ConvertFrom-StringData @'
id_collectactivity=Collecting Basic System Information TXT
id_collectingdata=Collecting Basic Data
id_formattingdata=Formatting Data
id_uacadminmode=Admin Mode
id_uacnoprompt=No Prompt
id_uacpromptcredentials=Prompt for credentials
id_uacpromptconsent=Prompt for consent
id_uacpromptcon... |
combined_dataset/train/non-malicious/sample_29_55.ps1 | sample_29_55.ps1 | #
# Module manifest for module 'ExtensionService'
#
# Generated by: Microsoft
#
# Generated on: 04/09/2020
#
@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'ExtensionService.psm1'
# Version number of this module.
ModuleVersion = '1.0'
# ID used to uniquely ... |
combined_dataset/train/non-malicious/2953.ps1 | 2953.ps1 | properties {
$testMessage = 'Executed Test!'
$compileMessage = 'Executed Compile!'
$cleanMessage = 'Executed Clean!'
}
task default -depends Test
formatTaskName {
param($taskName)
write-host $taskName -foregroundcolor Green
}
task Test -depends Compile, Clean {
$testMessage
}
task Compile -depends Clean... |
combined_dataset/train/non-malicious/2683.ps1 | 2683.ps1 |
$cred = Get-Credential -UserName '<User>@<Tenant>.onmicrosoft.com' -Message "Enter SPO credentials"
Connect-SPOService -Url 'https://<Tenant>-admin.sharepoint.com' -Credential $cred
New-SPOSite -Url 'https://<Tenant>.sharepoint.com/sites/demo' -Title 'Tech Talk Demo' -Template 'STS
Connect-SPOnline -Url 'https... |
combined_dataset/train/non-malicious/sample_32_47.ps1 | sample_32_47.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_64_1.ps1 | sample_64_1.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/sample_55_92.ps1 | sample_55_92.ps1 | <#############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
#############################################################>
... |
combined_dataset/train/non-malicious/sample_14_50.ps1 | sample_14_50.ps1 | #
# Module manifest for module 'OCI.PSModules.Nosql'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Nosql.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
Compatible... |
combined_dataset/train/non-malicious/sample_26_7.ps1 | sample_26_7.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/2708.ps1 | 2708.ps1 | function Get-PE
{
[CmdletBinding(DefaultParameterSetName = 'OnDisk')] Param(
[Parameter(Mandatory = $True,
ParameterSetName = 'OnDisk',
Position = 0,
ValueFromPipelineByPropertyName = $True,
ValueFromPipeline = $True)]
[Al... |
combined_dataset/train/non-malicious/sample_21_97.ps1 | sample_21_97.ps1 | #
# Module manifest for module 'OCI.PSModules.Databasetools'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Databasetools.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEdi... |
combined_dataset/train/non-malicious/sample_61_14.ps1 | sample_61_14.ps1 | #
# Module manifest for module 'OCI.PSModules.Vulnerabilityscanning'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Vulnerabilityscanning.dll'
# Version number of this module.
ModuleVersion = '90.0.0'
#... |
combined_dataset/train/non-malicious/Add-Slide.ps1 | Add-Slide.ps1 | function Add-Slide($pres, $maxShared, $vmUsages, $vmShared, $maxVM, $vmLoad) {
$slide = $pres.slides.range(1).duplicate()
#$totalSlides = ($pres.slides | Measure-Object).Count
#$pres.slides.range(2).moveto($totalSlides)
#region 1
# Add all the boxes. Skip the first position.
$i = 1
foreach ($position in... |
combined_dataset/train/non-malicious/1721.ps1 | 1721.ps1 | function Remove-ServiceNowTableEntry{
[CmdletBinding(ConfirmImpact='High')]
Param(
[parameter(mandatory=$true)]
[parameter(ParameterSetName='SpecifyConnectionFields')]
[parameter(ParameterSetName='UseConnectionObject')]
[parameter(ParameterSetName='SetGlobalAuth')]
[... |
combined_dataset/train/non-malicious/sample_19_18.ps1 | sample_19_18.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 = '74.1.0'
# Supported PSEdition... |
combined_dataset/train/non-malicious/344.ps1 | 344.ps1 | function Remove-PSFConfig
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
param (
[Parameter(ParameterSetName = "Default", Position = 0, ValueFromPipeline = $true)]
[PSFramework.Configuration.Config[]]
$Config,
[Parameter(ParameterSetName = "Default", Position = 0, ValueFromPipeli... |
combined_dataset/train/non-malicious/2274.ps1 | 2274.ps1 |
function Load-Form {
$Form.Controls.Add($TabControl)
$TabControl.Controls.AddRange(@(
$TabPageGeneral,
$TabPageCAS,
$TabPagePrimary,
$TabPageSecondary,
$TabPageSiteRoles,
$TabPageOther
))
$TabPageGeneral.Controls.AddRange(@(
$OutputB... |
combined_dataset/train/non-malicious/573.ps1 | 573.ps1 |
function Add-SPOFieldsToList
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string[][]]$fields,
[Parameter(Mandatory=$true, Position=2)]
[string]$listTitle
)
foreach($field in $fields)
{
$fieldName = $field[0]
$fieldType = $field[1]
$fieldValue... |
combined_dataset/train/non-malicious/sample_16_63.ps1 | sample_16_63.ps1 | #
# Module manifest for module 'OCI.PSModules.Email'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Email.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSEditions
Compatible... |
combined_dataset/train/non-malicious/sample_17_22.ps1 | sample_17_22.ps1 | # Copyright 2008, Microsoft Corporation. All rights reserved.
PARAM([string]$MachineName = $ComputerName,[string]$Path= $null)
if($debug -eq $true){[void]$shell.popup("Run DC_DeploymentLogsLogs.ps1")}
Import-LocalizedData -BindingVariable DeploymentLogsStrings
Write-DiagProgress -Activity $DeploymentLogsS... |
combined_dataset/train/non-malicious/sample_46_64.ps1 | sample_46_64.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_0_29.ps1 | sample_0_29.ps1 | ConvertFrom-StringData @'
id_proliantdl385nmicrashdump_sd=NMICrashDump is set to 1 on this HP ProLiant DL385 G5. This setting may block machine dumps via NMI to be generated.
'@
# SIG # Begin signature block
# MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEe... |
combined_dataset/train/non-malicious/1250.ps1 | 1250.ps1 |
function Grant-CHttpUrlPermission
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$Url,
[Parameter(Mandatory=$true)]
[Alias('Identity')]
[string]
$Principal,
[Parameter(Mandatory=$true)]
[Carbon.Se... |
combined_dataset/train/non-malicious/579.ps1 | 579.ps1 |
function Submit-SPOCheckOut
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string]$targetPath
)
$targetPath = Join-SPOParts -Separator '/' -Parts $clientContext.Web.ServerRelativeUrl, $targetPath
$remotefile = $clientContext.Web.GetFileByServerRelativeUrl($targetPath)
$clien... |
combined_dataset/train/non-malicious/Get-StringRange_1.ps1 | Get-StringRange_1.ps1 | ## Works great for a..f or g..a
## BUT WEIRD for Z..a or A..a or anything non-latin
function Get-CharRange ( [char]$Start, [char]$End ) {
[char[]]($Start..$End)
}
## Cleaner output. Try Get-LetterRange A z vs. Get-CharRange A z
## And international. ## Get-LetterRange 0x0370 0x03FF Greek
## You just specify ... |
combined_dataset/train/non-malicious/sample_59_82.ps1 | sample_59_82.ps1 | # 驭码 CodeRider
驭码 CodeRider 是[极狐GitLab](https://gitlab.cn/) 推出的基于人工智能和生成式内容技术(AIGC)的新一代软件生产工具,与极狐GitLab 深度融合,提供开发者 AI 辅助编程和 DevOps 流程支持,包括代码补全、生成、解释、单元测试生成、议题处理和 MR 处理加速以及 AI 问答等功能。
## 快速开始 Quick Start
### 用户登录
CodeRider 支持极狐GitLab 注册用户通过 SaaS 平台账号免费试用,请注册[极狐GitLab 账号](https://jihulab.com/users/sign_in)体验吧!注册成功后请在插... |
combined_dataset/train/non-malicious/sample_32_32.ps1 | sample_32_32.ps1 | #
# Module manifest for module 'OCI.PSModules.Queue'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Queue.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
Compatible... |
combined_dataset/train/non-malicious/sample_60_33.ps1 | sample_60_33.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_25_75.ps1 | sample_25_75.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Relay.private.dll')
# Get the private module's instance
$instance = [Microsoft.Azure.PowerShell.Cmdlets.Relay.Module]::Instance
# Export nothing to clear implicit exports
Exp... |
combined_dataset/train/non-malicious/Get Twitter RSS Feed_4.ps1 | Get Twitter RSS Feed_4.ps1 | param ([String] $ScreenName)
$client = New-Object System.Net.WebClient
$idUrl = "https://api.twitter.com/1/users/show.json?screen_name=$ScreenName"
$data = $client.DownloadString($idUrl)
$start = 0
$findStr = '"id":'
do {
$start = $data.IndexOf($findStr, $start + 1)
if ($start -gt 0) {
$s... |
combined_dataset/train/non-malicious/sample_46_36.ps1 | sample_46_36.ps1 |
function Start-AzDataProtectionBackupInstanceRestore
{
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.IOperationJobExtendedInfo')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Trigg... |
combined_dataset/train/non-malicious/sample_67_35.ps1 | sample_67_35.ps1 | ##########################################################################
# DELL PROPRIETARY INFORMATION
#
# This software is confidential. Dell Inc., or one of its subsidiaries, has supplied this
# software to you under the terms of a license agreement,nondisclosure agreement or both.
# You may not copy, disclose, o... |
combined_dataset/train/non-malicious/1337.ps1 | 1337.ps1 |
function Revoke-CComPermission
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$Identity,
[Parameter(Mandatory=$true,ParameterSetName='DefaultAccessPermission')]
[Parameter(Mandatory=$true,ParameterSetName='MachineAccessRestriction'... |
combined_dataset/train/non-malicious/HttpRest 1.1.1.ps1 | HttpRest 1.1.1.ps1 | #requires -version 2.0
## HttpRest module
####################################################################################################
## Initial stages of changing HttpRest into a v2-only module
## Based on the REST api from MindTouch's Dream SDK
##
## INSTALL:
## You need mindtouch.dream.dll (mindtouch... |
combined_dataset/train/non-malicious/sample_42_3.ps1 | sample_42_3.ps1 | #
# Module manifest for module 'OCI.PSModules.Waa'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Waa.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/sample_35_63.ps1 | sample_35_63.ps1 | #
# Module manifest for module 'ArcHci'
#
# Generated by: Microsoft
#
# Generated on: 4/2/2021
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'ArcHci.psm1'
# Version number of this module.
ModuleVersion = '0.2.44'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/3732.ps1 | 3732.ps1 |
function Test-ProfileCrud
{
$profileName = getAssetName
$resourceGroup = TestSetup-CreateResourceGroup
$relativeName = getAssetName
try
{
$createdProfile = New-AzTrafficManagerProfile -Name $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -RelativeDnsName $relativeName -Ttl 50 -T... |
combined_dataset/train/non-malicious/3239.ps1 | 3239.ps1 |
class Response {
[Severity]$Severity = [Severity]::Success
[string[]]$Text
[string]$MessageFrom
[string]$To
[Message]$OriginalMessage = [Message]::new()
[pscustomobject[]]$Data = @()
Response() {}
Response([Message]$Message) {
$this.MessageFrom = $Message.From
$this.T... |
combined_dataset/train/non-malicious/ConvertToStringData.ps1 | ConvertToStringData.ps1 | function ConvertTo-StringData
{
Begin
{
$string = "@{`n"
function Expand-Value
{
param($value)
if ($value -ne $null) {
switch ($value.GetType().Name)
{
'String' { "`"$value`"" }
... |
combined_dataset/train/non-malicious/sample_37_95.ps1 | sample_37_95.ps1 | #
# Module manifest for module 'OCI.PSModules.Containerinstances'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Suppo... |
combined_dataset/train/non-malicious/BER Encoding Module.ps1 | BER Encoding Module.ps1 | <#
.SYNOPSIS
BER encoding library
.DESCRIPTION
Takes ASN types integer, octet (string), octet (byte array), and OID
(string) values and encodes into byte array using Basic Encoding Rules (BER)
BER encoding is used for SNMP, X.509 certificates, etc.
There will be a companion BER decoding l... |
combined_dataset/train/non-malicious/3306.ps1 | 3306.ps1 |
function New-PoshBotMiddlewareHook {
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Scope='Function', Target='*')]
[cmdletbinding()]
param(
[parameter(mandatory)]
[string]$Name,
[parameter(mandatory)]
[Valid... |
combined_dataset/train/non-malicious/187.ps1 | 187.ps1 | function Set-SCCMClientCacheSize
{
PARAM(
[Parameter(Mandatory)]
[string[]]$ComputerName,
[int]$SizeMB = 10240,
[Switch]$ServiceRestart,
[Alias('RunAs')]
[System.Management.Automation.Credential()]
$Credential = [System.Management.Automation.PSCredenti... |
combined_dataset/train/non-malicious/Set-Computername_5.ps1 | Set-Computername_5.ps1 | function Set-ComputerName {
param( [switch]$help,
[string]$originalPCName=$(read-host "Please specify the current name of the computer"),
[string]$computerName=$(read-host "Please specify the new name of the computer"))
$usage = "set-ComputerName -originalPCname CurrentName -computername AnewName"
if (... |
combined_dataset/train/non-malicious/Get-Comment.ps1 | Get-Comment.ps1 | #Requires -version 3.0
<#
.Synopsis
Gets all of the comments from a script
.Description
Uses the PowerShell 3 Parser to figure out what's a comment
#>
[CmdletBinding()]
param( # The script, or the path to a script file
[String]$Script
)
# Convert paths to script contents (otherwise, assume... |
combined_dataset/train/non-malicious/sample_18_91.ps1 | sample_18_91.ps1 | ConvertFrom-StringData @'
IPAddressDisplayNameFormat=IP adresa: {0}
NetworkNameDisplayNameFormat=Název: {0}
NetworkNameOfflineDisplayNameFormat=IP adresa: Adresa v podsíti {0}
CreateClusterProgressValidationStart=Ověřuje se vhodnost serverů pro cluster s podporou převzetí služeb při selhání.
CreateClusterProgressV... |
combined_dataset/train/non-malicious/sample_2_45.ps1 | sample_2_45.ps1 | # Localized 10/16/2024 05:34 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_6_23.ps1 | sample_6_23.ps1 | # Rule to determine whether a DWORD registry entry that is named AsyncRemoveCompletedJobs existst and set correctly.
# http://support.microsoft.com/kb/957871
#
# Created: 4/23/2012
# Author: Jonathan Randall
#**********************************************************************************************************... |
combined_dataset/train/non-malicious/sample_33_50.ps1 | sample_33_50.ps1 | ConvertFrom-StringData @'
id_sql_setup_collect_bootstrap_logs=Collecting SQL Setup Bootstrap Logs
id_sql_setup_collect_2005_logs=Collecting SQL 2005 Bootstrap Logs
id_sql_setup_collect_2008_2008r2_logs=Collecting SQL 2008 and 2008R2 Bootstrap Logs
id_sql_setup_collect_2012_logs=Collecting SQL 2012 Bootstrap Logs
i... |
combined_dataset/train/non-malicious/2339.ps1 | 2339.ps1 |
[xml]$golden_gpo = gc '.\IE Settings.xml'
$gpos = Get-GPOReport -All -ReportType XML
$golden_gpo_computer_registry_settings = ($golden_gpo.GPO.Computer.ExtensionData | ? {$_.Name -eq 'Registry'}).childNodes.Policy | select name,state
$golden_gpo_user_ie_pref_settings = ($golden_gpo.GPO.User.ExtensionData | ? {$_.Nam... |
combined_dataset/train/non-malicious/sample_45_11.ps1 | sample_45_11.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 = '83.2.0'
# Sup... |
combined_dataset/train/non-malicious/sample_57_20.ps1 | sample_57_20.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 = '87.0.0'
# Supported PSEditions
Compatib... |
combined_dataset/train/non-malicious/sample_47_61.ps1 | sample_47_61.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 = '75.1.0'
# Supported PSEditions
Co... |
combined_dataset/train/non-malicious/sample_23_37.ps1 | sample_23_37.ps1 | @{
IncludeRules = @(
'PSPlaceOpenBrace',
'PSPlaceCloseBrace',
'PSUseConsistentWhitespace',
'PSUseConsistentIndentation',
'PSAlignAssignmentStatement',
'PSUseCorrectCasing'
)
Rules = @{
PSPlaceOpenBrace = @{
Enable ... |
combined_dataset/train/non-malicious/2855.ps1 | 2855.ps1 | function Get-PSakeScriptTasks {
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseSingularNouns', '')]
[CmdletBinding()]
param(
[string]$buildFile
)
if (-not $buildFile) {
$buildFile = $psake.config_default.buildFileName
}
try {
ExecuteInBuildFileScope $bu... |
combined_dataset/train/non-malicious/sample_58_6.ps1 | sample_58_6.ps1 | --- @meta
--- @class AnimValueSource
AnimValueSource = {
MoveHeading = 0x0,
MoveSpeed = 0x1,
ForwardSpeed = 0x2,
StrafeSpeed = 0x3,
FacingHeading = 0x4,
LookHeading = 0x5,
LookPitch = 0x6,
LookDistance = 0x7,
Parameter = 0x8,
WayPointHeading = 0x9,
WayPointDistance = 0xa,
... |
combined_dataset/train/non-malicious/Convert-ToMP3.ps1 | Convert-ToMP3.ps1 | param([String] $inputPath, [String] $wildcard, [String] $outputPath = $inputPath
gci -path $inputPath\\$wildcard | % {
$outputFile = Join-Path $outputPath ($_.Name.Replace($_.Extension, '.mp3'))
vlc -I dummy $_.FullName ":sout=#transcode{acodec=mp3,ab=128,channels=6}:standard{access=file,mux=asf,dst=$outpu... |
combined_dataset/train/non-malicious/1310.ps1 | 1310.ps1 |
function Enable-CFirewallStatefulFtp
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
if( -not (Assert-CFirewallConfigurable) )
{
return
}
... |
combined_dataset/train/non-malicious/3714.ps1 | 3714.ps1 |
$global:resourceType = "Microsoft.Devices/IotHubs"
function Test-AzureRmIotHubLifecycle
{
$Location = Get-Location "Microsoft.Devices" "IotHub"
$IotHubName = getAssetName
$ResourceGroupName = getAssetName
$SubscriptionId = '91d12660-3dec-467a-be2a-213b5544ddc0'
$Sku = "B1"
$namespaceName ... |
combined_dataset/train/non-malicious/sample_16_73.ps1 | sample_16_73.ps1 | function PSConsoleHostReadLine
{
[System.Diagnostics.DebuggerHidden()]
param()
## Get the execution status of the last accepted user input.
## This needs to be done as the first thing because any script run will flush $?.
$lastRunStatus = $?
Microsoft.PowerShell.Core\Set-StrictMode -Off... |
combined_dataset/train/non-malicious/NTFS ACLs Folder Tree_3.ps1 | NTFS ACLs Folder Tree_3.ps1 | #######################################
# TITLE: listACL.ps1 #
# AUTHOR: Santiago Fernandez Mu±oz #
# #
# DESC: This script generate a HTML #
# report show all ACLs asociated with #
# a Folder tree structure starting in #
# root specified by the user ... |
combined_dataset/train/non-malicious/sample_7_87.ps1 | sample_7_87.ps1 | // ==================================================================
// DCIM_LCLogEntry
// ==================================================================
[dynamic, provider("dcismprovider"),
Description (
"A class derived from LogEntry "
"to the entries in the LifeCycle Log." ) ]
cla... |
combined_dataset/train/non-malicious/3231.ps1 | 3231.ps1 |
class CommandException : Exception {
CommandException() {}
CommandException([string]$Message) : base($Message) {}
}
class CommandNotFoundException : CommandException {
CommandNotFoundException() {}
CommandNotFoundException([string]$Message) : base($Message) {}
}
class CommandFailed : CommandException ... |
combined_dataset/train/non-malicious/3916.ps1 | 3916.ps1 |
function Get-BudgetName
{
return "Budget-" + (getAssetName)
}
function Get-NotificationKey
{
return "NotificationKey-" + (getAssetName)
}
function Get-ResourceGroupName
{
return "RG-" + (getAssetName)
}
function Test-BudgetAtSubscriptionLevel
{
$budgetName = Get-BudgetName
$n... |
combined_dataset/train/non-malicious/sample_64_77.ps1 | sample_64_77.ps1 | Overview This document provides assessments for MS-900T01A Microsoft 365 Fundamentals. The assessment consists of a set of items for each course learning path that can be used throughout the course to monitor student progress and inform your instruction; the assessment items are a mixture of multiple-choice question... |
combined_dataset/train/non-malicious/Get-Weather.ps1 | Get-Weather.ps1 | ## Get-Weather
## Parse and display the current weather and forecast from yahoo RSS
## Note that you _could_ modify this a bit to return "current condition" and "forecast" objects
## but for now, it just prints them out in a relatively nice format
#################################################################... |
combined_dataset/train/non-malicious/Get-Pecoff.ps1 | Get-Pecoff.ps1 | function Get-Pecoff
{
<#
.SYNOPSIS
Takes file-name and outputs fileobject with two more properties
poff_characteristic and poff_machinetype
.DESCRIPTION
This function creates file objects with PE properties for characteristic and machinetype
.EXAMPLE
For output from get-childitem or an... |
combined_dataset/train/non-malicious/sample_35_29.ps1 | sample_35_29.ps1 | #
# Module manifest for module 'OCI.PSModules.Vbsinst'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
Compat... |
combined_dataset/train/non-malicious/sample_48_72.ps1 | sample_48_72.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_25.ps1 | Findup_25.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;
using System.Text.RegularExpressions;
namespace Findup
{
public class FileLengthComparer : I... |
combined_dataset/train/non-malicious/sample_4_83.ps1 | sample_4_83.ps1 | // Copyright (c) 2016 Dell Inc. or its subsidiaries. All Rights Reserved.
// ==================================================================
// DCIM_AccountCapabilities
// ==================================================================
[dynamic, provider("dcismprovider"),
Association, Description (
... |
combined_dataset/train/non-malicious/Get-PrimaryIPAddress.ps1 | Get-PrimaryIPAddress.ps1 | [system.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() |
Where-Object { $_.GetIPProperties().GatewayAddresses } |
ForEach-Object {
$_.GetIPProperties().UnicastAddresses| ForEach-Object {
$_.Address.IPAddressToString
}
}
|
combined_dataset/train/non-malicious/sample_29_88.ps1 | sample_29_88.ps1 | #
# Module manifest for module 'OCI.PSModules.Datacatalog'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEdition... |
combined_dataset/train/non-malicious/Get-Speech.ps1 | Get-Speech.ps1 | #requires -pssnapin PSEventing -version 1.1
## http://www.codeplex.com/PSEventing/
## ALSO REQUIRES .NET 3.0
# ---------------------------------------------------------------------------
## <Script>
## <Author>
## Joel "Jaykul" Bennett
## </Author>
## <Description>
## Prompts the user for a selection via voice... |
combined_dataset/train/non-malicious/127.ps1 | 127.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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.