full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
combined_dataset/train/non-malicious/CTP3_ Watch Folder.ps1
CTP3_ Watch Folder.ps1
#requires -version 2.0 # Example # # ps> . .\\watch-folder.ps1 # ps> watch-folder c:\\temp # ps> "foo" > c:\\temp\\test.txt # ps> $table # ps> (shows changes) function watch-folder { param([string]$folder) $fsw = new-object System.IO.FileSystemWatcher $fsw.Path = $folder # st...
combined_dataset/train/non-malicious/sample_38_27.ps1
sample_38_27.ps1
# # Module manifest for module 'OCI.PSModules.Usage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usage.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/sample_66_71.ps1
sample_66_71.ps1
var OfficeaicopilotStringsEnum,OfficeaicopilotStringsArray,OfficeaicopilotStrings={ChatContainerKeepItActionButtonText:"Giữ lại",ChatContainerUndoActionButtonText:"Hoàn tác",ChatContainerInsertActionButtonText:"Chèn",ChatContainerFeedbackNudgeContent:"Vui lòng giúp chúng tôi tìm hiểu và đào tạo các mô hình của mình bằn...
combined_dataset/train/non-malicious/4335.ps1
4335.ps1
function Get-EscapedString { [CmdletBinding()] [OutputType([String])] Param ( [Parameter()] [string] $ElementValue ) return [System.Security.SecurityElement]::Escape($ElementValue) }
combined_dataset/train/non-malicious/4384.ps1
4384.ps1
function Test-ModuleInUse { [CmdletBinding()] [OutputType([bool])] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $ModuleBasePath, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $ModuleName, ...
combined_dataset/train/non-malicious/3909.ps1
3909.ps1
function Test-JobCRUD { $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $jobId1 = "job1" $jobId2 = "job2" try { $poolInfo1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation $poolInfo1.PoolId = "...
combined_dataset/train/non-malicious/sample_14_28.ps1
sample_14_28.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\sucrase@3.35.0\node_modules\sucrase\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\sucrase@...
combined_dataset/train/non-malicious/3424.ps1
3424.ps1
function Test-ResourceLockCRUD { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $rglocation = Get-ProviderLocation ResourceManagement $apiversion = "2014-04-01" $rg = New-AzureRMResourceGroup -Name $rgname -Location $rglocation $actual = New-AzureRMResourceLock -LockName $rname -LockL...
combined_dataset/train/non-malicious/sample_12_1.ps1
sample_12_1.ps1
#************************************************ # TS_HyperVEvent106Check.ps1 # Version 1.0.08.26.14: Created Rule. # Version 1.1.09.04.14: Configured the detection logic to flag events for only the last 7 days. # Author: bbenson, tode # Description: Check for Hyper-V Event 106 #*********************************...
combined_dataset/train/non-malicious/sample_54_20.ps1
sample_54_20.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/sample_22_16.ps1
sample_22_16.ps1
# # Module manifest for module 'OCI.PSModules.Waas' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waas.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions CompatiblePS...
combined_dataset/train/non-malicious/sample_23_48.ps1
sample_23_48.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.CloudService.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module]::Instance # Export nothing to clear implicit ...
combined_dataset/train/non-malicious/VMware Host Network Info_1.ps1
VMware Host Network Info_1.ps1
# Set the VI Server and Filename before running Connect-VIServer MYVISERVER $filename = "C:\\DetailedNetworkInfo.csv" Write "Gathering VMHost objects" $vmhosts = Get-VMHost | Sort Name | Where-Object {$_.State -eq "Connected"} | Get-View $MyCol = @() foreach ($vmhost in $vmhosts){ $ESXHost = $vmhost.Name Wr...
combined_dataset/train/non-malicious/sample_17_37.ps1
sample_17_37.ps1
#$debug = $false # Load Common Library: . ./utils_cts.ps1 # Load DSD Common Function Library . ./utils_DSD.ps1 trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo...
combined_dataset/train/non-malicious/sample_38_39.ps1
sample_38_39.ps1
<# .SYNOPSIS Creates a self-signed cert remotely and then creates an https binding in IIS .PARAMETER Session Passed in Remote session object that can be generated from Local-Create-Remote-Session.ps1 .PARAMETER VmMachineName Machine name of the VM .EXAMPLE .\Remote-Create-Self-Signed-Cert.ps1 -IpAddr...
combined_dataset/train/non-malicious/3296.ps1
3296.ps1
function Set-PoshBotStatefulData { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidGlobalVars', '', Scope='Function', Target='*')] [cmdletbinding(SupportsShouldProcess)] param( [parameter(Mandatory)] [string]$Name, [parameter(ValueFromPipeline, ...
combined_dataset/train/non-malicious/sample_1_70.ps1
sample_1_70.ps1
#************************************************ # DC_NfsServer-Component.ps1 # Version 1.0.06.26.14: Created script. # Version 1.1.08.13.14: Updated comments. Added data collection for NIS registry value: "HKLM\system\CurrentControlSet\services\NisSvc". TFS264084 # Date: 2014 # Author: Boyd Benson (bbenson@micr...
combined_dataset/train/non-malicious/2976.ps1
2976.ps1
Set-StrictMode -Version Latest $here = Split-Path -Parent $MyInvocation.MyCommand.Path $manifestPath = (Join-Path $here 'Pester.psd1') $changeLogPath = (Join-Path $here 'CHANGELOG.md') Describe -Tags 'VersionChecks' "Pester manifest and changelog" { $script:manifest = $null $script:tagVersion = $null $s...
combined_dataset/train/non-malicious/4167.ps1
4167.ps1
Set-Variable -Name LocalAdmins -Force Set-Variable -Name LogFile -Value $env:windir"\Logs\LocalAdministrators_Emailed.log" -Force Set-Variable -Name Member -Force Set-Variable -Name MemberExclusions -Force Set-Variable -Name Members -Force Set-Variable -Name SystemExclusions -Force cls $MemberExclusions = @("Domain...
combined_dataset/train/non-malicious/Set-Encoding_1.ps1
Set-Encoding_1.ps1
function Set-Encoding{ <# .Synopsis Takes a Script file or any other text file into memory and Re-Encodes it in the format specified. .Parameter Source The path to the file to be re-encoded. .Parameter Destination The path to write the corrected file to .Parameter Encoding The encoding to convert ...
combined_dataset/train/non-malicious/Split-TextToLines Demo.ps1
Split-TextToLines Demo.ps1
function Show-LineArrayStructure ($lines) { $len = $lines.length "Type is: $($lines.gettype().Name)" "Number of lines: $len" for ($i = 0; $i -lt $len; $i++) { "$($i + 1). Line: length $($lines[$i].length) >$($lines[$i])<" } '' } $text = "abc`r`nefg`...
combined_dataset/train/non-malicious/sample_6_70.ps1
sample_6_70.ps1
// ================================================================== // DCIM_ADMProfilesOwningCollectionElement // ================================================================== [dynamic, provider("dcismprovider"), Association, Description( "DCIM_ADMProfilesOwningCollection is a" "...
combined_dataset/train/non-malicious/sample_61_58.ps1
sample_61_58.ps1
# Localized 06/04/2024 11:05 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Tak PromptNoString=&Nie BundleFound=Znaleziono pakiet: {0} PackageFound=Znaleziono pakiet: {0} EncryptedBundleFound=Znaleziono zaszyfrowany zbiór: {0} EncryptedPac...
combined_dataset/train/non-malicious/3390.ps1
3390.ps1
function Test-VirtualMachineExtension { $rgname = Get-ComputeTestResourceName try { $loc = Get-ComputeVMLocation; New-AzureRmResourceGroup -Name $rgname -Location $loc -Force; $vmsize = 'Standard_A2'; $vmname = 'vm' + $rgname; ...
combined_dataset/train/non-malicious/sample_41_32.ps1
sample_41_32.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/wget 1.0.ps1
wget 1.0.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Joel "Jaykul" Bennett ### </Author> ### <Description> ### Downloads a file from the web to the specified file path. ### </Description> ### <Usage> ### Get-URL http://huddledmasses.org/downloads/RunOnlyOn...
combined_dataset/train/non-malicious/2561.ps1
2561.ps1
param($path=$(throw 'path is required.'), $serverName, $configFile, [switch]$nolog) [reflection.assembly]::Load("Microso...
combined_dataset/train/non-malicious/Set-RDPSetting.ps1
Set-RDPSetting.ps1
######################################################################################################################## # NAME # Set-RDPSetting # # SYNOPSIS # Adds or updates a named property to an existing RDP file. # # SYNTAX # Edit-RDP [-Path] <string> [-Name] <string> [[-Value] <object>] [-Pass...
combined_dataset/train/non-malicious/3841.ps1
3841.ps1
function Test-AzureContainerRegistry { $resourceGroupName = Get-RandomResourceGroupName $classicRegistryName = Get-RandomRegistryName $location = Get-ProviderLocation "Microsoft.ContainerRegistry/registries" $replicationLocation = 'westus2' try { New-AzResourceGroup -Name $resource...
combined_dataset/train/non-malicious/sample_21_9.ps1
sample_21_9.ps1
# # Module manifest for module 'Microsoft.Online.SharePoint.PowerShell' # # Generated by: Microsoft Corportation # # Generated on: 8/29/2011 # @{ # Script module or binary module file associated with this manifest ModuleToProcess = 'Microsoft.Online.SharePoint.PowerShell.dll' # Version number of this modu...
combined_dataset/train/non-malicious/sample_62_32.ps1
sample_62_32.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 = '84.0.0' # Supported PSEditions Compatible...
combined_dataset/train/non-malicious/Invoke-BPAModeling.ps1
Invoke-BPAModeling.ps1
<# NAME: Invoke-BPAModeling.ps1 AUTHOR: Jan Egil Ring EMAIL: jer@powershell.no COMMENT: Script to invoke Best Practices Analyzer on remote computers. Requires Windows Server 2008 R2 on target computers, and Windows PowerShell 2.0 on the computer running the script from. F...
combined_dataset/train/non-malicious/List AD Attributes_1.ps1
List AD Attributes_1.ps1
$forest = [DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() $Schema = $forest.schema $Properties = $Schema.FindAllProperties() foreach($property in $Properties) { "#################################" "Name: {0}" -f $property.Name "Link: {0}" -f $property.link "LinkID: {0}" -f $prope...
combined_dataset/train/non-malicious/2023.ps1
2023.ps1
if ($IsWindows) { $typeDef = @' using System; using System.Globalization; using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Management.Automation.Host; namespace TestRunner { public class DummyHost : PSHost, IHostSupportsInterac...
combined_dataset/train/non-malicious/sample_53_89.ps1
sample_53_89.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 = '77.0.0' # Supported PSE...
combined_dataset/train/non-malicious/1317.ps1
1317.ps1
function Test-CIisConfigurationSection { [CmdletBinding(DefaultParameterSetName='CheckExists')] param( [Parameter(Mandatory=$true)] [string] $SectionPath, [Parameter()] [string] $SiteName, [Parameter()] [Al...
combined_dataset/train/non-malicious/3674.ps1
3674.ps1
function Test-CreateDatabaseCopy() { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location $database = Create-DatabaseForTest $rg $server "Standard" $copyRg = Create-ResourceGroupForTest $loc...
combined_dataset/train/non-malicious/sample_28_78.ps1
sample_28_78.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=Le module PowerShell obligatoire (FailoverClusters) est introuvable. Utilisez l'outil Rôles et fonctionnalités pour installer : Outils d'administration de serveur distant | Outils d’administration de fonctionnalités | Outils Clustering de basculement | Module Cl...
combined_dataset/train/non-malicious/sample_3_68.ps1
sample_3_68.ps1
#************************************************ # TS_ModernAppsFailureForWindDefenderCheck.ps1 # Version 1.0.1 # Date: 03/22/2013 # Author: v-alyao # Description: [Idea ID 7723] [Windows] WinStore - Modern applications fail to start if incompatible security - av software installed # Rule number: 7723 # Rule ...
combined_dataset/train/non-malicious/sample_14_99.ps1
sample_14_99.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=この名前と種類の環境変数は既に存在します。 EnvironmentErrorDoesNotExists=この名前と種類の環境変数は存在しません。 '@ # SIG # Begin signature block # MIIoOwYJKoZIhvcNAQcCoIIoLDCCKCgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBA...
combined_dataset/train/non-malicious/2620.ps1
2620.ps1
Import-Module C:\git-repositories\PowerShell\MSFVMLab\MSFVMLab.psm1 -Force $LabConfig = Get-Content C:\git-repositories\PowerShell\MSFVMLab\LabVMS.json | ConvertFrom-Json $Servers = $LabConfig.Servers $Domain = $LabConfig.Domain foreach($network in $LabConfig.Switches){ If(!(Get-VMSwitch $network.Name -ErrorAct...
combined_dataset/train/non-malicious/sample_4_4.ps1
sample_4_4.ps1
ConvertFrom-StringData @' id_ssas_collectssasregkeys=Analysis Services Registy Keys id_ssas_collectssasregkeysdesc=Collecting SQL Server Analysis Services registry keys '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC...
combined_dataset/train/non-malicious/sample_51_3.ps1
sample_51_3.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Configuration needed to configure JEA endpoint...
combined_dataset/train/non-malicious/sample_9_10.ps1
sample_9_10.ps1
#************************************************ # TS_FirewallCheck.ps1 # Version 1.0 # Date: 5-1-2012 # Author: davidcop # Description: Checks to see that the Windows Firewall service is running and set to the default start mode of Automatic on 2008/2008 R2 or higher Server #************************************...
combined_dataset/train/non-malicious/sample_35_82.ps1
sample_35_82.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AMTAccessMonitor { <# .Synopsis Returns Intel Active Management Technology access events .Description This Cmdlet returns the Intel Active Management Technology (AMT) access events from clients that have Intel Active Ma...
combined_dataset/train/non-malicious/sample_8_64.ps1
sample_8_64.ps1
Import-LocalizedData -BindingVariable Strings Function GetWin32OSFromRemoteSystem([string] $MachineName){ trap [Exception] { WriteTo-ErrorDebugReport -ErrorRecord $_ -ScriptErrorText ("[GetWin32OSFromRemoteSystem] Error contacting " + $MachineName) continue } #Obtain OS From Remote Machine and retu...
combined_dataset/train/non-malicious/sample_29_4.ps1
sample_29_4.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/2461.ps1
2461.ps1
function Get-UserCredential { [CmdletBinding()] param ( [Parameter()] [ValidateNotNullOrEmpty()] [pscredential]$Credential ) try { if (-not $PSBoundParameters.ContainsKey('Credential')) { if ((Get-KeystoreDefaultCertificate) -isnot 'System.Security.Cryptography.X509Certificates.X509Certificate2') ...
combined_dataset/train/non-malicious/sample_43_82.ps1
sample_43_82.ps1
# # Module manifest for module 'OCI.PSModules.Networkloadbalancer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Networkloadbalancer.dll' # Version number of this module. ModuleVersion = '79.0.0' # Sup...
combined_dataset/train/non-malicious/sample_25_8.ps1
sample_25_8.ps1
# Copyright (C) Intel Corporation, 2021 All Rights Reserved. function Invoke-GenerateCSR { <# .Synopsis Generates a certificate signing request based on a key from the key store. .Description This cmdlet generates a certificate signing request based on a key from the key store. .Notes AMT P...
combined_dataset/train/non-malicious/sample_44_76.ps1
sample_44_76.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_Mp...
combined_dataset/train/non-malicious/MailChimp .ps1
MailChimp .ps1
#Author: Ant B 2012 #Purpose: Batch feed recipients to MailChimp # Check for ActiveDirectory Module and load if it isn't already. if ( (Get-Module -Name ActiveDirectory -ErrorAction SilentlyContinue) -eq $null ) { Import-Module ActiveDirectory } $ie = new-object -com "InternetExplorer.Application" # V...
combined_dataset/train/non-malicious/1191.ps1
1191.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) function Init { $Global:Error.Clear() } Describe 'Test-ScheduledTask' { BeforeEach { Init } It 'should find existing task' { $task = Get-ScheduledTask | Select-Object -First 1 $task |...
combined_dataset/train/non-malicious/sample_52_0.ps1
sample_52_0.ps1
# # Module manifest for module 'Az.Advisor' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.Advisor.psm1' # Version number of this module. ModuleVersion = '2.0.1' # Supported PSEditions C...
combined_dataset/train/non-malicious/sample_27_28.ps1
sample_27_28.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" ...
combined_dataset/train/non-malicious/2949.ps1
2949.ps1
properties { $x = $null $y = $null $z = $null } task default -depends TestRequiredVariables task TestRequiredVariables ` -description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = 2; z = 3}" ` -requiredVariables x, y, z ` { }
combined_dataset/train/non-malicious/Reflection Module _1.5.ps1
Reflection Module _1.5.ps1
#requires -version 2.0 # ALSO REQUIRES Autoload for some functionality (Latest version: http://poshcode.org/3173) # You should create a Reflection.psd1 with the contents: # @{ ModuleToProcess="Reflection.psm1"; RequiredModules = @("Autoload"); GUID="64b5f609-970f-4e65-b02f-93ccf3e60cbb"; ModuleVersion="4.5.0.0" ...
combined_dataset/train/non-malicious/sample_38_91.ps1
sample_38_91.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 = '74.1.0' # Supported PSEdition...
combined_dataset/train/non-malicious/sample_39_78.ps1
sample_39_78.ps1
# # Module manifest for module 'OCI.PSModules.Secrets' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Secrets.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compat...
combined_dataset/train/non-malicious/3415.ps1
3415.ps1
function Test-RaClassicAdmins { Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" $subscription = $(Get-AzureRmContext).Subscription $classic = Get-AzureRmRoleAssignment -IncludeClassicAdministrators | Where-Object { $_.Scope -ieq ('/subscriptions/' + $subscription[0].Id...
combined_dataset/train/non-malicious/Search-CertificateStore..ps1
Search-CertificateStore..ps1
##############################################################################\n##\n## Search-CertificateStore\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\n...
combined_dataset/train/non-malicious/sample_56_76.ps1
sample_56_76.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/607.ps1
607.ps1
param( [string]$Version, [string]$Path, [switch]$Force, $Update, [switch]$Uninstall ) $Configs = @{ Url = "http://www.truecrypt.org/download/transient/130a82428b303859fcb6/TrueCrypt%20Setup%207.1a.exe" Path = "$(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)\" } $Configs | ForEach-Object{ ...
combined_dataset/train/non-malicious/Save-Credentials_4.ps1
Save-Credentials_4.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_45_61.ps1
sample_45_61.ps1
// On windows, create a .cmd file. // Read the #! in the file to see what it uses. The vast majority // of the time, this will be either: // "#!/usr/bin/env <prog> <args...>" // or: // "#!<prog> <args...>" // // Write a binroot/pkg.bin + ".cmd" file that has this line in it: // @<prog> <args...> %dp0%<target> %* cons...