filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_34_34.ps1 | #!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
$pathsep=":"
$env_node_path=$env:NODE_PATH
$new_node_path="C:\practice\demo\quick-reference\node_modules\.pnpm\node_modules"
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux ... | 0 |
4228.ps1 |
Function Get-LocAdm
{
$DirSearcher = New-Object -TypeName DirectoryServices.DirectorySearcher -ArgumentList ([ADSI]'')
$DirSearcher.Filter = '(objectClass=computer)'
$Computers = $DirSearcher.Findall()
Foreach ($Computer in $Computers)
{
$Path = $Computer.Path
$Name = ([ADSI]"$Path"... | 0 |
finddupe_21.ps1 | 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
try
{
$stream = $file.OpenRead()
}
... | 0 |
sample_59_54.ps1 | #
# Module manifest for module 'OCI.PSModules.Artifacts'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Artifacts.dll'
# Version number of this module.
ModuleVersion = '85.1.0'
# Supported PSEditions
Co... | 0 |
1421.ps1 |
function Clear-CDscLocalResourceCache
{
[CmdletBinding()]
param(
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
Get-WmiObject msft_providers |
Where-Object {$_.provider -like 'dsccore'} |
Select-Object ... | 0 |
sample_25_44.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_26_89.ps1 | # Localized 12/03/2020 06:20 PM (GMT) 303:4.80.0411 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=&Ja
PromptNoString=&Nein
BundleFound=Bundle gefunden: {0}
PackageFound=Paket gefunden: {0}
EncryptedBundleFound=Verschlüsseltes Bundle gefunden: {0}
EncryptedPackag... | 0 |
sample_59_78.ps1 | LMetoda se ne može izvršiti kada je onemogućena pohrana s više snimki stanja.oZahtjev je ograničen, previše zahtjeva za ažuriranje izvora podataka koje pokreće korisnik u kratkom razdoblju.pNema dovoljno dozvola za osvježavanje tablice u načinu rada Direct Lake, obratite se autoru ovog skupa podataka.Nije moguće zadrž... | 0 |
sample_26_68.ps1 | #
# Module manifest for module 'OCI.PSModules.Opa'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Opa.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_11_77.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 |
sample_23_10.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 = '82.0.0'
# Supported PSEditions
CompatiblePS... | 0 |
1026.ps1 |
$endpoint = 'mysftestcluster.southcentralus.cloudapp.azure.com:19000'
$thumbprint = '2779F0BB9A969FB88E04915FFE7955D0389DA7AF'
$packagepath="C:\Users\sfuser\Documents\Visual Studio 2017\Projects\MyApplication\MyApplication\pkg\Release"
Connect-ServiceFabricCluster -ConnectionEndpoint $endpoint `
-KeepAlive... | 0 |
Shell.ShellLink.ps1 | ## With thanks to Steve McMahon and his article:
## http://vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp
##
## After executing Add-Type, below, you'll be able to:
## new-object Shell.ShellLink ".\\Some Shortcut.lnk"
Add-Type -Ref System.Drawing, System.Wind... | 0 |
ConvertTo-Hex_8.ps1 | # Ported from C# technique found here: http://forums.asp.net/p/1298956/2529558.aspx
param ( [string]$SidString )
# Create SID .NET object using SID string provided
$sid = New-Object system.Security.Principal.SecurityIdentifier $sidstring
# Create a byte array of the proper length
$sidBytes = New-Object byte[] ... | 0 |
Pomodoro Module.ps1 | #PomoDoro Module (make sure its a PS1)
#12-3-2011 Karl Prosser
#example
#import-module C:\\amodule\\Pomodoro.psm1 -force
#Start-Pomodoro -ShowPercent -Work "coding" -UsePowerShellPrompt
#future todos
# -limit , a number (by default 0 meaning forever) that will only run the pomodoro that many times
# -Confi... | 0 |
2964.ps1 | properties {
$testMessage = 'Executed Test!'
$compileMessage = 'Executed Compile!'
$cleanMessage = 'Executed Clean!'
}
task default -depends Test
task Test -depends Compile, Clean {
$testMessage
}
task Compile -depends Clean {
$compileMessage
}
task Clean {
$cleanMessage
}
task ? -Description "Helper t... | 0 |
sample_36_97.ps1 | #
# Module manifest for module 'OCI.PSModules.Servicecatalog'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Servicecatalog.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSE... | 0 |
sample_15_47.ps1 | #
# Module manifest for module 'OCI.PSModules.Aidocument'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aidocument.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
... | 0 |
Get-Tree.ps1 | #.Synopsis
# Creates a fir tree in your console!
#.Description
# A simple christmas tree simulation with (optional) flashing lights.
# Requires your font be set to a True Type font (best results with Consolas).
#.Parameter Trim
# Whether or not to trim the tree. NOTE: In violation of convention, this switch ... | 0 |
1875.ps1 |
Describe "Stream writer tests" -Tags "CI" {
$targetfile = Join-Path -Path $TestDrive -ChildPath "writeoutput.txt"
function Write-Messages
{
[CmdletBinding()]
param()
Write-Verbose "Verbose message"
Write-Debug "Debug message"
}
Context "Redirect Stre... | 0 |
sample_50_56.ps1 | let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl();
let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/docker.webCore.eventHandlers.js"];
let currentScriptElement = document.querySelector("script[src='Scripts/docker.webCore.plugin.js']");
if (currentScriptElement !== nu... | 0 |
1154.ps1 |
$username = 'CarbonRemoveUser'
$password = 'IM33tRequ!rem$'
function Start-Test
{
& (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Start-Test
{
net user $username $password /add
}
function Stop-Test
{
if( Test-User -Username $username )
{
... | 0 |
4224.ps1 | function Invoke-WScriptBypassUAC
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True)]
[string]
$payload
)
function Local:Get-TempFileName {
$sTempFolder = $env:Temp
$sTempFolder = $sTempFolder + "\"
$sTempFileName = [System.IO.Path]::Get... | 0 |
Check latest BIOS Rev_2.ps1 | $BiosRev = Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName -Credential $Credentials
# Shortened URL for the Dell Support page, fileid=441102, appears to be the identifier for BIOS downloads
# I tested this on a few different models of Dell workstations.
$DellBIOSPage = "http://support.dell.com/suppor... | 0 |
sample_44_84.ps1 | function Clear-WACEVEventLogChannel {
<#
.SYNOPSIS
Clear the event log channel specified.
.DESCRIPTION
Clear the event log channel specified.
The supported Operating Systems are Window Server 2012, Windows Server 2012R2, Windows Server 2016.
.ROLE
Administrators
#>
Param(
[string]$channel
)
... | 0 |
Delete Empty Folders.ps1 | $Drive = Read-Host "Path to Folders"
Write-Host "This will delete all empty folders in this directory!"
$a = Get-ChildItem $drive -recurse | Where-Object {$_.PSIsContainer -eq $True}
$a | Where-Object {$_.GetFiles().Count -lt 1} | Select-Object FullName | ForEach-Object {remove-item $_.fullname -recurse}
Write-Hos... | 0 |
sample_32_43.ps1 | #
# Module manifest for module 'OCI.PSModules.Bastion'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Bastion.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSEditions
Compat... | 0 |
1715.ps1 | function Get-ServiceNowUserGroup{
[OutputType([System.Management.Automation.PSCustomObject])]
[CmdletBinding(DefaultParameterSetName, SupportsPaging)]
Param(
[Parameter(Mandatory = $false)]
[string]$OrderBy = 'name',
[Parameter(Mandatory = $false)]
[Validat... | 0 |
sample_45_3.ps1 | #
# Script module for module 'Az.ArcResourceBridge' that is executed when 'Az.ArcResourceBridge' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 04/23/2024 13:01:39
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
... | 0 |
234.ps1 | function Remove-PSObjectEmptyOrNullProperty
{
PARAM (
$PSObject)
PROCESS
{
$PsObject.psobject.Properties |
Where-Object { -not $_.value } |
ForEach-Object {
$PsObject.psobject.Properties.Remove($_.name)
}
}
} | 0 |
2697.ps1 | function Get-Member
{
[CmdletBinding(DefaultParameterSetName = 'Default')]
Param (
[Parameter(ValueFromPipeline=$true, ParameterSetName = 'Default')]
[Parameter(ValueFromPipeline=$true, ParameterSetName = 'Private')]
[System.Management.Automation.PSObject]
$InputObject,
... | 0 |
McAfeeAPI_01Connect.ps1 | #region << ePO Connection and Initialization >>
function McAfee-Connect{
param([String]$script:ServerURL="SERVERNAME:8443")
$c = McAfee-Credential
$script:wc = McAfee-WebClient -Credential $c
}
function McAfee-Credential{
$c = Get-Credential -Credential $null
return $c
}
function McAfee-WebClient{
... | 0 |
3223.ps1 |
Describe 'New-PoshBotInstance' {
BeforeAll {
$VerbosePreference = 'SilentlyContinue'
$PSDefaultParameterValues = @{
'New-PoshBotInstance:Verbose' = $false
}
$script:backend = New-PoshBotSlackBackend -Configuration @{Token = (New-Guid).ToString(); Name = 'Test-Backend'}
... | 0 |
38.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 -N... | 0 |
1785.ps1 |
Describe "PSDiagnostics cmdlets tests." -Tag "CI", "RequireAdminOnWindows" {
BeforeAll {
$LogType = 'Analytic'
$OriginalDefaultParameterValues = $PSDefaultParameterValues.Clone()
if (-not $IsWindows) {
$PSDefaultParameterValues["it:skip"] = $true
}
else{
... | 0 |
2006.ps1 |
$script:TestSourceRoot = $PSScriptRoot
Describe "Test suite for validating automounted PowerShell drives" -Tags @('Feature', 'Slow', 'RequireAdminOnWindows') {
BeforeAll {
$powershell = Join-Path -Path $PsHome -ChildPath "pwsh"
$AutomountVHDDriveScriptPath = Join-Path $script:TestSourceRoot 'Au... | 0 |
sample_61_34.ps1 | #
# Script module for module 'Az.Compute' that is executed when 'Az.Compute' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 07/31/2024 06:54:55
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
{
... | 0 |
3648.ps1 |
function Test-CreateServer
{
$rg = Create-ResourceGroupForTest
$serverName = Get-ServerName
$version = "12.0"
$serverLogin = "testusername"
$serverPassword = "t357ingP@s5w0rd!"
$credentials = new-object System.Management.Automation.PSCredential($serverLogin, ($serverPassword | ConvertTo-Secur... | 0 |
sample_33_86.ps1 | #
# This script handles common telemetry tasks for Install.ps1 and Add-AppDevPackage.ps1.
#
function IsVsTelemetryRegOptOutSet()
{
$VsTelemetryRegOptOutKeys = @(
"HKLM:\SOFTWARE\Policies\Microsoft\VisualStudio\SQM",
"HKLM:\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM",
"HKLM:\S... | 0 |
4195.ps1 |
[CmdletBinding()]
param
(
[string]
$MemberExclusionsFile = 'MemberExclusions.txt',
[switch]
$OutputFile,
[string]
$OutputFileLocation = '',
[switch]
$SCCMReporting,
[string]
$SystemExclusionsFile = 'SystemExclusions.txt'
)
function Get-RelativePath {
[CmdletBinding()][OutputType([string])]
param ()
... | 0 |
sample_27_46.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-Acl", "Set-Acl", "Get-PfxCertific... | 0 |
1613.ps1 |
$file = "c:\temp\redditposh.csv"
$errorlog = "c:\temp\redditposherrors.txt"
if (!(Test-Path $file)) {
'title,link,time' | Set-Content $file
}
$last = ipcsv $file
$to =
$From = 'address@gmail.com'
$SMTPServer = 'smtp.gmail.com'
$SMTPPort = '587'
$pw = 'password' | ConvertTo-SecureString -AsPlainText -Force
$c... | 0 |
741.ps1 |
function Write-RsFolderContent
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')]
param(
[switch]
$Recurse,
[Parameter(Mandatory = $True)]
[string]
$Path,
[Alias('DestinationFolder')]
[Parameter(Mandatory = $True)]
... | 0 |
3210.ps1 |
[CmdletBinding()]
param(
[switch]$Install,
[ValidateSet("Debug", "Release")]
[string]$Configuration = (property Configuration Release),
[ValidateSet("net461", "netcoreapp2.1")]
[string]$Framework
)
Import-Module "$PSScriptRoot/tools/helper.psm1"
$targetDir = "bin/$Configuration/... | 0 |
sample_58_50.ps1 | <div align="center">
<img style="width: 200px;height: 200px;" src="./logo.jpg" alt="icon"/>
<h1 align="center">Pure GPT</h1>
[English](./README.md) / 简体中文
</div>
与纯粹的 chatGPT 对话!
使用 `@pure_gpt` 与 chatGPT 开始对话。

## 设计初衷
Copilot 确实是一款革命性的 AI 生产力工具, 背靠 VSCode 团队几十年的 IDE 研发经验, 其无论是在功能的完善程度, 还是... | 0 |
Server checks.ps1 | ##Creates variable for filename
$date = (get-date).tostring("yyyy-MM-dd")
$filename = "H:\\dailychecks\\checks_$date.xls"
## Imports exchange modules
Import-Module "\\\\emailserver\\c$\\PS Modules\\vamail.videoarts.info.psm1"
## Start Internet Explorer to check that Video Arts website is up
Start-Proces... | 0 |
sample_49_15.ps1 | #
# Module manifest for module 'OCI.PSModules.Jmsjavadownloads'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Jmsjavadownloads.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported... | 0 |
2301.ps1 | param ([string]$Computername,[string]$GroupName,[string]$Username)
$group = [ADSI]"WinNT://$Computername/$GroupName,group"
$group.Add("WinNT://$Computername/$Username,user") | 0 |
sample_41_76.ps1 | ##------------------------------------------------------------------
## <copyright file="GMATenantJsonHelper.psm1" company="Microsoft">
## Copyright (C) Microsoft. All rights reserved.
## </copyright>
##------------------------------------------------------------------
## Import ObservabilityGMAEventSource
... | 0 |
Logging AD logins.ps1 | #* FileName: loginTime.ps1
#*=============================================================================
#* Created: [09/25/2009]
#* Author: Alan Oakland
#*=============================================================================
#* Purpose: Create a log of login times.
#*===================================... | 0 |
sample_15_15.ps1 | #
# Module manifest for module 'OCI.PSModules.Managementdashboard'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Managementdashboard.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Sup... | 0 |
finddupe_2.ps1 | write-host "Usage: finddupe.ps1 <directory1> <directory2> ... <directoryN>"
function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvider];
$hashAlgorithm = new-object $cr... | 0 |
Start-Verify_1.ps1 | # Author: Steven Murawski http://www.mindofroot.com
# This script creates two functions (and a helper function). One starts logging all commands entered,
# and the second removes the logging.
# This script is similar to the Start-Transcript, but only logs the command line and not the output.
# Added ";" before t... | 0 |
sample_45_73.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
function Set-ScriptExtent {
<#
.EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml
#>
[CmdletBinding(PositionalBinding = $false, DefaultParameterSetName = '__AllParameterSets')]
param(
[Parameter(Posit... | 0 |
62334bcd-6366-4c6e-b6ae-220d2a0dc2f5.ps1 | ## Tab-Completion
#################
## Please dot souce this script file.
## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list.
## What this can do is:
##
## [datetime]::n<tab>
## [datetime]::now.d<tab>
## $a = New-Object "Int32[,]" 2,3; $b = "PowerShell","PowerShe... | 0 |
Get-Parameter_14.ps1 | #Requires -version 2.0
##This is just script-file nesting stuff, so that you can call the SCRIPT, and after it defines the global function, it will call it.
param (
[Parameter(Position=1,ValueFromPipelineByPropertyName=$true,Mandatory=$true)]
[string[]]$Name
,
[Parameter(Position=2,ValueFromPipelineByPr... | 0 |
Import-NmapXML_1.ps1 | #Requires -Version 2.0
function Import-NmapXML
{
####################################################################################
#.Synopsis
# Parse XML output files of the nmap port scanner (www.nmap.org).
#
#.Description
# Parse XML output files of the nmap port scanner (www.nmap.org) and ... | 0 |
sample_28_58.ps1 | #
# Module manifest for module 'OCI.PSModules.Integration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Integration.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEdition... | 0 |
565.ps1 |
function Add-SPODocumentLibrary
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string]$listTitle
)
Add-SPOList -listTitle $listTitle -templateType "DocumentLibrary"
}
| 0 |
863.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests', ''
. "$here\$sut"
$httpUserPassword = $ENV:HttpPassword
$location = $ENV:Location
$securePassword = ConvertTo-SecureString $httpUserPassword -AsPlainText -Force
$loginCreds = New-Object ... | 0 |
sample_40_62.ps1 | #
# Module manifest for module 'OCI.PSModules.Threatintelligence'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Threatintelligence.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Suppo... | 0 |
2583.ps1 |
Import-Module SqlServer
Import-Module Pscx
$sql = "PSQLRPT24"
$db = "PA_DMart"
$DirectoryToSaveTo='e:\Dexma\Logs\'
if (!(Test-Path -path "$DirectoryToSaveTo"))
{
New-Item "$DirectoryToSaveTo" -type directory | out-null
}
$filename = $DirectoryToSaveTo + "Test File.xlsx"
if (test-path $filename) { rm $filename } ... | 0 |
sample_51_82.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apach... | 0 |
foreach-withexception_1.ps1 | function foreach-withexception ([scriptblock]$process,$outputexception)
{
begin { $global:foreachex = @() }
process {
try
{
$local:inputitem = $_
&$process
}
catch
{
$local:exceptionitem = 1 | select-object... | 0 |
sample_38_73.ps1 | #########################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# Localized PSGet.Resource.psd1
#
#########################################################################################
ConvertFrom-StringData @'
###PSL... | 0 |
Users_Contacts from CSV_2.ps1 | #=============================================================================#
#=============================================================================#
#=============================================================================#
#
# SCRIPT : CreateOrUpdateUsersOrContacts.ps1
# LAST UPDATE : 9/18/2009... | 0 |
sample_17_77.ps1 | #************************************************
# TS_ClusterValidationTests.ps1
# Version 1.0.1
# Date: 07-24-2009
# Author: Andre Teixeira - andret@microsoft.com
# Hacked by Jacques Boulet - jaboulet@microsoft.com - 2019-02-21
# Description: This script is used to obtain cluster validation report.
# ... | 0 |
sample_23_4.ps1 | #
# Module manifest for module 'OCI.PSModules.Devops'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Devops.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Compatib... | 0 |
sample_34_58.ps1 | #
# Module manifest for module 'Az.PolicyInsights'
#
# Generated by: Microsoft Corporation
#
# Generated on: 03/27/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.PolicyInsights.psm1'
# Version number of this module.
ModuleVersion = '1.6.5'
# Supported... | 0 |
3150.ps1 |
[CmdletBinding()]
param(
)
Begin{
}
Process{
}
End{
}
| 0 |
sample_67_7.ps1 | param(
[Parameter(Mandatory = $true)] [string] $logPath,
[Parameter(Mandatory = $true)] [string] $tmpPath,
[Parameter(Mandatory = $true)] [boolean] $isUpdate
)
function timestamp() {
Get-Date -Format "yyyy-MM-dd HH:mm:ss"
}
try {
# set error action
$ErrorActionPreference = "SilentlyContinue"... | 0 |
sample_44_42.ps1 | #
# Module manifest for module 'OCI.PSModules.Dataintegration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dataintegration.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported P... | 0 |
sample_15_23.ps1 | # ---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------------------------... | 0 |
powershell ise config_1.ps1 | <configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0" />
<process>
<rollForward enabled="false" />
</process>
</startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
| 0 |
Start-RDP_2.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_35_16.ps1 | # Localized 04/14/2024 08:54 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=예(&Y)
PromptNoString=아니요(&N)
BundleFound=찾은 번들: {0}
PackageFound=찾은 패키지: {0}
EncryptedBundleFound=암호화된 번들 찾음: {0}
EncryptedPackageFound=암호화된 패키지 찾음: {0}
Certificat... | 0 |
2682.ps1 |
Param(
[string]$Environment
)
begin
{
Clear-Host
$path = Split-Path -parent $MyInvocation.MyCommand.Definition
if ($env:PSModulePath -notlike "*$path\Modules\TriadModules\Modules*")
{
"Adding ;$path\Modules\TriadModules\Modules to PSModulePath" | Write-Debug
$env:PSModulePath += ";$path\Modules\TriadModu... | 0 |
2527.ps1 |
function New-CodeSigningCertificate {
[CmdletBinding()]
param(
[Security.Cryptography.X509Certificates.X500DistinguishedName]$Subject = "CN=PowerGUI User",
[ValidateSet(1024,2048)]
... | 0 |
sample_58_61.ps1 | #
# Module manifest for Dell Command | PowerShell Provider 'DellBIOSProvider'
#
# Generated by: Dell BizClient Team
#
# Generated on: 4/30/2014
#
@{
# Script module or binary module file associated with this manifest
RootModule = 'DellBIOSProviderX86.dll'
# Version number of this module.
ModuleVersion ... | 0 |
4094.ps1 | cls
Function AutoCAD2013English{
Set-Variable -Name GUID -Value "{5783F2D7-B001-0000-0102-0060B0CE6BBA}" -Scope Local -Force
Set-Variable -Name Arguments -Scope Local -Force
Write-Host "AutoCAD 2013 - English"
$Arguments = "/X"+[char]32+$GUID+[char]32+"/qb- /norestart"
(Start-Process -FilePath "msiexec.exe" -... | 0 |
691.ps1 | function Get-ShouldProcessTargetWmi
{
[CmdletBinding()]
Param (
[AllowNull()]
[object]
$BoundParameters,
[string]
$Target
)
if ($BoundParameters["ComputerName"])
{
$Server = $BoundParameters["ComputerName"]
}
elseif ([Microso... | 0 |
sample_44_96.ps1 | #
# Module manifest for module 'OCI.PSModules.Appmgmtcontrol'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Appmgmtcontrol.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSE... | 0 |
sample_53_96.ps1 | param (
[string]$WorkDir,
# [bool]$ModifyAllCaptions = $true
[string]$strModifyAllCaptions = "false"
)
if ($strModifyAllCaptions -eq "true") {
$ModifyAllCaptions = $true
}
else {
$ModifyAllCaptions = $false
}
$CreateJson = $PSScriptRoot + "\Create-Json.ps1"
$WorkDir = $WorkDir... | 0 |
sample_20_23.ps1 | ConvertFrom-StringData @'
EnvironmentErrorAlreadyExists=Proměnná prostředí s tímto názvem a typem už existuje.
EnvironmentErrorDoesNotExists=Proměnná prostředí s tímto názvem a typem neexistuje.
'@
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGs... | 0 |
sample_11_35.ps1 | data _system_translations
{
ConvertFrom-StringData @'
# Fallback text
# Copy all the strings in the psd1 file here
msg_ad_forest = SMB Delegation cmdlets require the Active Directory forest to be in Windows Server 2012 forest functional level.
msg_ad_cmdlets = SMB Delegation cmdlets r... | 0 |
Demo-ShouldProcess.ps1 | [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="Medium")]
param([Switch]$Force)
$RejectAll = $false;
$ConfirmAll = $false;
foreach($file in ls) {
if($PSCmdlet.ShouldProcess( "Removed the file '$($file.Name)'",
"Remove the file '$($file.Name)'?",
... | 0 |
sample_40_72.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmconfig'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmconfig.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
Co... | 0 |
1262.ps1 |
function Test-CDscTargetResource
{
[CmdletBinding()]
[OutputType([bool])]
param(
[Parameter(Mandatory=$true)]
[hashtable]
$TargetResource,
[Parameter(Mandatory=$true)]
[hashtable]
$DesiredResource,
[Parameter(Mandatory=$true)]... | 0 |
2197.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[string]$SiteServer,
[parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelin... | 0 |
2.ps1 |
$global:GitPromptSettings = [PoshGitPromptSettings]::new()
$global:GitPromptValues = [PoshGitPromptValues]::new()
$s = $global:GitPromptSettings
if ($Host.UI.RawUI.BackgroundColor -eq [ConsoleColor]::DarkMagenta) {
$s.LocalDefaultStatusSymbol.ForegroundColor = 'Green'
$s.LocalWorkingStatusSymbol.Foreground... | 0 |
177.ps1 | function Send-Email
{
[CmdletBinding(DefaultParameterSetName = 'Main')]
param
(
[Parameter(ParameterSetName = 'Main',
Mandatory = $true)]
[Alias('EmailTo')]
[String[]]$To,
[Parameter(ParameterSetName = 'Main',
Mandatory = $true)]
[Alias('EmailFrom', 'FromAddress')]
[String]$From,
[Par... | 0 |
1939.ps1 |
$ps = Join-Path -Path $PsHome -ChildPath "pwsh"
Describe "Set-PSBreakpoint DRT Unit Tests" -Tags "CI" {
$scriptFileName = Join-Path $TestDrive -ChildPath breakpointTestScript.ps1
$scriptFileNameBug = Join-Path -Path $TestDrive -ChildPath SetPSBreakpointTests.ExposeBug154112.ps1
$contents = @"
funct... | 0 |
3863.ps1 |
$dll = dir | Where-Object {$_.Name -match "Peering.Test.dll"} | % {$_.FullName};
[Reflection.Assembly]::LoadFile($dll);
$ipGenerator = New-Object Microsoft.Azure.Commands.Peering.Test.ScenarioTests.IPGenerator;
function TestSetup-CreateResourceGroup
{
$resourceGroupName = getAssetName "MockRg"
Wri... | 0 |
SharePoint UserID grab_1.ps1 | ## .\\SharePoint_Users_Read.ps1 "http://some.urlname.com/" "User Information List" ""
## .\\SharePoint_Users_Read.ps1 "http://some.urlname.com/" "User Information List" "user, someone"
param(
[string] $rqurdstrPath = $(Throw "--SharePoint Core Path required."), #required parameter
[string] $rqurdstrListName = $(T... | 0 |
sample_63_34.ps1 | #
# Module manifest for module 'OCI.PSModules.Governancerulescontrolplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Governancerulescontrolplane.dll'
# Version number of this module.
ModuleVersion =... | 0 |
sample_7_57.ps1 | ConvertFrom-StringData @'
id_ctsfirewallrunningcheck=Windows Firewall Running check
id_ctsfirewallrunningcheckdescription=Verify the Windows Firewall service is running
id_firewallrunningcheckdesc=The Windows Firewall service is not running
id_firewallstartmodecheckdesc=The Windows Firewall start mode is not set to... | 0 |
sample_25_88.ps1 | # region Generated
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | 0 |
993.ps1 | Param(
[parameter(Mandatory=$true)]
$SubscriptionId,
[parameter(Mandatory=$true)]
$VaultName,
[parameter(Mandatory=$true)]
$ConfigurationServer,
[parameter(Mandatory=$true)]
$CsvOutput
)
class ProtectableItemInfo
{
[string]$Machine
[string]$ProtectionStatus
}
$currentContext = ... | 0 |
sample_16_95.ps1 | #
# Module manifest for module 'OCI.PSModules.Waf'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Waf.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
3314.ps1 | function Slap {
[cmdletbinding()]
param(
[parameter(Mandatory)]
$Bot,
[parameter(Mandatory, Position = 0)]
[string] $User,
[parameter(Position = 1)]
[string] $Object
)
$objects = @{
trout = @{
item = 'large trout'
thu... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.