full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
combined_dataset/train/non-malicious/sample_33_25.ps1 | sample_33_25.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_33_9.ps1 | sample_33_9.ps1 | $ErrorActionPreference = 'Stop'
<#
.Synopsis
Returns payload information from glcm. This info is required to send a heart beat request to AA
#>
function Get-HeartbeatInfo
{
[CmdletBinding()]
param()
$glcm = Get-DscLocalConfigurationManager
$configurationName = ""
$aaServerU... |
combined_dataset/train/non-malicious/3662.ps1 | 3662.ps1 |
function Test-ServerActiveDirectoryAdministrator ($location = "North Europe")
{
$rg = Create-ResourceGroupForTest
$server = Create-ServerForTest $rg "12.0" $location
try
{
$activeDirectoryGroup1 = "testAADaccount"
$activeDirectoryGroup1ObjectId = "41732a4a-e09e-4b18-9624-38e252d68bbf"
$acti... |
combined_dataset/train/non-malicious/sample_6_27.ps1 | sample_6_27.ps1 | if($OSVersion.Major -ge 6)
{
$EventLogNames ="Microsoft-Windows-TaskScheduler/Operational",
"Microsoft-Windows-TaskScheduler/Debug",
"Microsoft-Windows-TaskScheduler/Diagnostic",
"Microsoft-Windows-TaskScheduler/Maintenance"
$OutputFormats = "TXT", "CSV", "EVTX"
.\TS_GetEvents.ps1 -EventLogName... |
combined_dataset/train/non-malicious/2087.ps1 | 2087.ps1 |
Describe 'using module' -Tags "CI" {
BeforeAll {
$originalPSModulePath = $env:PSModulePath
function New-TestModule {
param(
[string]$Name,
[string]$Content,
[switch]$Manifest,
[version]$Version = '1.0',
[... |
combined_dataset/train/non-malicious/sample_3_17.ps1 | sample_3_17.ps1 | #************************************************
# TS_Win32TimeTimeSkewRegCheck.ps1
# Version 1.0.1
# Date: 6/28/2012
# Author: v-maam
# Description: [Idea ID 4724] [Windows] W32Time and time skew
# Rule number: 4724
# Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.aspx?ID=4724
#***... |
combined_dataset/train/non-malicious/sample_64_19.ps1 | sample_64_19.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/sample_36_29.ps1 | sample_36_29.ps1 | ##------------------------------------------------------------------
## <copyright file="NewMultiTenantJsonForObservabilityGMA.ps1" company="Microsoft">
## Copyright (C) Microsoft. All rights reserved.
## </copyright>
##------------------------------------------------------------------
Param (
[Paramet... |
combined_dataset/train/non-malicious/2259.ps1 | 2259.ps1 | [CmdletBinding()]
param(
[parameter(Mandatory=$true)]
$SiteServer,
[parameter(Mandatory=$true)]
$SiteCode
)
function Validate-SiteCode {
$ValidateSiteCode = Get-WmiObject -Namespace "root\SMS" -Class SMS_ProviderLocation -ComputerName $SiteServer -Filter "SiteCode like '$($SiteCode)'" | Select-Object -ExpandProper... |
combined_dataset/train/non-malicious/4063.ps1 | 4063.ps1 |
$LastInfection = get-winevent -filterhashtable @{ logname = 'system'; ID = 1116 } -maxevents 1 -ErrorAction SilentlyContinue
$LastScan = Get-WinEvent -FilterHashtable @{ logname = 'system'; ProviderName = 'Microsoft Antimalware'; ID = 1001 } -MaxEvents 1
If ($LastScan.TimeCreated -lt $LastInfection.TimeCreated) {
... |
combined_dataset/train/non-malicious/sample_12_70.ps1 | sample_12_70.ps1 | <# ------ Input Prompts ------ #>
$fields = @(
New-Object "System.Management.Automation.Host.FieldDescription" "Input"
New-Object "System.Management.Automation.Host.FieldDescription" "Input List"
)
$fields[1].SetParameterType([int[]])
$host.UI.Prompt("Caption", "Message", $fields)
Get-Credential
G... |
combined_dataset/train/non-malicious/2768.ps1 | 2768.ps1 |
ForEach ($NameSpace in "root\subscription","root\default") { Get-WmiObject -Namespace $NameSpace -Query "select * from __FilterToConsumerBinding" }
|
combined_dataset/train/non-malicious/4472.ps1 | 4472.ps1 |
$configFile = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, 'json')
if (Test-Path -Path $configFile)
{
$ConfigurationData = Get-Content -Path $configFile | ConvertFrom-Json
}
else
{
$ConfigurationData = @{
AllNodes = @(
@{
NodeName ... |
combined_dataset/train/non-malicious/1539.ps1 | 1539.ps1 | function Stop-MrPendingService {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline)]
[ValidateNotNullorEmpty()]
[string[]]$ComputerName = $env:COMPUTERNAME,
[System.Management.Automation.Credential()]$Credential = [System.Management.Automation.PSCredential]::Empty
)
... |
combined_dataset/train/non-malicious/Get-Parameter_13.ps1 | Get-Parameter_13.ps1 | #Requires -version 2.0
##This is just script-file nesting stuff, so that you can call the SCRIPT, and after it defines the global function, it will call it.
param (
[Parameter(Position=1,ValueFromPipelineByPropertyName=$true,Mandatory=$true)]
$Name
,
[Parameter(Position=2,ValueFromPipelineByPropertyName... |
combined_dataset/train/non-malicious/sample_21_30.ps1 | sample_21_30.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_7_52.ps1 | sample_7_52.ps1 | #************************************************
# DC_DPMEventLogs.ps1
# Version 1.0.1
# Date: 06-29-2011
# Author: Patrick Lewis - patlewis@microsoft.com
# Description: This script get DPM related event logs
#************************************************
if($debug -eq $true){[void]$shell.popup("Run DC_DPMEv... |
combined_dataset/train/non-malicious/Get-Delegate_1.ps1 | Get-Delegate_1.ps1 | #requires -version 3
function Get-Delegate {
<#
.SYNOPSIS
Create an action[] or func[] delegate for a psmethod reference.
.DESCRIPTION
Create an action[] or func[] delegate for a psmethod reference.
.PARAMETER Method
A PSMethod reference to create a delegate for. This parameter accepts pipeline input.
.PARAM... |
combined_dataset/train/non-malicious/sample_65_4.ps1 | sample_65_4.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 New-ServiceFabricApp... |
combined_dataset/train/non-malicious/1698.ps1 | 1698.ps1 | [CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullorEmpty()]
[PSCredential]$Credential
)
If (-not $PSScriptRoot) {$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent}
$Script:ThisCommand = $MyInvocation.MyCommand
$ProjectRoot = Resolve-Path "$PSScriptRoot\.."
$ModuleRoot ... |
combined_dataset/train/non-malicious/3860.ps1 | 3860.ps1 |
function Test-NewExchangePeering()
{
$resourceName = getAssetName "NewExchangePeeringCVS"
$resourceGroup = "testCarrier"
$peeringLocation = "Berlin"
$kind = IsDirect $false
Write-Debug "Getting the Facility Information"
try {
Write-Debug "Getting the Asn Information"
$randNum = getRandomNum... |
combined_dataset/train/non-malicious/Show-NodeXLMap.ps1 | Show-NodeXLMap.ps1 | # Author: Doug Finke http://www.dougfinke.com/blog/
# Originally Posted: 08/13/08 (Microsoft Research .NetMap and PowerShell)
# http://www.dougfinke.com/blog/?p=465
# Modified by Steven Murawski http://www.mindofroot.com
# Updated to use the new project name "NodeXL"
# Added support for coloring the labels
# By a... |
combined_dataset/train/non-malicious/sample_62_6.ps1 | sample_62_6.ps1 | @{
GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250'
Author="Microsoft Corporation"
CompanyName="Microsoft Corporation"
Copyright="Copyright (C) Microsoft Corporation. All rights reserved."
ModuleVersion = '1.0'
NestedModules = @('MSFT_MpPerformanceRecording.psm1')
FormatsToProcess = @(... |
combined_dataset/train/non-malicious/sample_23_89.ps1 | sample_23_89.ps1 | # Copyright (c) 2023 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# FOR INTERNAL COLLECTION USE ONLY
# The interfaces in this file are meant for use within this collection
# and may not remain stable to outside uses. Changes may be made in ANY release, ev... |
combined_dataset/train/non-malicious/sample_52_18.ps1 | sample_52_18.ps1 | #
# Module manifest for module 'OCI.PSModules.Ailanguage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/sample_67_61.ps1 | sample_67_61.ps1 | <#
File: tss_VMLVerbosity.ps1
Last change: 2022-06-10
.SYNOPSIS
This is a Powershell script to collect Hyper-V traces when the scenario time is too long for a VMLTrace
.DESCRIPTION
Script to change Hyper-V Tracing Verbosity
Arguments:
-Set : Set the verbosity to Standard | Verbose
.EXAMPLE
.\tss_... |
combined_dataset/train/non-malicious/sample_39_97.ps1 | sample_39_97.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/Exchange Services.ps1 | Exchange Services.ps1 | #Requires input from the user
$Server = read-host "Enter Exchange Server Name"
#Finds only the services that contain "Exchange"
$Status = (Get-Service -ComputerName $server |Where-object {$_.Displayname -like "*Exchange*"})
#Displays which Exchange Services are stopped
foreach ($Name in $status) {
IF (... |
combined_dataset/train/non-malicious/sample_29_67.ps1 | sample_29_67.ps1 | #
# Module manifest for module 'OCI.PSModules.Mediaservices'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEdi... |
combined_dataset/train/non-malicious/Get-WMIVersions.ps1 | Get-WMIVersions.ps1 | param ( $Credential, $ComputerName )
# The official way to detect .NET versions is to look at their known location on the hard drive as per
# this article: http://msdn.microsoft.com/en-us/kb/kb00318785.aspx
# thanks to David M (http://twitter.com/makovec) for the WQL
$query = "select name from win32_directory ... |
combined_dataset/train/non-malicious/sample_16_8.ps1 | sample_16_8.ps1 | ---
- name: Get system resource api id
ansible.builtin.uri:
url: https://{{ hostname }}:{{ https_port }}/redfish/v1/Systems
register: system_api_result
delegate_to: "{{ idrac_gather_facts_delegate }}"
- name: Get first System Id from the system response
ansible.builtin.set_fact:
api_system: "{{ system_a... |
combined_dataset/train/non-malicious/2nd Line Support.ps1 | 2nd Line Support.ps1 | ##Creates variable for filename
$date = (get-date).tostring("yyyy-MM-dd")
$filename = "H:\\dailychecks\\checks_$date.xls"
## Imports exchange modules
Import-Module "\\\\emailserver\\c$\\PS Modules\\vamail.videoarts.info.psm1"
## Start Internet Explorer to check that Video Arts website is up
Start-Proces... |
combined_dataset/train/non-malicious/sample_38_1.ps1 | sample_38_1.ps1 | @{
GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
NestedModules="Microsoft.PowerShell.Commands.Management.dll"
HelpInfoURI = 'https://aka... |
combined_dataset/train/non-malicious/sample_47_11.ps1 | sample_47_11.ps1 | #
# Module manifest for module 'OCI.PSModules.Functions'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Functions.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
Co... |
combined_dataset/train/non-malicious/sample_7_92.ps1 | sample_7_92.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/Get-StrictMode_1.psm1.ps1 | Get-StrictMode_1.psm1.ps1 | function Get-Version {
<#
.SYNOPSIS
V2.0 Incorporate Version() and ToString() Methods, 1 Jan 2012.
A very simple module to retrieve the Set-StrictMode setting of the user
session.
.DESCRIPTION
This procedure is necessary as there is, apparently, no equivalent Power-
Shell variable for this and it enables the s... |
combined_dataset/train/non-malicious/3426.ps1 | 3426.ps1 |
function Test-PolicyDefinitionCRUD
{
$policyName = Get-ResourceName
$policyName = "$($policyName)-plus-plus"
$actual = New-AzureRMPolicyDefinition -Name $policyName -Policy SamplePolicyDefinition.json
$retryForCreation = Retry-Function { return (Get-AzureRMPolicyDefinition -Name $policyName).Nam... |
combined_dataset/train/non-malicious/sample_33_42.ps1 | sample_33_42.ps1 | #
# Module manifest for module 'OCI.PSModules.Licensemanager'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Licensemanager.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSE... |
combined_dataset/train/non-malicious/ISE NativeConsole Hooks.ps1 | ISE NativeConsole Hooks.ps1 | # Uses NativeConsole, which is available under a bunch of Open Source licenses
# http://poshconsole.codeplex.com/SourceControl/changeset/view/f9bb2b127402#Huddled/Interop/NativeConsole.cs
add-type -Path ~\\Projects\\PoshConsole\\Huddled\\Interop\\NativeConsole.cs
$NativeConsole = New-Object Huddled.Interop.NativeC... |
combined_dataset/train/non-malicious/sample_65_27.ps1 | sample_65_27.ps1 | @{
GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 "
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
ModuleToProcess="PSDiagnostics.psm1"
Func... |
combined_dataset/train/non-malicious/sample_32_16.ps1 | sample_32_16.ps1 | #
# Script Module file for Dism module.
#
# Copyright (c) Microsoft Corporation
#
#
# Cmdlet aliases
#
Set-Alias Apply-WindowsUnattend Use-WindowsUnattend
Set-Alias Add-ProvisionedAppxPackage Add-AppxProvisionedPackage
Set-Alias Remove-ProvisionedAppxPackage Remove-AppxProvisionedPackage
Set-Alias Get-Pr... |
combined_dataset/train/non-malicious/699.ps1 | 699.ps1 |
function Revoke-RsSystemAccess
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')]
param
(
[Alias('UserOrGroupName')]
[Parameter(Mandatory = $True)]
[string]
$Identity,
[switch]
$Strict,
[string]
... |
combined_dataset/train/non-malicious/sample_42_20.ps1 | sample_42_20.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_40_23.ps1 | sample_40_23.ps1 | #
# Module manifest for module 'OCI.PSModules.Apigateway'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apigateway.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/Get-NetworkStatistics.ps1 | Get-NetworkStatistics.ps1 | function Get-NetworkStatistics
{
[OutputType('System.Management.Automation.PSObject')]
[CmdletBinding(DefaultParameterSetName='name')]
param(
[Parameter(Position=0,ValueFromPipeline=$true,ParameterSetName='port')]
[System.Int32]$Port='*',
[Parameter(Position=0,ValueFromPipeline=$true,ParameterSet... |
combined_dataset/train/non-malicious/sample_62_85.ps1 | sample_62_85.ps1 | $global:VerbosePreference = 'Continue'
Function Write-Custom-Output
{
Param([string]$message)
$date = Get-Date
$newMessage = '[{0}] {1}' -f $date, $message
Write-Output $newMessage
}
trap [Exception]
{
Write-Custom-Output "WARN: Terminating error encountered on line $($_.Invoc... |
combined_dataset/train/non-malicious/sample_49_40.ps1 | sample_49_40.ps1 | #
# Module manifest for module 'OCI.PSModules.Osmanagementhub'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osmanagementhub.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported P... |
combined_dataset/train/non-malicious/4170.ps1 | 4170.ps1 |
param
(
[switch]$ListQueries,
[string]$Query,
[string]$SCCMServer,
[string]$SCCMServerDrive
)
function Get-ListOfQueries {
[CmdletBinding()]
param ()
Set-Location $SCCMServerDrive
$Queries = Get-CMQuery
Set-Location $env:SystemDrive
$QueryArray = @()
foreach ($Query in $Queries) {
$QueryArray += $Qu... |
combined_dataset/train/non-malicious/478.ps1 | 478.ps1 |
function Format-FileSize{
[CmdletBinding()]
param(
[Parameter(Position=0, Mandatory=$true)]
[int]
$Size
)
If($Size -gt 1TB) {[string]::Format("{0:0.00} TB", $size / 1TB)}
ElseIf($Size -gt 1GB) {[string]::Format("{0:0.00} GB", $size / 1GB)}
ElseIf($Size -gt 1MB) {[... |
combined_dataset/train/non-malicious/sample_66_17.ps1 | sample_66_17.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/sample_18_97.ps1 | sample_18_97.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Advisor.private.dll')
# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Advisor.internal.psm1'
if(Test-Path $internalModulePath) {
$nul... |
combined_dataset/train/non-malicious/1678.ps1 | 1678.ps1 |
return
$srcRoot = "C:\temp\news"
$dstRoot = "C:\temp\new"
$logDir = "C:\temp\log"
if (!(Test-Path $srcRoot)) {
throw "Source path '$srcRoot' does not exist!"
}
if (!(Test-Path $logDir)) {
Write-Warning "Path '$logDir' does not exist! Creating..."
try {
md $logDir | Out-Null
} catch {... |
combined_dataset/train/non-malicious/670.ps1 | 670.ps1 |
Describe "Write-RsCatalogItem" {
Context "Write-RsCatalogItem with min parameters"{
$folderName = 'SutWriteRsCatalogItem_MinParameters' + [guid]::NewGuid()
New-RsFolder -Path / -FolderName $folderName
$folderPath = '/' + $folderName
$localPath = (Get-Item -Path ".\").FullName ... |
combined_dataset/train/non-malicious/sample_42_44.ps1 | sample_42_44.ps1 | #
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
<#
.SYNOPSIS
Installs dotnet cli
.DESCRIPTION
Installs dotnet cli. If dotnet installation already exists in the given directory
it ... |
combined_dataset/train/non-malicious/Reflection Module_3.ps1 | Reflection Module_3.ps1 | #requires -version 2.0
# ALSO REQUIRES Autoload for some functionality
# You should create a Reflection.psd1 with the contents: @{ RequiredModules = @("Autoload"); GUID="64b5f609-970f-4e65-b02f-93ccf3e60cbb"; ModuleVersion="3.5.0.0" }
#History:
# 1.0 - First public release (March 19, 2010)
# 2.0 - Private Build
... |
combined_dataset/train/non-malicious/sample_31_81.ps1 | sample_31_81.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'... |
combined_dataset/train/non-malicious/sample_38_61.ps1 | sample_38_61.ps1 | #
# Module manifest for module 'OCI.PSModules.Resourcesearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Resourcesearch.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSE... |
combined_dataset/train/non-malicious/sample_29_84.ps1 | sample_29_84.ps1 | $url = $args[0]
Write-Host "Downloading Microsoft Edge"
$wc = New-Object net.webclient
$msiInstaller = "$env:temp\microsoft-edge-stable.msi"
$wc.Downloadfile($url, $msiInstaller)
Write-Host "Installing Microsoft Edge"
$arguments = "/i `"$msiInstaller`" /quiet"
Start-Process msiexec.exe -ArgumentList $arguments -Wait
... |
combined_dataset/train/non-malicious/Out-DataTable_6.ps1 | Out-DataTable_6.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/4465.ps1 | 4465.ps1 | function Uninstall-PSResource {
[OutputType([void])]
[cmdletbinding(SupportsShouldProcess = $true)]
Param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true,
Position = 0,
ParameterSetName = 'NameParameterSet')]
[ValidateN... |
combined_dataset/train/non-malicious/sample_14_29.ps1 | sample_14_29.ps1 | #
# Module manifest for module 'OCI.PSModules.Cims'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Cims.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
CompatiblePS... |
combined_dataset/train/non-malicious/sample_17_77.ps1 | sample_17_77.ps1 | #************************************************
# TS_ClusterValidationTests.ps1
# Version 1.0.1
# Date: 07-24-2009
# Author: Andre Teixeira - andret@microsoft.com
# Hacked by Jacques Boulet - jaboulet@microsoft.com - 2019-02-21
# Description: This script is used to obtain cluster validation report.
# ... |
combined_dataset/train/non-malicious/1519.ps1 | 1519.ps1 |
function Assert-ContainsLike
{
[CmdletBinding()]
param(
[Parameter(Position=0)]
[object]
$Haystack,
[Parameter(Position=1)]
[object]
$Needle,
[Parameter(Position=2)]
[string]
$Message
)
... |
combined_dataset/train/non-malicious/sample_16_14.ps1 | sample_16_14.ps1 | #
# Module manifest for module 'OCI.PSModules.Servicemanagerproxy'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Servicemanagerproxy.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Sup... |
combined_dataset/train/non-malicious/sample_32_23.ps1 | sample_32_23.ps1 | #
# Module manifest for module 'OCI.PSModules.Applicationmigration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Applicationmigration.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# S... |
combined_dataset/train/non-malicious/PerformanceTracking.psm1.ps1 | PerformanceTracking.psm1.ps1 | $Parser = [System.Management.Automation.PsParser]
$script:lastMemory = Get-Process -id $PID
$global:LastTweets = new-object System.Collections.Generic.List[PSObject]
$global:PerformanceHistory = @{}
if(!(Test-Path Variable:PrePerformanceTrackingPrompt -EA 0)){
$Global:PrePerformanceTrackingPrompt = ${Function... |
combined_dataset/train/non-malicious/sample_39_46.ps1 | sample_39_46.ps1 | # we want more secure TLS 1.2 for most things
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
# VS17.x is 2022
$msvc_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe'
Write-Host "Downloading Visual Studio 2022 build tools at:"
Get-Date
Invoke-WebRequest -Uri $msvc_url -OutFile C:... |
combined_dataset/train/non-malicious/sample_58_59.ps1 | sample_58_59.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/sample_19_54.ps1 | sample_19_54.ps1 | #************************************************
# Function.ps1
# Version 1.0.0
# Date: 03-01-2012
# Author: Wilson Souza - wsouza@microsoft.com
# Description: This script contains functions used by others ps1 files
#************************************************
Import-LocalizedData -BindingVariable ScriptSt... |
combined_dataset/train/non-malicious/4057.ps1 | 4057.ps1 | $cmdLets = (Get-Module pscx).ExportedCmdlets.Keys
$functions = (Get-Module pscx).ExportedFunctions.Keys
$cmdLetsAndFunctions = $cmdLets + $functions | Select -uniq | Sort-Object
$nounsAndCommands = @{}
foreach ( $cmdLet in ($cmdLetsAndFunctions) ) {
$noun = $cmdLet.split('-')[1]
if ( ! $noun ) {
continue
... |
combined_dataset/train/non-malicious/Manage ASP_1.NET Providers.ps1 | Manage ASP_1.NET Providers.ps1 | # Manage_ASP_NET_Providers.ps1
# by Chistian Glessner
# http://iLoveSharePoint.com
# have to be initaized. If you want to change the app config you have to restart PowerShell
param($appConfigPath=$(throw "-appConfigPath is mandatory"))
{
# App config path have to be set before loading System.Web.dll
[S... |
combined_dataset/train/non-malicious/sample_56_12.ps1 | sample_56_12.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmconfig'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmconfig.dll'
# Version number of this module.
ModuleVersion = '85.1.0'
# Supported PSEditions
Co... |
combined_dataset/train/non-malicious/SVMotion-VM_1.ps1 | SVMotion-VM_1.ps1 | # author: Hal Rottenberg
# Website/OpenID: http://halr9000.com
# purpose: does "real" SVMotion of a VM
# usage: get-vm | SVMotion-VM -destination (get-datastore foo)
function SVMotion-VM {
param(
[VMware.VimAutomation.Client20.DatastoreImpl]
$destination
)
Begin {
$datastoreView = get-view $destina... |
combined_dataset/train/non-malicious/sample_47_35.ps1 | sample_47_35.ps1 | $url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise.msi';
if ([Environment]::Is64BitProcess) {
$url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi'
}
$wc = New-Object net.webclient
$msiInstaller = "$env:temp\google-chrome.msi"
Write-Host ... |
combined_dataset/train/non-malicious/sample_36_58.ps1 | sample_36_58.ps1 | #
# Module manifest for module 'OCI.PSModules.Generativeaiinference'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Generativeaiinference.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
#... |
combined_dataset/train/non-malicious/sample_17_63.ps1 | sample_17_63.ps1 | #************************************************
# DC_RDSServerInfo.ps1
# Version 1.0.0
# Date: 21-01-2012
# Author: Daniel Grund - dgrund@microsoft.com
# Description:
# This script gets the RDS config and
# checks vital signs to inform user.
# 1.0.0 Beta release / 2021-03-30 Waltere #_#
#*****************... |
combined_dataset/train/non-malicious/sample_13_58.ps1 | sample_13_58.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=Das erforderliche PowerShell-Modul (FailoverClusters) wurde nicht gefunden. Installieren Sie es mit dem Tool „Rollen und Funktionen“: Remoteserver-Verwaltungstools | Featureverwaltungstools | Failoverclustering-Tools | Failoverclustermodul für Windows PowerShell... |
combined_dataset/train/non-malicious/2191.ps1 | 2191.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, HelpMess... |
combined_dataset/train/non-malicious/sample_2_12.ps1 | sample_2_12.ps1 | ConvertFrom-StringData @'
id_kb947477_hpdlltitle=Checking Spooler Service for hpzui4wm.dll
id_kb947477_hpdlldescription=Checking for HP driver hpzui4wm.dll loaded in Spooler Service.
'@
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgE... |
combined_dataset/train/non-malicious/1748.ps1 | 1748.ps1 |
[CmdletBinding(DefaultParameterSetName = "NotByPath")]
param
(
[parameter(Mandatory = $true, ParameterSetName = "ByPath")]
[switch]$Force,
[string]
$PowerShellHome
)
Set-StrictMode -Version Latest
if (! ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::Get... |
combined_dataset/train/non-malicious/sample_16_36.ps1 | sample_16_36.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/1183.ps1 | 1183.ps1 |
Set-StrictMode -Version 'Latest'
$taskName = $null
$credential = $null
$AllMonths = @( 'January','February','March','April','May','June','July','August','September','October','November','December' )
$today = Get-Date
$today = New-Object 'DateTime' $today.Year,$today.Month,$today.Day
& (Join-Path -Path $P... |
combined_dataset/train/non-malicious/sample_47_32.ps1 | sample_47_32.ps1 | # Use the PowerShell extension setting `powershell.scriptAnalysis.settingsPath` to get the current workspace
# to use this PSScriptAnalyzerSettings.psd1 file to configure code analysis in Visual Studio Code.
# This setting is configured in the workspace's `.vscode/settings.json`.
#
# For more information on PSScrip... |
combined_dataset/train/non-malicious/sample_18_25.ps1 | sample_18_25.ps1 | #
# Module manifest for module 'OCI.PSModules.Aispeech'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aispeech.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
Comp... |
combined_dataset/train/non-malicious/sample_23_41.ps1 | sample_23_41.ps1 | #
# Module manifest for module 'OCI.PSModules.Cloudbridge'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEdition... |
combined_dataset/train/non-malicious/2966.ps1 | 2966.ps1 | param($installPath, $toolsPath, $package)
$psakeModule = Join-Path -Path $toolsPath -ChildPath 'psake/psake.psd1'
Import-Module -Name $psakeModule
|
combined_dataset/train/non-malicious/sample_0_6.ps1 | sample_0_6.ps1 | ConvertFrom-StringData @'
progressbar_id_crm_fileversion_outdated=Checking For Outdated Microsoft CRM File Versions
progressbar_id_crm_fileversion_outdateddesc=Checking Microsoft CRM File Version Information To Ensure Recent Updates Are Installed
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBc... |
combined_dataset/train/non-malicious/sample_44_19.ps1 | sample_44_19.ps1 | @{
GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
FunctionsToExport = @()
CmdletsToExport="Start-Transcript", "Stop-Transcript"
AliasesTo... |
combined_dataset/train/non-malicious/sample_66_75.ps1 | sample_66_75.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmsynthetics'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmsynthetics.dll'
# Version number of this module.
ModuleVersion = '86.0.0'
# Supported PSEdi... |
combined_dataset/train/non-malicious/1304.ps1 | 1304.ps1 |
function Test-CService
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$Name
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$service = Get-Service -Name $Name -ErrorA... |
combined_dataset/train/non-malicious/Compare-Agents_1.ps1 | Compare-Agents_1.ps1 | #This scripts compares the agents that are installed in two zones and
#gives the agents that are not common.
#Usage:
#Compare-Agents.ps1 -server1 RMSServer1.contoso.com -server2 RMSServer2.contoso.com -output c:\\Temp.txt
#RMSServer1 is the one whose agents are to be moved.
param([string] $Server1,$Server2,$outp... |
combined_dataset/train/non-malicious/sample_45_52.ps1 | sample_45_52.ps1 | #
# Module manifest for module 'OCI.PSModules.Goldengate'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Goldengate.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
... |
combined_dataset/train/non-malicious/ISE-Snippets.ps1 | ISE-Snippets.ps1 | #requires -version 2.0
## ISE-Snippets module v 1.0
## DEVELOPED FOR CTP3
## See comments for each function for changes ...
##############################################################################################################
## As a shortcut for every snippet would be to much, I created Add-Snippet whic... |
combined_dataset/train/non-malicious/sample_29_21.ps1 | sample_29_21.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 = '75.1.0'
#... |
combined_dataset/train/non-malicious/sample_39_83.ps1 | sample_39_83.ps1 | # powershell completion for azcmagent -*- shell-script -*-
function __azcmagent_debug {
if ($env:BASH_COMP_DEBUG_FILE) {
"$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE"
}
}
filter __azcmagent_escapeStringWithSpecialChars {
$_ -replace '\s|#|@|\$... |
combined_dataset/train/non-malicious/Set-WebConfig.ps1 | Set-WebConfig.ps1 | function Set-WebConfigSqlConnectionString {
param( [switch]$help,
[string]$configfile = $(read-host "Please enter a web.config file to read"),
[string]$connectionString = $(read-host "Please enter a connection string"),
[switch]$backup = $TRUE
)
$usage = "`$conString = `"Data S... |
combined_dataset/train/non-malicious/Save-Credentials_1.ps1 | Save-Credentials_1.ps1 | <#
.SYNOPSIS
The script saves a username and password, encrypted with a custom key to to a file.
.DESCRIPTION
The script saves a username and password, encrypted with a custom key to to a file. The key is coded into the script but should be changed before use. The key allows the password to be decrypted ... |
combined_dataset/train/non-malicious/sample_41_44.ps1 | sample_41_44.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
<#
PowerShell Diagnostics Module
This module contains a set of wrapper scripts that
enable a user to use ETW tracing in Windows
PowerShell.
#>
$script:Logman="$env:windir\system32\logman.exe"
$script:wsmanlogfile = "$env:wind... |
combined_dataset/train/non-malicious/Import-NmapXML.ps1 | Import-NmapXML.ps1 | #Requires -Version 2.0
function Import-NmapXML
{
####################################################################################
#.Synopsis
# Parse XML output files of the nmap port scanner (www.nmap.org).
#
#.Description
# Parse XML output files of the nmap port scanner (www.nmap.org) and ... |
combined_dataset/train/non-malicious/982.ps1 | 982.ps1 |
$SubscriptionId = ''
$primaryResourceGroupName = "myPrimaryResourceGroup-$(Get-Random)"
$primaryLocation = "westus2"
$secondaryResourceGroupName = "mySecondaryResourceGroup-$(Get-Random)"
$secondaryLocation = "eastus"
$adminSqlLogin = "SqlAdmin"
$password = "ChangeYourAdminPassword1"
$primaryServerName = "primary-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.