full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/sample_26_6.ps1 | sample_26_6.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_60_38.ps1 | sample_60_38.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/2013.ps1 | 2013.ps1 |
. "$psscriptroot/TestRunner.ps1"
$AssemblyName = "Microsoft.PowerShell.Commands.Management"
$excludeList = "EventlogResources.resx",
"TransactionResources.resx",
"WebServiceResources.resx",
"HotFixResources.resx",
"ControlPanelResources.resx",
"WmiResources.resx",
"ManagementMshSnapInResour... |
combined_dataset/train/non-malicious/3302.ps1 | 3302.ps1 |
function New-PoshBotTextResponse {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Scope='Function', Target='*')]
[cmdletbinding()]
param(
[parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[string[]]$Text,
... |
combined_dataset/train/non-malicious/TimeSyn HyperV Settings.ps1 | TimeSyn HyperV Settings.ps1 | <#Time Synchronization Status#>
Write-Host "Time Synchronization Status" -ForegroundColor Yellow
Write-Host "_______________________________" -ForegroundColor Yellow
Write-Host
$VMhost = Get-ItemProperty "HKLM:\\SOFTWARE\\Microsoft\\Virtual Machine\\Guest\\Parameters" | select -ExpandProperty physicalhost... |
combined_dataset/train/non-malicious/sample_56_92.ps1 | sample_56_92.ps1 | #
# Module manifest for module 'OCI.PSModules.Desktops'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Desktops.dll'
# Version number of this module.
ModuleVersion = '86.0.0'
# Supported PSEditions
Comp... |
combined_dataset/train/non-malicious/Out-LogFile Module.ps1 | Out-LogFile Module.ps1 | function Out-LogFile {
<#
.SYNOPSIS
Output to log file.
.DESCRIPTION
Output to formatted log file.
Default fomatting is:
SEVERITY: dd-MM-yyyy HH:mm:ss: Message
e.g. I: 25-06-2010 17:09:10: Started Processing
.PARAMETER BackgroundColor
Specifies the background colour when using -Write... |
combined_dataset/train/non-malicious/sample_27_84.ps1 | sample_27_84.ps1 | <#
.SYNOPSIS
Control Admin Agent.
.DESCRIPTION
This script job is to control admin agent install and uninstall.
#>
[CmdletBinding()]
param(
[parameter(Position=0, HelpMessage="Choose action: register, unregister", Mandatory=$true)]
[ValidateSet(“register”,”unregister”)]
... |
combined_dataset/train/non-malicious/SMS_2.psm1.ps1 | SMS_2.psm1.ps1 | <#
.Synopsis
Functions for managing SMS and SCCM.
.Notes
NAME: SMS.psm1
AUTHOR: Tim Johnson <tojo2000@tojo2000.com>
#>
#Requires -version 2.0
[string]$default_wmi_provider_server = 'myserver'
[string]$default_site = 'S00'
function Get-SmsWmi {
<#
.Synopsis
A function for accessing the... |
combined_dataset/train/non-malicious/sample_0_55.ps1 | sample_0_55.ps1 | #************************************************
# DC_TaskListSvc.ps1
# Version 1.1
# Date: 2014,2019
# Author: Boyd Benson (bbenson@microsoft.com)
# Description: Collects information about running services
# Called from: Networking Diagnostics
#*******************************************************
Trap [E... |
combined_dataset/train/non-malicious/30.ps1 | 30.ps1 |
param([string]$Tag)
function AbortIfProcessFailed {
param([string]$message)
if ($LASTEXITCODE) { throw $message }
exit $LASTEXITCODE
}
function AbortIfDirtyWorkingDirectory {
if (@(git status --short).Count -ne 0) {
throw "uncommited changes "
exit 1
}
}
function AbortIfGitNotAv... |
combined_dataset/train/non-malicious/sample_35_94.ps1 | sample_35_94.ps1 | <#
.SYNOPSIS
Sets registration parameters in ECE secret store for Azure stack deployment.
.DESCRIPTION
This script sets registration parameters in ECE secret store for Azure stack deployment.
.PARAMETER RegistrationCloudName
The cloud name
.PARAMETER RegistrationSubscriptionId
The subscripti... |
combined_dataset/train/non-malicious/1015.ps1 | 1015.ps1 |
$random = (New-Guid).ToString().Substring(0,8)
$subscriptionId = "my-azure-subscription-id"
$apimServiceName = "apim-$random"
$resourceGroupName = "apim-rg-$random"
$location = "Japan East"
$organisation = "Contoso"
$adminEmail = "admin@contoso.com"
Select-AzSubscription -SubscriptionId $subscriptionId
New-... |
combined_dataset/train/non-malicious/Inventory_2.ps1 | Inventory_2.ps1 | ##############################################################################\n##\n## Inventory\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\nServes as the ... |
combined_dataset/train/non-malicious/sample_53_73.ps1 | sample_53_73.ps1 | #
# Module manifest for module 'OCI.PSModules.Blockchain'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Blockchain.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_0_14.ps1 | sample_0_14.ps1 | #************************************************
# TS_DetectRootSize.ps1
# Version 1.0.1
# Date: 1/15/2013
# Author: Tspring
# Description: [Idea ID 6816] [Windows] Detect Certificate Root Store Size Problems
# Rule number: 6816
# Rule URL: "http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.aspx?... |
combined_dataset/train/non-malicious/850.ps1 | 850.ps1 |
$ResourceGroup = "{ReplaceWithYourResourceGroup}"
$StorageAccountName = "{ReplaceWithYourStorageAccountName}"
$ContainerName = "`$logs"
$CustomerId = "{ReplaceWithYourLogAnalyticsWorkspaceId}"
$SharedKey = "{ReplaceWithYourLogAnalyticsWorkspacePrimaryKey}"
$LogType = "{ReplaceW... |
combined_dataset/train/non-malicious/3994.ps1 | 3994.ps1 |
$resourceGroupName = "frangom-test"
$automationAccountName = "frangom-sdkCmdlet-tests"
$hybridWorkerGroupName = "test"
function Test-E2EHybridWorkerGroup
{
$expectedHybridWorkerGroup = @{
ResourceGroupName = $resourceGroupName
AutomationAccountName = $automationAccountName
Na... |
combined_dataset/train/non-malicious/Set-Computername_1.ps1 | Set-Computername_1.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 -computername AnewName"
if ($help) {Write-Host $usage;... |
combined_dataset/train/non-malicious/sample_28_12.ps1 | sample_28_12.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 = '80.0.0'
# Suppo... |
combined_dataset/train/non-malicious/1345.ps1 | 1345.ps1 |
function Test-CIisSecurityAuthentication
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$SiteName,
[Alias('Path')]
[string]
$VirtualPath = '',
[Parameter(Mandatory=$true,ParameterSetName='Anonymou... |
combined_dataset/train/non-malicious/sample_61_28.ps1 | sample_61_28.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/NIC Performance_1.ps1 | NIC Performance_1.ps1 | $cat = New-Object system.Diagnostics.PerformanceCounterCategory("Network Interface")
$inst = $cat.GetInstanceNames()
foreach ( $nic in $inst ) {
$a = $cat.GetCounters( $nic )
$a | ft CounterName, { $_.NextValue() } -AutoSize
}
|
combined_dataset/train/non-malicious/sample_41_13.ps1 | sample_41_13.ps1 | <#
.SYNOPSIS
SyncShare.psd1 file
This is a place-holder module file only for agent patch build purposes
#>
Write-Host "This module functionality is deprecated and is place-holder only"
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEE... |
combined_dataset/train/non-malicious/Ayth_1.ps1 | Ayth_1.ps1 | # ========================================================================
#
# Microsoft PowerShell Source File -- Created with PowerShell Plus Professional
#
# NAME: Disable-MassMailPF.ps1
#
# AUTHOR: Darrin Henshaw , Ignition IT Canada Ltd.
# DATE : 8/13/2008
#
# COMMENT: Used to disable mail on an impo... |
combined_dataset/train/non-malicious/Import-BufferBox.ps1 | Import-BufferBox.ps1 | ###################################################################################################
##### BUFFER UTILITIES SCRIPT FUNCTIONS AND SETUP
###################################################################################################
## A bunch of script functions for creating a simple in-console spl... |
combined_dataset/train/non-malicious/sample_12_48.ps1 | sample_12_48.ps1 | ConvertFrom-StringData @'
id_dpm_activity=Gathering DPM Information
id_dpm_status_getdpminfo=Running GetDPMInfo.ps1
id_dpm_installed=DPM has been detected as installed
id_dpm_info=DPMInfo
id_dpm_information=DPM Information
id_dpm_not_installed=DPM has NOT been detected as installed
id_dpm_settings=DPM Settings
... |
combined_dataset/train/non-malicious/Quest Dynamic Group 001.ps1 | Quest Dynamic Group 001.ps1 | <#
2012.07.06
Information will be uploaded shortly.
#>
|
combined_dataset/train/non-malicious/2582.ps1 | 2582.ps1 |
function Export-Xls{
$data = Get-Process | Select-Object Name, Id, WS
PS> Export-Xls $data C:\Reports\MyWkb.xlsx -WorksheetName “WS” -AppendWorksheet:$false
.EXAMPLE
PS> $data = Get-Process | Select-Object Name, Id, WS
PS> Export-Xls $data C:\Reports\MyWkb.xlsx -SheetPosition “end”
.EXAMPLE
PS> $data = Get-Process | ... |
combined_dataset/train/non-malicious/3960.ps1 | 3960.ps1 |
function Test-VirtualNetworkExpressRouteGatewayCRUD
{
$rgname = Get-ResourceGroupName
$rname = Get-ResourceName
$domainNameLabel = Get-ResourceName
$vnetName = Get-ResourceName
$publicIpName = Get-ResourceName
$vnetGatewayConfigName = Get-ResourceName
$rglocation = Get-Provi... |
combined_dataset/train/non-malicious/sample_4_1.ps1 | sample_4_1.ps1 | ConvertFrom-StringData @'
id_ctsdnsserver=DNS Server
id_ctsdnsserverdescription=Collects information about DNS Server.
'@
# SIG # Begin signature block
# MIIoOAYJKoZIhvcNAQcCoIIoKTCCKCUCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAI... |
combined_dataset/train/non-malicious/sample_14_8.ps1 | sample_14_8.ps1 | <assemblyexclusion>
<assembly name="AddInProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
<assembly name="AddInProcess32, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=arm64" />
<assembly name="AddInUtil,... |
combined_dataset/train/non-malicious/sample_64_10.ps1 | sample_64_10.ps1 | # Import the helper functions
Import-Module $PSScriptRoot\..\..\Misc\helper.psm1 -Verbose:$false
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$BlockDefinition
)
#Write-Verbose "Use this cmd... |
combined_dataset/train/non-malicious/3028.ps1 | 3028.ps1 | function Should-HaveCount($ActualValue, [int] $ExpectedValue, [switch] $Negate, [string] $Because) {
if ($ExpectedValue -lt 0) {
throw [ArgumentException]"Excpected collection size must be greater than or equal to 0."
}
$count = if ($null -eq $ActualValue) {
0
}
else {
$... |
combined_dataset/train/non-malicious/1765.ps1 | 1765.ps1 |
Import-Module HelpersSecurity
$defaultParamValues = $PSDefaultParameterValues.Clone()
$PSDefaultParameterValues["it:Skip"] = !$IsWindows
try
{
Describe "Export-ModuleMember should not work across language boundaries" -Tags 'Feature','RequireAdminOnWindows' {
BeforeAll {
$script ... |
combined_dataset/train/non-malicious/sample_19_28.ps1 | sample_19_28.ps1 | # Localized 08/29/2023 11:38 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1
ConvertFrom-StringData @'
###PSLOC
Troubleshoot_Title=疑難排解
Troubleshoot_DetectNetworkCache=正在檢查 Windows 媒體播放器網路快取...
Resolution_Title=解決方案
Resolution_ResetConfiguration=正在重設組態設定 ...
Resolution_ResetNetworkCache=正在重設網路快取設定 ...
BinaryPa... |
combined_dataset/train/non-malicious/sample_10_6.ps1 | sample_10_6.ps1 | ConvertFrom-StringData @'
id_tcpipsettingscheck=Checking for KB 967224
id_tcpipsettingscheckdesc=Checking for modified TcpIp Reg Parameters
'@
# SIG # Begin signature block
# MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX... |
combined_dataset/train/non-malicious/Get-DiskSizeInfo.ps1 | Get-DiskSizeInfo.ps1 | Function Get-DiskSizeInfo {
<#
.DESCRIPTION
Check the Disk(s) Size and remaining freespace.
.PARAMETER ComputerName
Specify the computername(s)
.INPUTS
System.String
.OUTPUTS
System.Management.Automation.PSObject
.EXAMPLE
... |
combined_dataset/train/non-malicious/sample_62_84.ps1 | sample_62_84.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/2677.ps1 | 2677.ps1 | $ProgressPreference = "SilentlyContinue"
$WarningPreference = "SilentlyContinue"
if (-not (Test-Path $PSScriptRoot\bundle\SharePointPnPPowerShellOnline.psd1)) {
Set-Alias nuget "$PSScriptRoot\nuget.exe"
nuget install SharePointPnPPowerShellOnline -configFile $PSScriptRoot\nuget.config -OutputDirectory $PSScrip... |
combined_dataset/train/non-malicious/822.ps1 | 822.ps1 |
param(
[Parameter()]
[switch]
$Bootstrap,
[Parameter()]
[switch]
$Clean,
[Parameter()]
[switch]
$Test
)
$NeededTools = @{
OpenSsl = "openssl for macOS"
PowerShellGet = "PowerShellGet latest"
InvokeBuild = "InvokeBuild latest"
}
if ((-not $PSVersionTable["OS"]) -or $P... |
combined_dataset/train/non-malicious/sample_3_28.ps1 | sample_3_28.ps1 | // ==================================================================
// DCIM_SPOwningCollectionElement
// ==================================================================
[dynamic, provider("dcismprovider"),
Association, Description(
"DCIM_SPOwningCollectionElement is a"
"trivial de... |
combined_dataset/train/non-malicious/2805.ps1 | 2805.ps1 |
if (Get-Command logparser.exe) {
$lpquery = @"
SELECT count (
AntispywareEnabled,
AntispywareSignatureAge,
AntispywareSignatureVersion,
AntivirusEnabled,
AntivirusSignatureAge,
AntivirusSignatureVersion,
BehaviorMonitorEnabled,
Enabled,
... |
combined_dataset/train/non-malicious/RegEx Quick Reference.ps1 | RegEx Quick Reference.ps1 | # get-regex.ps1
#
# Displays .NET/C#/Powershell Regular Expression Quick Reference
#
# Author: Robbie Foust (rfoust@duke.edu)
#
# For best visual results, run "get-regex | ft -auto"
function global:get-regex ([switch]$CharRep, [switch]$CharClass, [switch]$Anchors, [switch]$Comments, [switch]$Grouping, [switch]... |
combined_dataset/train/non-malicious/sample_66_52.ps1 | sample_66_52.ps1 | /*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.51.0(67d664a32968e19e2eb08b696a92463804182ae4)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-------------... |
combined_dataset/train/non-malicious/Set-OutlookSignature.ps1 | Set-OutlookSignature.ps1 | ###########################################################################"
#
# NAME: Set-OutlookSignature.ps1
#
# AUTHOR: Jan Egil Ring
#
# COMMENT: Script to create an Outlook signature based on user information from Active Directory.
# Adjust the variables in the "Custom variables"-section
# ... |
combined_dataset/train/non-malicious/Test-Port_6.ps1 | Test-Port_6.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
.PARAMETE... |
combined_dataset/train/non-malicious/2217.ps1 | 2217.ps1 | [CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Specify the Primary Site server.")]
[ValidateNotNullOrEmpty()]
[string]$SiteServer
)
Begin {
try {
Add-Type -AssemblyName "System.Drawing" -ErrorAction Stop
Add-Type -AssemblyName "System.Wi... |
combined_dataset/train/non-malicious/Windows Startup Script_2.ps1 | Windows Startup Script_2.ps1 | <#======================================================================================
File Name : Startup.ps1
Original Author : Kenneth C. Mazie
:
Description : This is a Windows startup script with pop-up notification and checks to
: assure things are no... |
combined_dataset/train/non-malicious/sample_62_36.ps1 | sample_62_36.ps1 | #requires -Version 5.0
enum BcArtifactSource {
OnPrem
Sandbox
Insider
}
#Import-Module (Join-Path $PSScriptRoot ClientContext\ClientContext.psd1)
#Import-Module (Join-Path $PSScriptRoot ClientContext\ClientContext.psm1)
#. "$PSScriptRoot\ClientContext\ClientContextLibLoader.ps1" -BcLibVersion (G... |
combined_dataset/train/non-malicious/1068.ps1 | 1068.ps1 |
function Start-TestFixture
{
& (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Test-GetFullPath
{
$fullpath = Resolve-FullPath (Join-Path $TestDir '..\Tests' )
$expectedFullPath = [System.IO.Path]::GetFullPath( (Join-Path $TestDir '..\Tests') )
... |
combined_dataset/train/non-malicious/sample_56_72.ps1 | sample_56_72.ps1 | #
# Module manifest for module 'OCI.PSModules.Managementagent'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Managementagent.dll'
# Version number of this module.
ModuleVersion = '87.0.0'
# Supported P... |
combined_dataset/train/non-malicious/sample_39_54.ps1 | sample_39_54.ps1 | #
# Module manifest for module 'OCI.PSModules.Genericartifactscontent'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Genericartifactscontent.dll'
# Version number of this module.
ModuleVersion = '75.1.0... |
combined_dataset/train/non-malicious/LibraryProperties.ps1 | LibraryProperties.ps1 | ##############################################################################\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\nfilter Get-PropertyValue($property)\n{\n $_.$pro... |
combined_dataset/train/non-malicious/Watch-Process_2.ps1 | Watch-Process_2.ps1 | Function Watch-Process {
<#
.DESCRIPTION
Creates an event handler for monitoring either process creation or deletion. This requires to be run as administrator.
.SYNOPSIS
Watches for process creation or deletion.
.PARAMETER computerName
Name of the remote computer. Make sure you have privileges to acces... |
combined_dataset/train/non-malicious/3852.ps1 | 3852.ps1 |
function Get-StorageTestMode {
try {
$testMode = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode;
$testMode = $testMode.ToString();
} catch {
if ($PSItem.Exception.Message -like '*Unable to find type*') {
$testMode = 'Record';
} else {
... |
combined_dataset/train/non-malicious/2810.ps1 | 2810.ps1 |
if (Get-Command logparser.exe) {
$lpquery = @"
SELECT
COUNT(ImagePath, LaunchString) as ct,
ImagePath,
LaunchString
FROM
*autorunsc.tsv
WHERE
Publisher not like '(Verified)%' and
(ImagePath not like 'File not found%')
GROUP BY
ImagePath,
... |
combined_dataset/train/non-malicious/sample_15_66.ps1 | sample_15_66.ps1 | #
# Module manifest for module 'OCI.PSModules.Identitydomains'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identitydomains.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported P... |
combined_dataset/train/non-malicious/sample_64_71.ps1 | sample_64_71.ps1 | # Localized 05/30/2024 04:59 PM (GMT) 303:4.80.0411 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=&Ano
PromptNoString=&Ne
BundleFound=Nalezený svazek: {0}
PackageFound=Nalezený balíček: {0}
EncryptedBundleFound=Nalezena zašifrovaná sada prostředků: {0}
Encrypted... |
combined_dataset/train/non-malicious/sample_27_21.ps1 | sample_27_21.ps1 | #
# Module manifest for module 'OCI.PSModules.Servicecatalog'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Servicecatalog.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSE... |
combined_dataset/train/non-malicious/sqlps2.ps1 | sqlps2.ps1 | using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Resources;
using System.Globalization;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Reflection;
[assembly:RunspaceCo... |
combined_dataset/train/non-malicious/2380.ps1 | 2380.ps1 |
[CmdletBinding()]
param (
[Parameter()]
[ValidateNotNullOrEmpty()]
[string]$ComputerName = $env:COMPUTERNAME
)
$filterHt = @{
'LogName' = 'System'
'ID' = 6005
}
$StartEvents = Get-WinEvent -ComputerName $ComputerName -FilterHashtable $filterHt
if (-not $StartEvents) {
throw 'Unable to determine any sta... |
combined_dataset/train/non-malicious/700.ps1 | 700.ps1 |
function Get-RsCatalogItemRole
{
[CmdletBinding()]
param
(
[string]
$Identity,
[string]
$Path = "/",
[switch]
$Recurse,
[string]
$ReportServerUri,
[System.Management.Automation.PSCredential]
$Credential,
$P... |
combined_dataset/train/non-malicious/Copy-Function.ps1 | Copy-Function.ps1 | #Requires -Version 2.0
<#
.Synopsis
Copy a function from the current session to another session
.Description
Copies a function deffinition from the current session into any other session
.Parameter Session
The session(s) you want to define the function in
.Parameter Name
T... |
combined_dataset/train/non-malicious/Add -__ Get-Help -Full_1.ps1 | Add -__ Get-Help -Full_1.ps1 | $executionContext.SessionState.InvokeCommand.PostCommandLookupAction = {
param($CommandName, $CommandLookupEventArgs)
# Only for interactive commands (and that doesn't include "prompt")
# I should exclude out-default so we don't handle it on every pipeline, but ...
if($CommandLookupEventArgs.Comma... |
combined_dataset/train/non-malicious/sample_41_93.ps1 | sample_41_93.ps1 | // Copyright (c) Microsoft Corporation. All rights reserved.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function exitIfHostProcessNotRunning(processName, pid) {
try {
process.kill(pid, 0);
}
catch (error) {
console.error('Unable to find parent process ' + processName + ':' + pi... |
combined_dataset/train/non-malicious/849.ps1 | 849.ps1 | $resourceGroupName = "<Resource group name>"
$dataFactoryName = "<Data factory name>"
$storageAccountName = "<Az.Storage account name>"
$storageAccountKey = "<Az.Storage account key>"
$sqlServerName = "<SQL server name>"
$sqlDatabaseName = "SQL Server database name"
$sqlTableName = "emp"
$sqlUserName = "<SQL Authenti... |
combined_dataset/train/non-malicious/sample_19_57.ps1 | sample_19_57.ps1 | #
# Module manifest for module 'OCI.PSModules.Identitydataplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identitydataplane.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Support... |
combined_dataset/train/non-malicious/418.ps1 | 418.ps1 | Register-PSFTeppScriptblock -Name 'PSFramework-LanguageNames' -ScriptBlock {
[System.Globalization.CultureInfo]::GetCultures([System.Globalization.CultureTypes]::AllCultures).Name | Where-Object { $_ -and ($_.Trim()) }
}
Register-PSFTeppScriptblock -Name 'PSFramework-LocalizedStrings-Names' -ScriptBlock {
([PSFRamew... |
combined_dataset/train/non-malicious/sample_9_63.ps1 | sample_9_63.ps1 | ConvertFrom-StringData @'
id_intersitemessagingstatecheck_st=Intersite Messaging service is stopped or disabled and this may cause problems related to (DFSN) site coverage calculations
'@
# SIG # Begin signature block
# MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBg... |
combined_dataset/train/non-malicious/Get Twitter RSS Feed_2.ps1 | Get Twitter RSS Feed_2.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_54_97.ps1 | sample_54_97.ps1 | # Localized 05/08/2024 05:10 AM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=是(&Y)
PromptNoString=否(&N)
BundleFound=找到下列資源存放區: {0}
PackageFound=找到封裝: {0}
EncryptedBundleFound=找到加密的套件組合: {0}
EncryptedPackageFound=找到加密的套件: {0}
CertificateFou... |
combined_dataset/train/non-malicious/sample_58_28.ps1 | sample_58_28.ps1 | #
# Module manifest for module 'OCI.PSModules.Computeinstanceagent'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Computeinstanceagent.dll'
# Version number of this module.
ModuleVersion = '86.0.0'
# S... |
combined_dataset/train/non-malicious/1760.ps1 | 1760.ps1 |
& $PSScriptRoot/class1.py | ConvertFrom-JSON
|
combined_dataset/train/non-malicious/2918.ps1 | 2918.ps1 | properties {
$x = 1
}
task default -depends Verify
task Verify -description "This task verifies psake's variables" {
Assert (Test-Path "variable:psake") "variable psake was not exported from module"
Assert ($psake.ContainsKey("build_success")) "'psake' variable does not contain key 'build_success'"
Asser... |
combined_dataset/train/non-malicious/Change Server 2012 type.ps1 | Change Server 2012 type.ps1 | <#
.SYNOPSIS
Use this script to change Windows Server 2012 to 1 of 4 types. The script installs or uninstalls
windows features to get to the desired type. The 4 types are:
Core - just a commandline
Minimal - commandline with added binaries to run some MMCs and Server Manager
Full GUI - standard desktop look wit... |
combined_dataset/train/non-malicious/3242.ps1 | 3242.ps1 |
class PluginException : Exception {
PluginException() {}
PluginException([string]$Message) : base($Message) {}
}
class PluginNotFoundException : PluginException {
PluginNotFoundException() {}
PluginNotFoundException([string]$Message) : base($Message) {}
}
class PluginDisabled : PluginException {
... |
combined_dataset/train/non-malicious/3316.ps1 | 3316.ps1 |
function Get-Permission {
[PoshBot.BotCommand(
Aliases = ('getpermission'),
Permissions = 'view'
)]
[cmdletbinding()]
param(
[parameter(Mandatory)]
$Bot,
[parameter(Position = 0)]
[string]$Name
)
if ($PSBoundParameters.ContainsKey('Name')) ... |
combined_dataset/train/non-malicious/sample_51_79.ps1 | sample_51_79.ps1 | #
# Module manifest for module 'OCI.PSModules.Ocicontrolcenter'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported... |
combined_dataset/train/non-malicious/sample_28_58.ps1 | sample_28_58.ps1 | #
# Module manifest for module 'OCI.PSModules.Integration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Integration.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEdition... |
combined_dataset/train/non-malicious/641.ps1 | 641.ps1 | param(
[switch]
$Force
)
if($Host.Version.Major -lt 2){
throw "Only compatible with Powershell version 2 and higher"
}
if (-not (Test-Path $Profile)){
Write-Host "Add a default profile script"
New-Item -path $Profile -type file -force | Out-Null
}
$PSProfileConfig = Join-Path -Path... |
combined_dataset/train/non-malicious/1398.ps1 | 1398.ps1 |
function Get-CComPermission
{
[CmdletBinding()]
[OutputType([Carbon.Security.ComAccessRights])]
param(
[Parameter(Mandatory=$true,ParameterSetName='DefaultAccessPermission')]
[Parameter(Mandatory=$true,ParameterSetName='MachineAccessRestriction')]
[Switch]
$Acc... |
combined_dataset/train/non-malicious/sample_36_5.ps1 | sample_36_5.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.CloudService.private.dll')
# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.CloudService.internal.psm1'
if(Test-Path $internalModulePath) {... |
combined_dataset/train/non-malicious/sample_16_32.ps1 | sample_16_32.ps1 | #
# Module manifest for module 'OCI.PSModules.Ocicontrolcenter'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported... |
combined_dataset/train/non-malicious/sample_66_67.ps1 | sample_66_67.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_58_34.ps1 | sample_58_34.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 = '83.3.0'
... |
combined_dataset/train/non-malicious/2795.ps1 | 2795.ps1 |
$(foreach($file in (ls *Prox.xml)) {
$data = Import-Clixml $file
$data | Where-Object { $_.ProcessName -eq "System" } |
Select-Object PSComputerName, ProcessName, StartTime
}) | Sort-Object StartTime |
combined_dataset/train/non-malicious/sample_43_46.ps1 | sample_43_46.ps1 | #
# Module manifest for module 'OCI.PSModules.Oce'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Oce.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/4147.ps1 | 4147.ps1 |
Function Set-ConsoleTitle {
Param ([String]$Title)
$host.ui.RawUI.WindowTitle = $Title
}
Function Get-Architecture {
Set-Variable -Name Architecture -Scope Local -Force
$Architecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture
$Architecture = $Global:Architecture.OSArchitectu... |
combined_dataset/train/non-malicious/sample_36_43.ps1 | sample_36_43.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.1.0'
# Supported... |
combined_dataset/train/non-malicious/sample_31_39.ps1 | sample_31_39.ps1 | #
# Module manifest for module 'GCArcService'
#
# Generated by: Microsoft
#
# Generated on: 08/09/2020
#
@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'GCArcService.psm1'
# Version number of this module.
ModuleVersion = '1.0'
# ID used to uniquely identify... |
combined_dataset/train/non-malicious/2965.ps1 | 2965.ps1 | Task ParallelTask1 {
"ParallelTask1"
}
Task ParallelTask2 {
"ParallelTask2"
}
Task ParallelNested1andNested2 {
$jobArray = @()
@("ParallelTask1", "ParallelTask2") | ForEach-Object {
$jobArray += Start-Job {
param($scriptFile, $taskName)
Invoke-psake $scriptFile -ta... |
combined_dataset/train/non-malicious/2107.ps1 | 2107.ps1 |
function Run-TestOnWinFull
{
[CmdletBinding()]
param( [string]$name )
switch ($name)
{
"ActionPreference:ErrorAction=SuspendOnWorkflow" {
workflow TestErrorActionSuspend { "Hello" }
$r = TestErrorActionSuspend -ErrorAction Suspend
$r | Should -BeExactly '... |
combined_dataset/train/non-malicious/sample_44_64.ps1 | sample_44_64.ps1 | #
# Module manifest for module 'OCI.PSModules.Adm'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Adm.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
CompatiblePSEd... |
combined_dataset/train/non-malicious/4213.ps1 | 4213.ps1 | function Invoke-ReflectivePEInjection
{
[CmdletBinding()]
Param(
[Parameter(Position = 0, Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[Byte[]]
$PEBytes,
[Parameter(Position = 1)]
[String[]]
$ComputerName,
[Parameter(Position = 2)]
[ValidateSet( 'WString', 'String', 'Void' )]
[String]
... |
combined_dataset/train/non-malicious/sample_17_27.ps1 | sample_17_27.ps1 | #
# Copyright (c) Microsoft Corporation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ... |
combined_dataset/train/non-malicious/sample_38_30.ps1 | sample_38_30.ps1 | #
# Module manifest for module 'OCI.PSModules.Identitydomains'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identitydomains.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported P... |
combined_dataset/train/non-malicious/4305.ps1 | 4305.ps1 |
if($IsLinux) {
return
}
function SuiteSetup {
Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue
Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue
$script:ProgramFilesScriptsPath = Get-AllUsersScriptsPath
$script:MyDocumentsScriptsPath ... |
combined_dataset/train/non-malicious/after.ps1 | after.ps1 | Get-WmiObject -Class Win32_MountPoint |
where {$_.Directory -like ‘Win32_Directory.Name="D:\\\\MDBDATA*"’} |
foreach {
$vol = $_.Volume
Get-WmiObject -Class Win32_Volume | where {$_.__RELPATH -eq $vol} |
Select @{Name="Folder"; Expression={$_.Caption}},
@{Name="Server"; Expression={$_.SystemNa... |
combined_dataset/train/non-malicious/3392.ps1 | 3392.ps1 |
function Test-GetAzureRmVMDscExtension
{
Set-StrictMode -Version latest; $ErrorActionPreference = 'Stop'
$rgname = Get-ComputeTestResourceName
$loc = Get-ComputeVMLocation
try
{
New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;
$vmsize = 'Standar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.