filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_1_56.ps1 | // ==================================================================
// DCIM_CSLogsConcreteCollection
// ==================================================================
[dynamic, provider("dcismprovider"),
Description(
"DCIM_CSLogsConcreteCollection is a"
"trivial derivation of CIM_... | 0 |
3566.ps1 | Register-ArgumentCompleter -CommandName New-AzSubscription -ParameterName OfferType -ScriptBlock {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
$values = "MS-AZR-0017P", "MS-AZR-0148P"
$values |
ForEach-Object {
[System.Management.Automation.Comple... | 0 |
Show-Fonts.ps1 | ipmo PowerBoots # Require PowerBoots
## More readable:
New-BootsWindow {
ScrollViewer {
StackPanel {
ForEach($font in (New-Object Drawing.Text.InstalledFontCollection).Families | Select -Expand Name) {
TextBlock "$font -- The brown fox (quickly) jumps over the ""lazy"" dog, 1234... | 0 |
sample_20_74.ps1 | #
# Module manifest for module 'PowerShellProTools'
#
# Generated by: Ironman Software, LLC
#
# Generated on: 3/18/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'PowerShellProTools.psm1'
# Version number of this module.
ModuleVersion = '2023.12.0'
# Supp... | 0 |
317.ps1 | function New-PSFMessageLevelModifier
{
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")]
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/New-PSFMessageLevelModifier')]
Param (
[Parameter(Mandatory = $true)]
[string]
$Na... | 0 |
sample_7_27.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... | 0 |
sample_11_61.ps1 | <##############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
###########################################################... | 0 |
Highlight-Syntax _1.0.ps1 | # Highlight-Syntax.ps1
# version 1.0
# by Jeff Hillman
#
# this script uses regular expressions to highlight PowerShell
# syntax with HTML.
param( [string] $code, [switch] $LineNumbers )
if ( Test-Path $code -ErrorAction SilentlyContinue )
{
$code = Get-Content $code | Out-String
}
$backgroundColor... | 0 |
2582.ps1 |
function Export-Xls{
$data = Get-Process | Select-Object Name, Id, WS
PS> Export-Xls $data C:\Reports\MyWkb.xlsx -WorksheetName “WS” -AppendWorksheet:$false
.EXAMPLE
PS> $data = Get-Process | Select-Object Name, Id, WS
PS> Export-Xls $data C:\Reports\MyWkb.xlsx -SheetPosition “end”
.EXAMPLE
PS> $data = Get-Process | ... | 0 |
ScheduleGPOBackups_3.ps1 | Import-Module grouppolicy
#region ConfigBlock
# What domain are we going to backup GPOs for?
$domain = "mydomain.com"
# Where are we going to store the backups?
$gpoBackupRootDir = "c:\\gpoBackups"
# As I plan to do a new backup set each month I'll setup the directory names to reflect
# the year and month in a n... | 0 |
1217.ps1 |
$user1 = $null
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve)
$user1 = Install-User -Credential (New-Credential -UserName 'CarbonTestUser1' -Password 'P@ssw0rd!') -PassThru
Describe 'Test-Identity' {
It 'should find local group' {
(Test-Identity -Name 'Adminis... | 0 |
sample_34_66.ps1 | #
# Module manifest for module 'OCI.PSModules.Budget'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Budget.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
Compatib... | 0 |
3301.ps1 |
function New-PoshBotFileUpload {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Scope='Function', Target='*')]
[cmdletbinding(DefaultParameterSetName = 'Path')]
param(
[parameter(
Mandatory,
ParameterSetName = 'Pat... | 0 |
sample_4_75.ps1 | #************************************************
# DC_SystemCollect.ps1
# Version 1.1
# Date: 2009-2019
# Author: Walter Eder (waltere@microsoft.com)
# Description: Collects additional System information and ETL Logs (tbd).
# Called from: TS_AutoAddCommands_Apps.ps1
#********************************************... | 0 |
Exch07 Snd_Rec Report.ps1 | # Get the start date for the tracking log search
$Start = (Get-Date -Hour 00 -Minute 00 -Second 00).AddDays(-1)
# Get the end date for the tracking log search
$End = (Get-Date -Hour 23 -Minute 59 -Second 59).AddDays(-1)
#Create a date for the csv file that this will get spit into
$date = get-date -Format MM-dd... | 0 |
VMware datastore graph.ps1 | if ((Test-Path REGISTRY::HKEY_CLASSES_ROOT\\OWC11.ChartSpace.11) -eq $False)
{
Write-Host "This script requires Office Web Components to run correctly, please install these from the following website: http://www.microsoft.com/downloads/details.aspx?FamilyId=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=en"... | 0 |
FixInvalidVMs.ps1 |
#======================================================================================
# File Name : FixInvalidVMs.ps1
# Original Author : Kenneth C. Mazie
# Description : Resets all "invald" or "inaccessible" virtual machines
# :
# Notes ... | 0 |
sample_9_17.ps1 | #************************************************
# TS_SymantecIPSCheck.ps1
# Version 1.0.0
# Date: 10-17-2012
# Author: Brian Prince - brianpr@microsoft.com
# Description: This script checks if Symantec Intrusion Prevention System (IPS) is installed.
# IPS is not recommended on high traffic (300+ Mbps of net... | 0 |
sample_27_12.ps1 | # Localized 08/28/2023 11:37 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1
ConvertFrom-StringData @'
###PSLOC
Troubleshoot_Title=疑难解答
Troubleshoot_DetectNetworkCache=正在检查 Windows 媒体播放器网络缓存...
Resolution_Title=分辨率
Resolution_ResetConfiguration=正在重置所有配置设置...
Resolution_ResetNetworkCache=正在重置网络缓存配置...
BinaryPat... | 0 |
Find Local Group Members_5.ps1 | # Author: Hal Rottenberg
# Purpose: Find matching members in a local group
# Used tip from RichS here: http://powershellcommunity.org/Forums/tabid/54/view/topic/postid/1528/Default.aspx
# Change these two to suit your needs
$ChildGroups = "Domain Admins", "Group Two"
$LocalGroup = "Administrators"
$MemberName... | 0 |
sample_18_86.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... | 0 |
sample_7_56.ps1 | #************************************************
# TS_ClusterXsigoDriverNetworkCheck.ps1
# Version 1.0.1
# Date: 6/5/2012
# Author: v-kaw
# Description: [Idea ID 2169] [Windows] Xsigo network host driver can cause Cluster disconnects
# Rule number: 2169
# Rule URL: http://sharepoint/sites/rules/Rule Submissi... | 0 |
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 = '... | 0 |
870.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests', ''
. "$here\$sut"
$clusterName = $ENV:ClusterName
$httpUserPassword = $ENV:HttpPassword
$securePassword = ConvertTo-SecureString $httpUserPassword -AsPlainText -Force
$creds = New-Object -... | 0 |
2903.ps1 | Framework '3.5'
task default -depends AspNetCompiler
task AspNetCompiler {
if ( $IsMacOS -OR $IsLinux ) {}
else {
aspnet_compiler
if ($LastExitCode -ne 1) {
throw 'Error: Could not execute aspnet_compiler'
}
$global:LastExitCode = 0
}
}
| 0 |
sample_16_48.ps1 | <#
.SYNOPSIS
Creates and throws an invalid argument exception.
.PARAMETER Message
The message explaining why this error is being thrown.
.PARAMETER ArgumentName
The name of the invalid argument that is causing this error to be thrown.
#>
function New-InvalidArgumentExcept... | 0 |
sample_61_94.ps1 | # clickup-pretty-tasks README
ClickUp Pretty Tasks displays tasks description and status right in the code where they are mentioned.
## Features
- Decorate task links with task status + details

- Run commands:... | 0 |
New-BootsGadget.ps1 | New-BootsGadget {
#.Synopsis
# Create desktop gadgets with no window chrome
#.Description
# Provides a wrapper for generating gadget windows with PowerBoots. It adds two parameters to the usual New-PowerBoots command: RefreshRate and On_Refresh.
#
# Gadget windows are created with AllowsTransparency, Back... | 0 |
1399.ps1 |
function ConvertTo-CSecurityIdentifier
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
$SID
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
try
{
if( $SID -is [string] )
... | 0 |
1793.ps1 |
Describe "Rename-Item tests" -Tag "CI" {
BeforeAll {
Setup -f originalFile.txt -content "This is content"
$source = "$TESTDRIVE/originalFile.txt"
$target = "$TESTDRIVE/ItemWhichHasBeenRenamed.txt"
Setup -f [orig-file].txt -content "This is not content"
$sourceSp = "$TestDri... | 0 |
1776.ps1 |
Describe "Get-Credential Test" -tag "CI" {
BeforeAll {
$th = New-TestHost
$th.UI.StringForSecureString = "This is a test"
$th.UI.UserNameForCredential = "John"
$rs = [runspacefactory]::Createrunspace($th)
$rs.open()
$ps = [powershell]::Create()
$ps.Runspace ... | 0 |
sample_62_52.ps1 | #
# Module manifest for module 'PowerShellProTools'
#
# Generated by: Ironman Software, LLC
#
# Generated on: 7/11/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'PowerShellProTools.psm1'
# Version number of this module.
ModuleVersion = '2024.7.0'
# Suppo... | 0 |
sample_24_58.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
function Find-Ast {
<#
.EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml
#>
[CmdletBinding(PositionalBinding=$false, DefaultParameterSetName='FilterScript')]
param(
[Parameter(Position=0, ParameterSe... | 0 |
sample_8_66.ps1 | ConvertFrom-StringData @'
id_printspooleroldsplshd_sd=Orphaned print jobs were detected in Spooler folder and this may affect printing performance
'@
# SIG # Begin signature block
# MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG... | 0 |
4053.ps1 |
param([string]$path=$(throw 'You must provide a path to a file to export the commands to.'))
gcm -type Alias, Function, Filter, Cmdlet, ExternalScript | Sort CommandType, Name | Export-Clixml $path | 0 |
sample_16_47.ps1 | function trySetDesignerProp(tname, ttype, val) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0);
trait.value = val;
// services.debug.trace(tname + "=" + val);
}
if (command.getTrait("state").value == 0) {
command.getTrait("state").value = 2;
trySetDesignerProp("showEm... | 0 |
sample_57_46.ps1 | # Localized 06/28/2023 08:21 AM (GMT) 303:7.0.30723 rs_resetidledisktimeout.psd1
ConvertFrom-StringData @'
###PSLOC
reset_DiskIdleTimeout=Rétablissement du délai d’inactivité du disque
Report_name_DiskIdleTimeout_AC_result=Résultat du rétablissement du délai d’inactivité du disque pour le courant alternatif
Repor... | 0 |
TruncatePath_3.ps1 | ###
# TruncatePath
# Version 1.0.6 (05 Nov 2008)
# Description: Replaces long provider paths in the prompt with ellipses
# Notes: Place in your profile
#
# By Mike Hays, http://www.mike-hays.net
###
$maxPathLength = 40
$showFullPath = $false
Function Prompt
{
$currentPath = (Get-Location).Path
... | 0 |
1299.ps1 |
function Uninstall-CService
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string]
$Name,
[timespan]
$StopTimeout
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdl... | 0 |
3049.ps1 | function Should-FileContentMatch($ActualValue, $ExpectedContent, [switch] $Negate, $Because) {
$succeeded = (@(& $SafeCommands['Get-Content'] -Encoding UTF8 $ActualValue) -match $ExpectedContent).Count -gt 0
if ($Negate) {
$succeeded = -not $succeeded
}
$failureMessage = ''
if (-not ... | 0 |
sample_52_93.ps1 | ## Copyright (c) Microsoft Corporation. All rights reserved.
<#
.SYNOPSIS
This cmdlet collects a performance recording of Microsoft Defender Antivirus
scans.
.DESCRIPTION
This cmdlet collects a performance recording of Microsoft Defender Antivirus
scans. These performance recordings contain Microsoft-Antimal... | 0 |
sample_29_53.ps1 | RefreshAllDataAndFormatRefreshAllDataAndFormatrķcupĶrelesvaleursdesdonnķeslesplusrķcentesÓpartirduserveurWebd'IBMCognosetmetÓjourcesvaleursdansledocument,leclasseuroulaprķsentationMicrosoftOfficeencours.SyntaxeLesystĶmedoitĻtreconnectķauserveurWebd'IBMCognos.VķrifiezquelapropriķtķMķthodedemiseÓjourd'invitedel'ongletGķr... | 0 |
Create random strings.ps1 | # ===============================================================
# / Author: Marcus L. Farmer
# / Script: createRandomStrings.ps1
# / Date: 2-04-2009
# / Purpose: generate psedorandomly generated strings for passwords or other uses
# / Usage: ./createRandomStrings.ps1
# / Reqs.: none
... | 0 |
sample_50_47.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 = '83.2.0'
# Supported PSEdition... | 0 |
f86998a1-d0da-4204-b566-a9031310d3f9.ps1 | ################################################################################################################
#
# NAME
# Copy-Data
#
# SYNOPSIS
# Copy Data between Folders including a Progressbar
#
# SYNTAX
# Copy-Data [Source <PathToSource>] [Destination <PathToDestination>] [-Confirm] [-Recu... | 0 |
sample_64_43.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
param (
[Parameter(Manda... | 0 |
305.ps1 | function Get-PSFDynamicContentObject
{
[OutputType([PSFramework.Utility.DynamicContentObject])]
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Get-PSFDynamicContentObject')]
Param (
[Parameter(Mandatory = $true)]
[string[]]
$Name
)
begin
{
}
process
{
foreach... | 0 |
1896.ps1 |
Describe "ConvertTo-Xml DRT Unit Tests" -Tags "CI" {
BeforeAll {
class fruit {
[string] $name;
}
$customPSObject = [PSCustomObject]@{ "prop1" = "val1"; "prop2" = "val2" }
$newLine = [System.Environment]::NewLine
}
It "Can convert to XML with parameter Depth" ... | 0 |
sample_48_58.ps1 | #########################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# Localized PackageManagement.Resources.psd1
#
#########################################################################################
ConvertFrom-StringDa... | 0 |
sample_2_50.ps1 | #************************************************
# DC_KIR-RBC-RegEntries.ps1
# Version 1.0
# Date: 2020
# Author: + Walter Eder (waltere@microsoft.com)
# Description: Collects KIR (for 2019) and RBC (for 2016) Registry Entries
# Called from: TS_AutoAddCommands_*.ps1
#*******************************************... | 0 |
sample_24_90.ps1 | const ALIAS = Symbol.for('yaml.alias');
const DOC = Symbol.for('yaml.document');
const MAP = Symbol.for('yaml.map');
const PAIR = Symbol.for('yaml.pair');
const SCALAR = Symbol.for('yaml.scalar');
const SEQ = Symbol.for('yaml.seq');
const NODE_TYPE = Symbol.for('yaml.node.type');
const isAlias = (node) => !!node && typ... | 0 |
sample_34_35.ps1 | Rem AnimationEncyclopedia.vbs
Rem An InDesign VBScript
Rem
Rem Author: Brenda Burden
Rem Creates a 6-page sample doc demonstrating the new InDesign Animation feature
Rem Search Reference
Rem PAGE ONE - Sample of Animation Properties
Rem PAGE TWO - Sample of all Animation Events
Rem PAGE THREE - Sample ... | 0 |
sample_17_88.ps1 | #=======================================================================================================================================================================
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# Description:
#
# ModifyProxySettings.ps1 - To be used by the installer - Mo... | 0 |
Set-PowerGUIWelcomePage_3.ps1 | ########################################################
# Modifies the default PowerGUI admin console
# welcome screen to the mht file you supply
# Details available at:
# http://dmitrysotnikov.wordpress.com/2009/02/11/rebranding-powergui-console/
########################################################
# Usage... | 0 |
Get-PDC09Videos.ps1 | #requires -version 2.0
PARAM (
[Parameter(Position=1, Mandatory=$true)]
[ValidateSet("wmv","wmvhigh","ppt")] # the "mp4" files aren't there yet
[String]$MediaType,
[string]$Destination = $PWD
)
Import-Module BitsTransfer
$Extension = $(switch -wildcard($MediaType){"wmv*"{"wmv"} "mp4"{"mp4"} "pp... | 0 |
8c9f21a1-4924-4551-ae6d-1fc52d7751a4.ps1 | ####################################################################################################
## Write-Sitemap.ps1
##
## Generates a basic Sitemap for your website, based on a list of locations / products or whatever,
## (depending on your requirements). Can easily be extended to create more complex Sitemaps... | 0 |
4165.ps1 |
Set-Variable -Name Errors -Value $null -Scope Global -Force
Set-Variable -Name RelativePath -Scope Global -Force
Set-Variable -Name Title -Scope Global -Force
Function ConsoleTitle ($Title){
$host.ui.RawUI.WindowTitle = $Title
}
Function DeclareGlobalVariables {
$Global:Title = "Windows Management Framework 4.0"... | 0 |
Beginner event 10 _1.ps1 | #
# Summer 2009 Scripting games
# Beginner Event 10 - The 1,500-Meter race
# http://blogs.technet.com/heyscriptingguy/archive/2009/06/18/hey-scripting-guy-2009-scripting-games-event-10-details-beginner-and-advanced-1-500-meter-race.aspx
#
# ToDo: In this event, you must write a script that will count down from th... | 0 |
sample_33_55.ps1 | #
# Module manifest for module 'OCI.PSModules.Ospgateway'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ospgateway.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
... | 0 |
732.ps1 |
function New-RsDataSource
{
[cmdletbinding()]
param
(
[Alias('Destination', 'ItemPath', 'Path')]
[Parameter(Mandatory = $True)]
[string]
$RsFolder,
[Parameter(Mandatory = $True)]
[string]
$Name,
[string]
$Description,... | 0 |
3117.ps1 |
function Remove-TrustedHost
{
[CmdletBinding(DefaultParameterSetName='TrustedHost', SupportsShouldProcess=$true, ConfirmImpact="High")]
param(
[Parameter(
ParameterSetName='TrustedHost',
Position=0,
Mandatory=$true)]
[String[]]$TrustedHost,
... | 0 |
set-localpwd_1.ps1 | # Sets local account passwords on one or more computers
# usage [computerName1,computerName2,... | ] ./set-localpwd.ps1 [-user] <userName> [-password] <password> [[-computers] computerName1,computerName2,...]
param(
[string] $User
, [string] $Password
, [string[]] $ComputerNames = @()
)
$ComputerNames ... | 0 |
sample_5_35.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 = '92.1.0'
# Supported PSEditions
... | 0 |
sample_60_27.ps1 | #
# Module manifest for module 'GCArcService'
#
# Generated by: Microsoft
#
# Generated on: 08/09/2020
#
@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'GCArcService.psm1'
# Version number of this module.
ModuleVersion = '1.0'
# ID used to uniquely identify... | 0 |
224.ps1 | function Get-HelpMessage
{
[CmdletBinding()]
[Alias('HelpMsg')]
PARAM($Id)
[ComponentModel.Win32Exception] $id
} | 0 |
sample_63_37.ps1 | #
# Module manifest for module 'OCI.PSModules.Clusterplacementgroups'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Clusterplacementgroups.dll'
# Version number of this module.
ModuleVersion = '84.0.0'
... | 0 |
4029.ps1 |
function Test-GetDa
{
$assignments = Get-AzDenyAssignment
Assert-NotNull $assignments
Assert-True { $assignments.Length -ge 1 }
}
function Test-GetDaById
{
$id = '22704996-fbd0-4ab1-8625-722d897825d2'
$assignments = Get-AzDenyAssignment -Id $id
Assert-NotNull $assignme... | 0 |
505.ps1 |
function Enable-InternetExplorerEnhancedSecurityConfiguration{
[CmdletBinding()]
param(
)
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37... | 0 |
2530.ps1 | param(
$SqlServerOne = 'YourDatabaseServer',
$FirstDatabase = 'FirstDatabaseToCompare',
$SqlUsernameOne = 'SQL Login',
$SqlPasswordOne = 'SQL Password',
$SqlServerTwo = 'YourDatabaseServer',
$SecondDatabase = 'SecondDatabaseToCompare',
$SqlUsernameTwo = 'SQL Login',
$SqlPasswordTwo = 'SQL Password',
$FilePr... | 0 |
sample_50_8.ps1 | #
# Module manifest for module 'OCI.PSModules.Jms'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Jms.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_33_18.ps1 | function trySetDesignerProp(tname, ttype, val) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0);
trait.value = val;
// services.debug.trace(tname + "=" + val);
}
if (command.getTrait("state").value == 0) {
command.getTrait("state").value = 2;
trySetDesignerProp("snap",... | 0 |
2872.ps1 |
Task default -depends CheckDetailedDocs
Task CheckDetailedDocs {
$NL = [System.Environment]::NewLine
$docArray = @(Invoke-psake .\nested\docs.ps1 -detailedDocs -nologo | Out-String -Stream -Width 120)
$docString = (($docArray | Foreach-Object Trim) -join $NL).Trim()
$expectedDoc = @"
Name : Co... | 0 |
1738.ps1 | param(
[Parameter(HelpMessage='ReleaseTag from the job. Set to "fromBranch" or $null to update using the branch name')]
[string]$ReleaseTag,
[Parameter(HelpMessage='The branch name used to update the release tag.')]
[string]$Branch=$env:BUILD_SOURCEBRANCH,
[Parameter(HelpMessage='The variable nam... | 0 |
713.ps1 |
function Out-RsRestFolderContent
{
[CmdletBinding()]
param (
[Parameter(Mandatory = $True, ValueFromPipeline = $true)]
[string]
$RsFolder,
[ValidateScript({ Test-Path $_ -PathType Container})]
[Parameter(Mandatory = $True)]
[string]
$Destination,... | 0 |
sample_7_23.ps1 | #
# Module manifest for module 'OCI.PSModules.Dataflow'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dataflow.dll'
# Version number of this module.
ModuleVersion = '92.1.0'
# Supported PSEditions
Comp... | 0 |
Invoke-RickRoll.ps1 | function Invoke-RickRoll {
<#
.SYNOPSIS
Invoke-RickRoll
A RickRoll PowerShell Script :)
Authors: Chris Campbell (@obscuresec)
License: BSD 3-Clause
.DESCRIPTION
A script to call IE and send it to a URL.
.PARAMETER VideoURL
Specifies a URL to send IE to.
.EXAMPLE
... | 0 |
sample_37_9.ps1 | #
# Module manifest for module 'OCI.PSModules.Identity'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identity.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Comp... | 0 |
sample_67_65.ps1 | <#
This example demonstrates working with various resources in Database Service.
This example requires:
1) Modules OCI.PSModules.Database,OCI.PSModules.Identity,OCI.PSModules.Core. Install the modules from Powershell Gallery.
2) Setting up the environment variable CompartmentId to a Compartment OCID.
#>
$UserErrorActi... | 0 |
4381.ps1 | function New-ModuleSourceFromPackageSource
{
param
(
[Parameter(Mandatory=$true)]
$PackageSource
)
$moduleSource = Microsoft.PowerShell.Utility\New-Object PSCustomObject -Property ([ordered]@{
Name = $PackageSource.Name
SourceLocation = $PackageSource.Location
... | 0 |
sample_54_59.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 = @(... | 0 |
Test-Certificate_1.ps1 | #####################################################################
# Test-Certificate.ps1
# Version 0.9
#
# Tests specified certificate for certificate chain and revocation
#
# Vadims Podans (c) 2009
# http://www.sysadmins.lv/
#####################################################################
#requires -... | 0 |
Get-ExchangeDBSizes_3.ps1 | <#
.SYNOPSIS
Get-ExchangeDBSizes - Gather data on Exchange 2007 / 2010 Mailbox Databases.
.DESCRIPTION
Gathers data from Exchange mailbox servers.
These data include:
Server\\StorageGroup\\Database (2007) or Database (2010),
Total Size (in GB) of the disk,
Size of the .edb file (in GB),
... | 0 |
sample_48_49.ps1 | #
# Module manifest for module 'OCI.PSModules.Dashboardservice'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dashboardservice.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported... | 0 |
Add-FormatTableIndexPara.ps1 | ##############################################################################\n##\n## Add-FormatTableIndexParameter\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPS... | 0 |
4441.ps1 | function Uninstall-Package
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]
$fastPackageReference
)
Write-Debug -Message ($LocalizedData.ProviderApiDebugMessage -f ('Uninstall-Package'))
Write-Debug -Message ($Localize... | 0 |
2645.ps1 | function Export-SQLDacPacs{
param([string[]] $Instances = 'localhost',
[string] $outputdirectory=([Environment]::GetFolderPath("MyDocuments"))
)
$sqlpackage = (get-childitem C:\ -Recurse | Where-Object {$_.name -eq 'sqlpackage.exe'} |Sort-Object LastWriteTime | Select-Object -First 1).... | 0 |
sample_67_51.ps1 | import{Z as s}from"./index-Dc-kSG0m.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
* Released under the MIT license
* https://github.com/microsoft/monaco-edit... | 0 |
56.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" -L... | 0 |
Test-WebDAV_3.ps1 | function Test-WebDav ()
{
param ( $Url = "$( throw 'URL parameter is required.')" )
$xhttp = New-Object -ComObject msxml2.xmlhttp
$xhttp.open("OPTIONS", $url, $false)
$xhttp.send()
if ( $xhttp.getResponseHeader("DAV") ) { $true }
else { $false }
}
| 0 |
sample_16_2.ps1 | #************************************************
# DC_Setup_AppCompat.ps1
# Version 1.0
# Date: 2009-2019
# Author: Walter Eder (waltere@microsoft.com)
# Description: Collects additional AppCompat information.
# Called from: TS_AutoAddCommands_Setup.ps1
#*******************************************************
... | 0 |
sample_25_98.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_50_91.ps1 | ConvertFrom-StringData @'
EnvironmentErrorAlreadyExists=An environment variable of this name and type already exists.
EnvironmentErrorDoesNotExists=An environment variable of this name and type does not exist.
'@
# SIG # Begin signature block
# MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# ... | 0 |
1706.ps1 | Function Test-ServiceNowURL {
[OutputType([System.Boolean])]
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$Url
)
begin {}
process {
Write-Verbose "Testing url: $Url"
if ($Url -match '^\w+\..*\.\w+') {
... | 0 |
sample_66_64.ps1 | [CmdletBinding()]
Param(
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
[string[]]$BuildArguments
)
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference =... | 0 |
sample_9_50.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 |
sample_17_97.ps1 | #
# Module manifest for module 'OCI.PSModules.Emwarehouse'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Emwarehouse.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEdition... | 0 |
sample_54_17.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
param (
[Parameter(Manda... | 0 |
549.ps1 |
function Switch-SPOEnableDisableSolution
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string]$solutionName,
[Parameter(Mandatory=$true, Position=2)]
[bool]$activate
)
$solutionId = Get-SPOSolutionId -solutionName $solutionName
$operation = ""
if($activate)... | 0 |
sample_20_85.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 = '73.1.0'
# Supported PSEdi... | 0 |
sample_52_28.ps1 |
///////////////////////////////////////////////////////////////////////////////
// Helper to set a designer prop
///////////////////////////////////////////////////////////////////////////////
function setDesignerProp(tname, ttype, tvalue) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.