filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_9_59.ps1 | ConvertFrom-StringData @'
id_devcon=Information about devices and connections
id_devconrunning=Gathering devices and connections information (devcon)
id_devconoutput=DevCon Output
id_devconoutputdesc=Devices and connections information
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzAN... | 0 |
4288.ps1 |
function Implant-Handler
{
[CmdletBinding(DefaultParameterSetName = "FolderPath")]
Param
(
[Parameter(ParameterSetName = "FolderPath", Mandatory = $false)]
[string]
$FolderPath,
[string]
$PoshPath
)
if (!$FolderPath) {
$FolderPath = Read-Host -Prompt... | 0 |
Set account password_1.ps1 | Function Set-Password {
#requires -version 2.0
<#
.Synopsis
Allows the changing of the local account password on a local or remote machine.
.Description
Allows the changing of the local account password on a local or remote machine.
.Parameter computer
Computer that the password will be changed on... | 0 |
$env_PATH permanently.ps1 | #requires -version 2
param(
[string] $AddedFolder,
[bool] $ApplyImmediately = $true
)
$environmentRegistryKey = 'Registry::HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment'
$oldPath = (Get-ItemProperty -Path $environmentRegistryKey -Name PATH).Path
# See if a n... | 0 |
1556.ps1 |
function Get-MrLeapYear2 {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline)]
[ValidateRange(1582,9999)]
[int[]]$Year = (Get-Date).Year
)
PROCESS {
foreach ($y in $Year) {
try {
if (Get-Date -Date 2/29/$y) {
W... | 0 |
sample_5_26.ps1 | ConvertFrom-StringData @'
id_ctsnps=Network Policy Server (NPS)
id_ctsnpsdescription=Collects information about Network Policy Server (NPS) [RADIUS/IAS].
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlL... | 0 |
1254.ps1 |
function Test-CIisWebsite
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$Name
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$manager = New-Object 'Microsoft.Web.Ad... | 0 |
sample_64_2.ps1 | #
# Module manifest for module 'OCI.PSModules.Globallydistributeddatabase'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Globallydistributeddatabase.dll'
# Version number of this module.
ModuleVersion =... | 0 |
sample_4_67.ps1 | ConvertFrom-StringData @'
id_dirs=Collecting Directory Output
'@
# SIG # Begin signature block
# MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDRy8kiReDoGdLC
# nmSgV1SViLYbd... | 0 |
Get-mDatastoreList.ps1 | Function Get-mDatastoreList {
#Parameter- Name of the VMware cluster to choose a datastore from.
param($Cluster)
#get alphabetically last ESX host in the VMware cluster (it's likely the last host added to the cluster, so this might smoke out any problems)
$VMH = get-vmhost -Location $cluster | Where-Object { ($_.... | 0 |
sample_51_42.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... | 0 |
sample_52_92.ps1 | #
# Module manifest for module 'OCI.PSModules.Fusionapps'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Fusionapps.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
... | 0 |
sample_45_71.ps1 | <#
.SYNOPSIS
Collect all the logs for an SRSv2 device, and place them in a zip file.
.DESCRIPTION
Create a zip file in the Rigel folder on the system drive. The zip
will contain all of the relevant application and system log files the
dev team requires for debugging. The ... | 0 |
Audit NTFS on Shares_2.ps1 | $Excel = New-Object -Com Excel.Application
$Excel.visible = $True
$Excel = $Excel.Workbooks.Add()
$wSheet = $Excel.Worksheets.Item(1)
$wSheet.Cells.item(1,1) = "Folder Path:"
$wSheet.Cells.Item(1,2) = "Users/Groups:"
$wSheet.Cells.Item(1,3) = "Permissions:"
$wSheet.Cells.Item(1,4) = "Permissions Inherited:"
... | 0 |
sample_55_31.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... | 0 |
3137.ps1 |
[CmdletBinding(DefaultParameterSetName='Decrypt')]
param (
[Parameter(
Position=0,
Mandatory=$true,
HelpMessage='String which you want to encrypt or decrypt')]
[String]$Text,
[Parameter(
Position=1,
HelpMessage='Specify which rotation you want to use (D... | 0 |
2b09949e-6005-4a68-8379-aec09cbeea8e.ps1 | function Get-EasterEastern {
Param(
[Parameter(Mandatory=$true)]
[int] $Year
)
$a = $Year % 4
$b = $Year % 7
$c = $Year % 19
$d = ((19 * $c) + 15) % 30
$e1 = -$d #here because powershell is picking up - (subtraction operator) as incorrect toekn
$e = ((2 * $a) + (4 * $b) + ... | 0 |
Findup.ps1 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using System.IO;
namespace ConsoleApplication1
{
public class FileInfoExt
{
pu... | 0 |
1792.ps1 |
Describe "Convert-Path tests" -Tag CI {
It "Convert-Path should handle provider qualified paths" {
Convert-Path -Path "FileSystem::${TestDrive}" | Should -BeExactly "${TestDrive}"
}
It "Convert-Path should return the proper path" {
Convert-Path -Path "$TestDrive" | Should -BeExactly "$Tes... | 0 |
sample_17_53.ps1 | ConvertFrom-StringData @'
id_appxregistrykeys_title=Registry Keys
id_appxregistrykeys_status=Collecting Appx Registry Keys
id_appxfiles_title=Appx Files
id_appxfiles_status=Collecting Appx Files
id_dirlistings_title=Dir Listings
id_dirlistings_status=Collecting Appx Directory Listings
id_appxdatalogs_title=Appx ... | 0 |
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... | 0 |
sample_15_87.ps1 | var plugin = require("plugin-vs-v2");
if (typeof plugin != "undefined") {
plugin.Messaging.addEventListener("pluginready", function () {
setCommonHtmlText();
});
}
function setTextContent(selector, contentKey) {
try {
var content = plugin.Resources.getString(contentKey);
document.q... | 0 |
134032f9-0687-4d0a-b267-6a42e5c116df.ps1 | #'***********************************************************************
#'* File: Check-Directory.ps1
#'* Creation Date: 2008/05/30
#'* Author: Jacob Hodges (Technology Effect)
#'* Purpose: Checks to see if an INF File is already in the MDT Workbench.
#'* Usage: .\\Create-DistributionShare.ps1 D:\\Dr... | 0 |
sample_25_20.ps1 | const VscctService = require("../../VscctService");
const removeAccents = str =>
str.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
module.exports = class ScheduledTasksFilesService extends VscctService {
/**
*
* @param {import("../ScheduledTasksService").ScheduledTaskGroup} scheduling
... | 0 |
Suspend-Process.ps1 | Add-Type -Name Threader -Namespace "" -Member @"
[Flags]
public enum ThreadAccess : int
{
Terminate = (0x0001),
SuspendResume = (0x0002),
GetContext = (0x0008),
SetContext = (0x0010),
SetInformation = (0x0020),
GetInformation = (0x0040),
SetThreadToken = (0x0... | 0 |
966.ps1 |
$rgName='MyResourceGroup'
$location='eastus'
$cred = Get-Credential -Message 'Enter a username and password for the virtual machine.'
New-AzResourceGroup -Name $rgName -Location $location
$fesubnet = New-AzVirtualNetworkSubnetConfig -Name 'MySubnet-FrontEnd' -AddressPrefix 10.0.1.0/24
$besubnet = New-AzVirtualNe... | 0 |
sample_21_90.ps1 | <#
.SYNOPSIS
Removes an entry matching the given IP address and hostname from a hosts file.
Does nothing if a matching entry is not found.
.PARAMETER Hostname
Hostname for the address/name pair which should be removed from the hosts file.
.PARAMETER HostsFilePath
(Optional) Path to the hosts ... | 0 |
Connect-VMHost_1.ps1 | #requires -version 2
#requires -pssnapin VMware.VimAutomation.Core
Function Connect-VMHost {
<#
.Summary
Used to Connect a disconnected host to vCenter.
.Parameter VMHost
VMHost to reconnect to virtual center
.Example
Get-VMHost | Where-Object {$_.state -eq "Disconnect... | 0 |
sample_1_91.ps1 | # *********************************************************************
# Version 1.0
# Date: 03-27-2012, 2021
# Author: Vinay Pamnani - vinpa@microsoft.com
# Description:
# Gets SMS, CCM and WSUS Registry Keys
# Uses Export-RegKey function (defined in utils_Shared.ps1)
# replaced _RegistryKey_ with _Reg_
# *... | 0 |
Get-OnlineHelp.ps1 | ## This is a VERY EARLY prototype of a function that could retrieve cmdlet help from TechNet ...
## and hypothetically, other online help sites which used the same format (none)
# REQUIRES the HttpRest module, to convert XHTML to XML (Uses Get-WebPageContent below)
# Otherwise I'm getting 503 errors when trying ... | 0 |
4446.ps1 | function Add-PackageSource
{
[CmdletBinding()]
param
(
[string]
$Name,
[string]
$Location,
[bool]
$Trusted
)
Write-Debug ($LocalizedData.ProviderApiDebugMessage -f ('Add-PackageSource'))
if(-not $Name)
{
return
}
$Credentia... | 0 |
sample_19_42.ps1 | #
# Module manifest for module 'OCI.PSModules.Opsi'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Opsi.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
CompatiblePS... | 0 |
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... | 0 |
sample_61_87.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... | 0 |
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 ... | 0 |
3007.ps1 | $Script:ReportStrings = DATA {
@{
HeaderMessage = @'
____ __
/ __ \___ _____/ /____ _____
/ /_/ / _ \/ ___/ __/ _ \/ ___/
/ ____/ __(__ ) /_/ __/ /
/_/ \___/____/\__/\___/_/
Pester v{0}
'@
StartMessage = "Executing all tests in '{0}'"
FilterMessage =... | 0 |
sample_9_74.ps1 | #************************************************
# DC_IPsec-Component.ps1
# Version 1.0
# Version 1.1: Altered the runPS function correctly a column width issue.
# Date: 2009-2014
# Author: Boyd Benson (bbenson@microsoft.com)
# Description: Collects information about the IPsec component.
# Called from: Main Net... | 0 |
sample_50_59.ps1 | #
# Module manifest for module 'OCI.PSModules.Psql'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Psql.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
CompatiblePS... | 0 |
sample_25_87.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 = '79.0.0'
# Supported PSE... | 0 |
sample_62_15.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 = '85.2.0'
# Supported PSEditions
... | 0 |
113.ps1 |
function Get-AuthToken {
[cmdletbinding()]
param
(
[Parameter(Mandatory=$true)]
$User
)
$userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User
$tenant = $userUpn.Host
Write-Host "Checking for AzureAD module..."
$AadModule = Get-Module -Name "AzureAD" -ListAvailable
if ($Aa... | 0 |
3563.ps1 |
$JobQueryWaitTimeInSeconds = 0
$ResourceGroupName = "E2ERg"
$VaultName = "E2ETest"
$PrimaryFabricName = "primaryFriendlyName"
$RecoveryFabricName = "IDCLAB-A147.ntdev.corp.microsoft.com"
$PolicyName = "B2APolicyTest1"
$PrimaryProtectionContainerName = "primaryFriendlyName"
$RecoveryProtectionContainerN... | 0 |
sample_51_73.ps1 | # Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1
ConvertFrom-StringData @'
###PSLOC
Troubleshoot_Title=Vianmääritys
Troubleshoot_DetectDVDDevice=Tarkistetaan DVD-laitetta...
Troubleshoot_DetectDVDvideoDecoder=Tarkistetaan videodekooderia DVD-toistoa varten...
Troubleshoot_DetectDVDAud... | 0 |
sample_44_63.ps1 | #
# Module manifest for module 'OCI.PSModules.Marketplace'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Marketplace.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEdition... | 0 |
sample_42_42.ps1 | #Copyright (C) 2020,2023 VMware, Inc. All rights reserved.
#Checking necessary modules existance
Import-Module Microsoft.PowerShell.Management
if (!(Get-Module Microsoft.PowerShell.Management)) {
Write-Error "Microsoft.PowerShell.Management module error"
exit 1
}
Import-Module Microsoft.PowerShell.U... | 0 |
sample_66_12.ps1 | function Restart-AzFunctionApp {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='RestartByName', SupportsShouldProcess=$true, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Functions.Description('Restarts a function app.')]
param(
[Parameter(ParameterSet... | 0 |
Send-MailMessage.ps1 | ##############################################################################\n##\n## Send-MailMessage\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n## Illustrate the techniques used to send an email in PowerShell.\n## In version two, use the Send-MailMessa... | 0 |
sample_63_19.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... | 0 |
sample_10_42.ps1 | #************************************************
# TS_WMIHandleLeakKB2639077.ps1
# Version 1.0.1
# Date: 7/19/2013
# Author: v-kaw
# Description: [KSE Rule] [ Windows V3] Handle leak in Svchost.exe when a WMI query is triggered by using the Win32_PowerSettingCapabilities
# Rule number: 5c139a00-370c-4d1c-a929-... | 0 |
573.ps1 |
function Add-SPOFieldsToList
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string[][]]$fields,
[Parameter(Mandatory=$true, Position=2)]
[string]$listTitle
)
foreach($field in $fields)
{
$fieldName = $field[0]
$fieldType = $field[1]
$fieldValue... | 0 |
Format-String.ps1 | ##############################################################################\n##\n## Format-String\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\nReplaces t... | 0 |
4066.ps1 |
[CmdletBinding()]
param
(
[ValidateNotNullOrEmpty()]
[string]$LogFile = 'LogonReport.csv'
)
$Entries = @()
$IPv4 = foreach ($ip in (ipconfig) -like '*IPv4*') {($ip -split ' : ')[-1]}
$DT = Get-Date
foreach ($IP in $IPv4) {
$object = New-Object -TypeName System.Management.Automation.PSObject
$object | Add-Member -... | 0 |
sample_20_63.ps1 | var state = command.getTrait("state");
var manipData = services.manipulators.getManipulatorData("CameraManipulator");
var mode = null;
if (manipData != null) {
mode = manipData.getTrait("CameraManipulationMode");
}
var tool = new Object();
tool.activate = function () {
state.value = 2;
if... | 0 |
sample_11_36.ps1 | ConvertFrom-StringData @'
id_dcdiag=Directory Server Diagnosis (DCDiag)
id_dcdiagobtaining=Running DCDIAG.EXE tool to gather domain controller status information.
id_dcdiagdnsobtaining=Running DCDIAG.EXE tool to gather domain controller DNS health information.
id_dcdiagtopologyobtaining=Running DCDIAG.EXE tool to g... | 0 |
4289.ps1 |
function C2-Viewer
{
[CmdletBinding(DefaultParameterSetName = "FolderPath")]
Param
(
[Parameter(ParameterSetName = "FolderPath", Mandatory = $false)]
[string]
$FolderPath,
[string]
$PoshPath
)
if (!$FolderPath) {
$FolderPath = Read-Host -Prompt `n'Ent... | 0 |
sample_47_7.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... | 0 |
972.ps1 |
$SubscriptionId = ''
$resourceGroupName = "myResourceGroup-$(Get-Random)"
$location = "westus2"
$adminSqlLogin = "SqlAdmin"
$password = "ChangeYourAdminPassword1"
$serverName = "server-$(Get-Random)"
$databaseName = "mySampleDatabase"
$startIp = "0.0.0.0"
$endIp = "0.0.0.0"
Set-AzContext -SubscriptionId $subsc... | 0 |
sample_34_2.ps1 | # <copyright>
# INTEL CONFIDENTIAL
#
# Copyright 2021 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and your use of
# them is governed by the express license under which they were provided to you ("License").
# Unless the License provides otherwise, you may not us... | 0 |
sample_17_56.ps1 | # Load Common Library
# Load Reporting Utilities
#_#$debug = $false
. ./utils_cts.ps1
. ./TS_RemoteSetup.ps1
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue
Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.S... | 0 |
sample_49_62.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmtraces'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmtraces.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
Co... | 0 |
204.ps1 | Function Set-SCSMMAStatus
{
[CmdletBinding()]
PARAM(
$ManualActivityID,
$Status = "Completed"
)
BEGIN
{
TRY
{
if (-not(Get-module -Name smlets))
{
Import-Module -Name smlets
}
}
CATC... | 0 |
sample_54_11.ps1 | #
# Module manifest for module 'OCI.PSModules.Loadbalancer'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Loadbalancer.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEditi... | 0 |
Add-Namespace_1.ps1 | trap [System.Management.Automation.RuntimeException]
{
$entryException = $_
if ($_.CategoryInfo.Category -eq [System.Management.Automation.ErrorCategory]::InvalidOperation)
{
if ($_.FullyQualifiedErrorId -eq "TypeNotFound")
{
$targetName = $_.CategoryInfo.TargetName
... | 0 |
1489.ps1 |
param(
)
Set-StrictMode -Version 'Latest'
& {
$originalVerbosePreference = $Global:VerbosePreference
$Global:VerbosePreference = [Management.Automation.ActionPreference]::SilentlyContinue
if( (Get-Module -Name 'Blade') )
{
Remove-Module 'Blade'
}
Import-Module -Name (Join-Path -Pat... | 0 |
sample_48_70.ps1 | # Localized PlasterResources.psd1
ConvertFrom-StringData @'
###PSLOC
DestPath_F1=Destination path: {0}
ErrorFailedToLoadStoreFile_F1=Failed to load the default value store file: '{0}'.
ErrorProcessingDynamicParams_F1=Failed to create dynamic parameters from the template's manifest file. Template-based dynamic paramet... | 0 |
Get-UserLogonLogoffScrip_1.ps1 | ##############################################################################
##
## Get-UserLogonLogoffScript
##
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
##
##############################################################################
<#
.SYNOPSIS
... | 0 |
sample_62_7.ps1 | ###########################################################
#
# 'GCArcService' module
#
###########################################################
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
Import-Module "$PSScriptRoot\ServiceHelper.psm1"
$script:GCInstallPath = "$PSScriptRoot\..\..\... | 0 |
_4.168.1.1.ps1 | function Set-IPAddress {
param( [string]$networkinterface =$(read-host "Enter the name of the NIC (ie Local Area Connection)"),
[string]$ip = $(read-host "Enter an IP Address (ie 10.10.10.10)"),
[string]$mask = $(read-host "Enter the subnet mask (ie 255.255.255.0)"),
[string]$gateway = $(read-host "Enter... | 0 |
Chassis Type.ps1 | $SystemEnclosure = Get-WMIObject -Class Win32_SystemEnclosure; $Type = $SystemEnclosure.ChassisTypes; CLS ; Write-Host -BackgroundColor White -ForegroundColor Blue "Chassis Type:"
if ($Type -eq 1)
{Write-Host "$Type - Other"}
elseif ($Type -eq 2)
{Write-Host "$Type - Virtual Machine"}
elseif ($Type -eq 3)
... | 0 |
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... | 0 |
3056.ps1 | Set-StrictMode -Version Latest
InModuleScope Pester {
Describe "Should -BeGreaterThan" {
It "passes if value greater than expected" {
2 | Should BeGreaterThan 1
2 | Should -BeGreaterThan 1
2 | Should -GT 1
}
It "fails if values equal" {
{ 3 |... | 0 |
4447.ps1 | function Get-InstalledPackage
{
[CmdletBinding()]
param
(
[Parameter()]
[string]
$Name,
[Parameter()]
[string]
$RequiredVersion,
[Parameter()]
[string]
$MinimumVersion,
[Parameter()]
[string]
$MaximumVersion
... | 0 |
sample_11_45.ps1 | Signature-Version: 1.0
SHA-256-Digest-Manifest-Main-Attributes: g/TqwshCROFJVmhV1QEn61Fg1W2Oo
tyaowJxbJy6WMI=
SHA-256-Digest-Manifest: sLmosxa9qYRSiP8Jdd0CG1edmUi8x/G3yNnagMjj5Lc=
Created-By: 1.8.0_112 (Oracle Corporation)
Name: com/microsoft/azure/toolkit/lib/appservice/webapp/WebAppServiceS
ubscription.clas... | 0 |
sample_55_63.ps1 | <#
.SYNOPSIS
Modern Standby Performance Assessment
.DESCRIPTION
Automates Modern Standby power transitions and measures entry/exit latency metrics
.PARAMETER iterations
Number of Modern Standby transitions to automate
.PARAMETER sleeptimeout_sec
Duration in seconds of the Modern Standby session
.PARAM... | 0 |
2156.ps1 |
[CmdletBinding()]
param
(
[ValidateNotNullOrEmpty()]
[string] $Path = $PSScriptRoot
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
function Test-Elevated
{
[CmdletBinding()]
[OutputType([bool])]
Param()
return (([Security.Principal.WindowsIdentity]::GetCurr... | 0 |
sample_27_24.ps1 | # <copyright>
# INTEL CONFIDENTIAL
#
# Copyright 2022 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and your use of
# them is governed by the express license under which they were provided to you ("License").
# Unless the License provides otherwise, you may not us... | 0 |
chkhash_31.ps1 | # calculate SHA512 of file.
function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider];
$hashAlgorithm = new-object $cryptoServiceProvider
$stream = $file.Open... | 0 |
Get-NestedGroups v_2.ps1 | Function Global:Get-NestedGroups {
<#
.SYNOPSIS
Enumerate all AD group memberships of an account (including nested membership).
.DESCRIPTION
This script will return the AD group objects for each group the user is a member of.
.PARAMETER UserName
The username whose group memberships to find.
.E... | 0 |
sample_25_22.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 = '75.1.0'
# Supported PSEditions
... | 0 |
sample_24_12.ps1 | $ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest
# Firewall constants
Set-Variable -Option Constant -Name TeamsExeName -Value "Teams.exe"
Set-Variable -Option Constant -Name ThirdPartyExeName -Value "ThirdParty.exe"
Set-Variable -Option Constant -Name TeamsTcpRuleName -Value... | 0 |
Invoke-AdvancedFunction..ps1 | param(\n [Parameter(Mandatory = $true)]\n [ScriptBlock] $Scriptblock\n )\n\n## Invoke the scriptblock supplied by the user.\n& $scriptblock
| 0 |
sample_67_73.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 = 'ht... | 0 |
sample_47_15.ps1 | #
# Module manifest for module 'OCI.PSModules.Osuborganizationsubscription'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osuborganizationsubscription.dll'
# Version number of this module.
ModuleVersion... | 0 |
2018.ps1 |
Describe 'Basic Job Tests' -Tags 'CI' {
BeforeAll {
Get-Job | Remove-Job -Force
$timeBeforeStartedJob = Get-Date
$startedJob = Start-Job -Name 'StartedJob' -ScriptBlock { 1 + 1 } | Wait-Job
$timeAfterStartedJob = Get-Date
function script:ValidateJobInfo($job, $st... | 0 |
3398.ps1 |
function get_all_vm_locations
{
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
{
$namespace = "Microsoft.Compute"
$type = "virtualMachines"
$location = Get-AzureRmResourceProvider -ProviderNam... | 0 |
1987.ps1 |
Describe "New-Alias DRT Unit Tests" -Tags "CI" {
It "New-Alias Constant should throw SessionStateUnauthorizedAccessException"{
New-Alias -Name "ABCD" -Value "foo" -Option "Constant" -Force:$true
$e = { New-Alias -Name "ABCD" -Value "foo" -Force:$true -Scope 1 -ErrorAction Stop } |
Should -Throw -ErrorId "Alia... | 0 |
ServicePWChgReset_1.ps1 | # ==============================================================================================
#
# NAME: ServicePWChgReset.ps1
#
# AUTHOR: Saehrig, Steven
# DATE : 8/26/2008
@@# Requires - Quest ActiveRoles Snapin
@@# COMMENT: Please read comments on each section!
# 1st - Search Domain computers for matc... | 0 |
3288.ps1 | class DiscordConnection : Connection {
[Net.WebSockets.ClientWebSocket]$WebSocket
[pscustomobject]$GatewayInfo
[string]$GatewayUrl
[bool]$Connected
[object]$ReceiveJob = $null
DiscordConnection() {
$this.WebSocket = [Net.WebSockets.ClientWebSocket]::new()
$this.WebSocket.Option... | 0 |
1179.ps1 |
& (Join-Path -Path $PSScriptRoot 'Initialize-CarbonTest.ps1' -Resolve)
Describe 'Remove-Junction' {
$JunctionPath = $null
$tempDir = Get-Item -Path 'TestDrive:'
function Invoke-RemoveJunction($junction)
{
Remove-Junction $junction
}
BeforeEach {
$Glob... | 0 |
Quest Dynamic Group 005.ps1 | <#
2012.07.06
Information will be uploaded shortly.
#>
| 0 |
sample_0_29.ps1 | ConvertFrom-StringData @'
id_proliantdl385nmicrashdump_sd=NMICrashDump is set to 1 on this HP ProLiant DL385 G5. This setting may block machine dumps via NMI to be generated.
'@
# SIG # Begin signature block
# MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEe... | 0 |
sample_4_44.ps1 | # 2023-02-24 WalterE mod Trap #we#
$startTime_AutoAdd = Get-Date
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue
Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_"
}
Write-Host -Background... | 0 |
sample_22_33.ps1 |
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licen... | 0 |
1590.ps1 |
.{
$one = @((1320,500),(990,250),(1056,250),(1188,250),(1320,125),(1188,125),(1056,250),(990,250),(880,500),(880,250),(1056,250),(1320,500),(1188,250),(1056,250),(990,750),(1056,250),(1188,500),(1320,500),(1056,500),(880,500),(880,500))
$two = @((1188,500),(1408,250),(1760,500),(1584,250),(1408,250),(1320,750),(105... | 0 |
sample_0_20.ps1 | // ==================================================================
// DCIM_SPCapacitiesConcreteCollection
// ==================================================================
[dynamic, provider("dcismprovider"),
Description(
"DCIM_SPCapacitiesConcreteCollection is a"
"trivial deriv... | 0 |
96.ps1 |
function Get-AuthToken {
[cmdletbinding()]
param
(
[Parameter(Mandatory=$true)]
$User
)
$userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User
$tenant = $userUpn.Host
Write-Host "Checking for AzureAD module..."
$AadModule = Get-Module -Name "AzureAD" -ListAvailable
if ($A... | 0 |
sample_41_48.ps1 | #
# Module manifest for module 'OCI.PSModules.Database'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Database.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
Comp... | 0 |
sample_25_67.ps1 | """
Microsoft certificate management via the PKI Client PowerShell module.
https://technet.microsoft.com/en-us/itpro/powershell/windows/pkiclient/pkiclient
The PKI Client PowerShell module is only available on Windows 8+ and Windows
Server 2012+.
https://technet.microsoft.com/en-us/library/hh848636(v=wps.620).aspx
:p... | 0 |
sample_28_18.ps1 | =연결할 수 없습니다. 캐시된 자격 증명이 만료되었거나 암호가 업데이트되었습니다. 자격 증명을 다시 입력하세요.1PowerBI 환경을 검색하는 동안 URL '%{strURL/}'에 연결하지 못했습니다.-잘못된 응답 형식으로 인해 PowerBI 백 엔드 엔드포인트 검색이 실패했습니다.CertGetNameStringW를 호출하지 못했습니다.인증서 체인의 유효성을 검사하지 못했습니다.-지문이 '%{strThumbprint/}'인 인증서 발급자를 신뢰할 수 없습니다.d이 서버 인스턴스는 SChannel 인증서(ServerSchannelTokenSignerCert)가 설정... | 0 |
1656.ps1 | function Get-MappedDrives {
param (
$computer = $env:COMPUTERNAME
)
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('Users', $computer)
$reg.GetSubKeyNames() | ? {$_ -match '\d{4,5}$'} | % {
$sid = $_
$reg.OpenSubKey("$sid\Network").GetSubKeyNames() | % {
New... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.