filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
Reset-Tray_1.ps1
function Reset-Tray { Add-Type -Assembly UIAutomationClient $Window = Add-Type -Name ([char[]](65..90 | Get-Random -count 10) -join "") -Member @" [DllImport("user32")] public static extern IntPtr PostMessage(IntPtr hWnd, UInt32 Msg, Int32 wParam, Int32 lParam); public static void SendMouseMove(...
0
1213.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) Describe 'System.Diagnostics.Process' { It 'processes have ParentProcessID' { $parents = @{} Get-WmiObject Win32_Process | ForEach-Object { $parents[$_.ProcessID] = $_.ParentProcessID } ...
0
Get-ADGroupMembers_5.ps1
Function Get-ADGroupMembers { <# .SYNOPSIS Return a collection of users in an ActiveDirectory group. .DESCRIPTION This function returns an object that contains all the properties of a user object. This function works for small groups as well as groups in ex...
0
sample_34_68.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Out-CurrentFile { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding()] param( [Switch]$AsNewFile, [Parameter(ValueFromPipeline, Mandatory = $true)] $...
0
sample_42_27.ps1
<# .SYNOPSIS Demonstrates how to write a command that works with paths that do not allow wildards but must 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 does not ...
0
sample_59_47.ps1
function EnsureAdminPrivileges([String]$mesageOnError) { $identity = [Security.Principal.WindowsIdentity]::GetCurrent() $principal = new-object Security.Principal.WindowsPrincipal $identity if (!($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) { Write-Error $m...
0
sample_53_79.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Microsoft.PowerShell.Management\Get-Item function:Clear-Host | Microsoft.PowerShell.Management\Set-Item function:__clearhost function Clear-Host { [Alias('cls')] param() __clearhost if ($host.Runspace.LanguageMode -eq ...
0
sample_15_97.ps1
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2014, and others # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) Set-StrictMode -Version 2.0 $ErrorActionPreference = "Stop" Function Set-Attr($obj, $name, $value) { <# .SYNOPSIS Helper f...
0
sample_25_11.ps1
/////////////////////////////////////////////////////////////////////////////// // Helper to set a designer prop /////////////////////////////////////////////////////////////////////////////// function setDesignerProp(tname, ttype, tvalue) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)...
0
sample_14_50.ps1
# # Module manifest for module 'OCI.PSModules.Nosql' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Nosql.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compatible...
0
play-note(s).ps1
function Play-Notes { $defaultduration = 5;if($args[0] -is [int]) {$defaultduration = $args[0]} for($i = 0;$i -lt $args.length;$i++) { $duration = $defaultduration if ($i -lt $args.length-1) { if ($args[$i+1] -is [int]) {$duration = $args[$i+1] } } if ($args[$i] -is [string]) { play-note $args[$...
0
3254.ps1
class Backend : BaseLogger { [string]$Name [string]$BotId [Connection]$Connection [hashtable]$Users = @{} [hashtable]$Rooms = @{} [System.Collections.ArrayList]$IgnoredMessageTypes = (New-Object System.Collections.ArrayList) [bool]$LazyLoadUsers = $false Backend() {} ...
0
Get-Field_2.ps1
function Get-Field{ [CmdletBinding()] param ( [Parameter(Position=0,Mandatory=$true,ValueFromPipeline=$true)] $InputObject, [Parameter(Position=1,Mandatory=$false)] [string]$Name, [switch]$Force, [switch]$AsHashtable ) $publicNonPublic = [Reflection.BindingFlags]::Public -bor [Reflection...
0
sample_22_81.ps1
# Localized 05/08/2024 05:10 AM (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
sample_61_85.ps1
# # Copyright 2018-2024 HP Development Company, L.P. # All Rights Reserved. # # NOTICE: All information contained herein is, and remains the property of HP Development Company, L.P. # # The intellectual and technical concepts contained herein are proprietary to HP Development Company, L.P # and may be cove...
0
sample_28_95.ps1
# # Module manifest for module 'OCI.PSModules.Certificates' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificates.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditi...
0
sample_55_35.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 = '85.2.0' # Supported PSEditions Compatib...
0
sample_55_88.ps1
function Invoke-ALTestRunner { Param( [Parameter(Mandatory=$false)] [ValidateSet('All','Codeunit','Test')] [string]$Tests = 'All', [Parameter(Mandatory=$false)] [string]$FileName = '', [Parameter(Mandatory=$false)] [int]$SelectionStart = 0, [Parameter(...
0
3938.ps1
function Check-CmdletReturnType { param($cmdletName, $cmdletReturn) $cmdletData = Get-Command $cmdletName; Assert-NotNull $cmdletData; [array]$cmdletReturnTypes = $cmdletData.OutputType.Name | Foreach-Object { return ($_ -replace "Microsoft.Azure.Commands.Network.Models.","") ...
0
3300.ps1
function New-PoshBotCardResponse { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Scope='Function', Target='*')] [cmdletbinding()] param( [ValidateSet('Normal', 'Warning', 'Error')] [string]$Type = 'Normal', [switch]$DM, ...
0
sample_43_3.ps1
function Initialize-AzDataProtectionRestoreRequest { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.IAzureBackupRestoreRequest')] [CmdletBinding(PositionalBinding=$false, DefaultParameterSetName='AlternateLocationFullRecovery')] [Microsoft.Azure.PowerShell.Cmdlets.DataPro...
0
sample_13_23.ps1
#************************************************ # TS_InfoCacheLevelCheck.ps1 # Version 1.0 # Date: 1-2-2012 # Author: v-anecho # Description: If you are experiencing slow logons or slow enumeration of shares, the InfoCacheLevel registry value may resolve the issue. #*********************************************...
0
2272.ps1
function Validate-OS { $ProductType = Get-WmiObject -Namespace "Root\CIMV2" -Class Win32_OperatingSystem | Select-Object -ExpandProperty ProductType if ($ProductType -eq 3) { Load-Form } else { if ($ProductType -eq 2) { $ShellObject = New-Object -ComObject Wscript.Shell $PopupValid...
0
4063.ps1
$LastInfection = get-winevent -filterhashtable @{ logname = 'system'; ID = 1116 } -maxevents 1 -ErrorAction SilentlyContinue $LastScan = Get-WinEvent -FilterHashtable @{ logname = 'system'; ProviderName = 'Microsoft Antimalware'; ID = 1001 } -MaxEvents 1 If ($LastScan.TimeCreated -lt $LastInfection.TimeCreated) { ...
0
Get-StaticMethodDefin_1.ps1
#Steven Murawski #http://blog.usepowershell.com #03/20/2009 #Examples: # get-staticmethoddefinition max math # [math] | get-staticmethoddefinition max function Get-StaticMethodDefinition() { param ([string[]]$Method, [Type]$Type=$null) BEGIN { if ($Type -ne $null) { $Type | Get-StaticMethodDe...
0
sample_48_31.ps1
# # Module manifest for module 'OCI.PSModules.Containerengine' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerengine.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported P...
0
sample_44_81.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
Get-InstalledProgram.ps1
function Get-InstalledProgram() { param ( [String[]]$Computer, $User ) ############################################################################################# if ($User -is [String]) { $Connection = Get-Credential -Credential $User } #####################################################################...
0
sample_51_54.ps1
# # Module manifest for module 'OCI.PSModules.Waas' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waas.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePS...
0
4292.ps1
function Invoke-SQLiteBulkCopy { [cmdletBinding( DefaultParameterSetName = 'Datasource', SupportsShouldProcess = $true, ConfirmImpact = 'High' )] param( [parameter( Position = 0, Mandatory = $true, ValueFromPipeline = $fals...
0
Write-FileInfoToSQL.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Chad Miller ### </Author> ### <Description> ### Reports data model directories and bool value as to whether they have ### an htm file of the same name as the project directory. ### </Description> ### <U...
0
sample_58_79.ps1
# # Module manifest for module 'OCI.PSModules.Loadbalancer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loadbalancer.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditi...
0
Ayth.ps1
# ======================================================================== # # Microsoft PowerShell Source File -- Created with PowerShell Plus Professional # # NAME: Disable-MassMailPF.ps1 # # AUTHOR: Darrin Henshaw , Ignition IT Canada Ltd. # DATE : 8/13/2008 # # COMMENT: Used to disable mail on an impo...
0
PWD Expiration Email.ps1
#Active Directory Group Name To Be Edited #Load Active Directory Module if(@(get-module | where-object {$_.Name -eq "ActiveDirectory"} ).count -eq 0) {import-module ActiveDirectory} # get domain maximumPasswordAge value $MaxPassAge = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge.days if($MaxPassAge -le ...
0
sample_14_44.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PackageManagement.Resources.psd1 # ######################################################################################### ConvertFrom-StringDa...
0
551.ps1
function Open-SPOSite { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$relativeUrl ) Write-Host "Go to site $relativeUrl" -foregroundcolor black -backgroundcolor yellow [string]$newSiteUrl = Join-SPOParts -Separator '/' -Parts $rootSiteUrl, $relativeUrl $new...
0
sample_16_87.ps1
ConvertFrom-StringData @' id_whoamioutput=Whoami Diagnostic Tool id_whoamistatus=Running Whoami.exe to gather the user's SID, group memberships and privileges '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w...
0
2388.ps1
function Get-ChefConfigItem { [CmdletBinding()] param ( [Parameter()] [ValidateNotNullOrEmpty()] [string]$Name ) $line = Get-Content -Path $ConfigFilePath | where { $_ -match $Name } if ($line) { foreach ($l in $line) { [pscustomobject]@{ 'Name' = $l.Split(' ')[0].Trim() 'Value' = ($l....
0
sample_60_24.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PackageManagement.Resources.psd1 # ######################################################################################### ConvertFrom-StringDa...
0
sample_10_4.ps1
@{ GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Get-Credential", "Get-ExecutionPolicy", "Set-E...
0
sample_19_62.ps1
<# .SYNOPSIS Turns on WinRM service and adds the IP address for the given machine to the WinRM TrustedHosts file. .PARAMETER HyperVmName The name of the computer to register remote management for (i.e. your TestVM/DevVm). The first valid IPv4 address for this machine will be discovered and added to t...
0
sample_54_16.ps1
# # Module manifest for module 'OCI.PSModules.Visualbuilder' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Visualbuilder.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdi...
0
sample_20_67.ps1
<######################################################################################################### # File: Run-Task.ps1 # # .DESCRIPTION # # Run powershell scripts using scheduled task. It requires two pre-defined variables ($taskName and $script). # # Copyright (c) Microsoft Corp 2016. # ##...
0
1888.ps1
Describe "Object cmdlets" -Tags "CI" { Context "Group-Object" { It "AsHashtable returns a hashtable" { $result = Get-Process | Group-Object -Property ProcessName -AsHashTable $result["pwsh"].Count | Should -BeGreaterThan 0 } It "AsString returns a string" { ...
0
sample_20_41.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservice.dll' # Version number of this module. ModuleVersion = '73.1.0' # Sup...
0
sample_60_76.ps1
#Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
0
sample_30_72.ps1
# These Pester tests are for the for parameter-* and ex-path* snippets. # Take a look at the .vscode\tasks.json file to see how you can create # and configure a test task runner that will run all the Pester tests # in your workspace folder. # To run these Pester tests, press Ctrl+Shift+T or press Ctrl+Shift+P, #...
0
1072.ps1
Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) Describe 'Test-Group' { It 'should check if local group exists' { $groups = Get-Group try { $groups | Should -Not -BeNullOrEmpty $groups | ...
0
8b815eb7-c620-4159-b0fc-435ceeca036b.ps1
# Add the Active Directory bits and not complain if they're already there Import-Module ActiveDirectory -ErrorAction SilentlyContinue # set default password # change pass@word1 to whatever you want the account passwords to be $defpassword = (ConvertTo-SecureString "pass@word1" -AsPlainText -force) # Get domain...
0
sample_67_22.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Extension Tools # #Requires -Version 4.0 # ######################################################################################### add-type @" usi...
0
ESXiMgmt module sample 2.ps1
####################################################################################################################### # File: ESXiMgmt_machines_poweron_sample.ps1 # # Author: Alexander Petrovskiy ...
0
Get-Tree_1.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
FuncionInfo.types.ps1xml.ps1
<?xml version="1.0" encoding="utf-8" ?> <Types> <Type> <Name>System.Management.Automation.FunctionInfo</Name> <Members> <ScriptProperty> <Name>Verb</Name> <GetScriptBlock> if ($this.Name.Contains("-")) { $this.Name.Substring(0,$this.Name.Indexof("-")) } else { $null ...
0
2605.ps1
$json = (Get-Content .\dss_test1.js) -join "`n" | ConvertFrom-Json for($i=2;$i -le 10;$i++){ $jsonout = $json $jsonout.entries.patient.dssID = "T$i" $jsonout.entries.patient.firstName = "DSS $i" $jsonout.entries.patient.lastName = 'Test' $jsonout.entries.patient.email = "dsstest$i@gmail.com" $j...
0
1592.ps1
function Get-Header { param ( [string]$path, [int]$bits = 4 ) $path = Resolve-FullPath $path try { $HeaderAsHexString = New-Object System.Text.StringBuilder [Byte[]](Get-Content -Path $path -TotalCount $bits -Encoding Byte -ea Stop) | % { if...
0
sample_54_54.ps1
########################################################### # # 'ServiceHelper' module # ########################################################### $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest $global:GCServiceName = "GCService" $script:GCServiceBinaryName = "gc_service.exe" $script:GC...
0
sample_25_77.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 License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
sample_62_59.ps1
# # Module manifest for module 'Azs.Deployment.Worksheet' # # Generated by: Microsoft Corporation # # Generated on: 10/30/2018 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Azs.Deployment.Worksheet.psm1' # Version number of this module. ModuleVers...
0
sample_38_88.ps1
# # Module manifest for module 'OCI.PSModules.Computeinstanceagent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computeinstanceagent.dll' # Version number of this module. ModuleVersion = '82.0.0' # S...
0
3211.ps1
using namespace System.Management.Automation using namespace System.Management.Automation.Language Import-Module PSReadLine Set-PSReadLineOption -EditMode Emacs Set-PSReadLineOption -HistorySearchCursorMovesToEnd Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward Set-PSReadLineKeyHandle...
0
1427.ps1
function Test-CUncPath { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Path ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState ([Uri]$Path).IsUnc }
0
map network drive.ps1
# map2_gps_prod.ps1 # Maps a network drive using PowerShell # # # # $Drive = "O:" $UNC = "\\\\ampwcsqlsvr2\\nam401k" cls # if the drive exists just remove it if (((New-Object -Com WScript.Network).EnumNetworkDrives() | Where-Object ` {$_ -eq $Drive})) { # true remove drive # Create the C...
0
sample_10_95.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
1522.ps1
function Assert-CEqual { param( [Parameter(Mandatory=$true,Position=0)] [string] $Expected, [Parameter(Mandatory=$true,Position=1)] [string] $Actual, [Parameter(Mandatory=$true,Position=2)] [string] ...
0
sample_32_53.ps1
# # Module manifest for module 'OCI.PSModules.Vault' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vault.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Compatible...
0
vibackup linux script.ps1
Param ( $viServer, $bakVM, $lxDest, ) #region check if (!$viServer) { $viServer = Read-Host -Prompt "VI Server " } if (!$bakVM) { $bakVM = Read-Host -Prompt "VM to Backup " } if (!$lxDest) { $lxDest = Read-Host -Prompt "Backup Path (ex. /srv/backup) " } #endregion #region globalvars $encoding = "OEM" ...
0
sample_58_42.ps1
# # Module manifest for module 'DscInstall' # # Generated by: Zia Jalali # # Generated on: 07/31/2017 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'Heartbeat.psm1' # Version number of this module. ModuleVersion = '1.1' # ID used to uniquely identify thi...
0
sample_30_19.ps1
# # Module manifest for module 'OCI.PSModules.Globallydistributeddatabase' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Globallydistributeddatabase.dll' # Version number of this module. ModuleVersion =...
0
8796ba7c-730c-45aa-ac56-3b561a1149d2.ps1
# Copyright (c) 2011 Code Owls LLC, All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, copy, mod...
0
sample_44_82.ps1
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise.msi'; if ([Environment]::Is64BitProcess) { $url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromebetastandaloneenterprise64.msi' } Write-Host "Downloading Google Chrome Beta" $wc = New-Object net.webcl...
0
The Letter Diamond.ps1
## Write a program which draws a diamond of the form illustrted ## below. The letter which is to appear at the widest point of the ## figure (E in the example) is to be specified as the input data. ## A ## B B ## C C ## D D ## E E ## D D ## ...
0
sample_21_45.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 = '79.0.0' # Supported PSEditions Compat...
0
sample_44_88.ps1
# # Module manifest for module 'OCI.PSModules.Workrequests' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Workrequests.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditi...
0
sample_51_3.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Configuration needed to configure JEA endpoint...
0
sample_4_32.ps1
#************************************************ # DC_CollectSqllogs.ps1 # Version 1.0.0 # Date: 10-2011 # # Description: # Collects SQL Server errorlogs and SQL Server Agent logs for all installed instances passed to script via the $Instances parameter # Can operate in "offline" mode where errorlog files ...
0
1904.ps1
Describe "Debug-Runspace" -tag "CI" { BeforeAll { $rs1 = [runspacefactory]::CreateRunspace() $rs1.Open() $rs1.Name = "MyRunspace1" $rs2 = [runspacefactory]::CreateRunspace() $rs2.Open() $rs2.Name = "MyRunspace2" } AfterAll { if ( $rs1 ) { $rs1.Dispos...
0
sample_58_71.ps1
# # Module manifest for module 'OCI.PSModules.Bds' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Bds.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions CompatiblePSEd...
0
4208.ps1
Function Brute-LocAdmin { param($Username) Function Test-LocAdminCred { Param($username, $password) $computer = $env:COMPUTERNAME Add-Type -assemblyname System.DirectoryServices.AccountManagement $DS = New-Object System.DirectoryServices.AccountManagement.PrincipalContext([System.Direct...
0
Start-Demo 3.3.2.ps1
## Start-Demo.ps1 ################################################################################################## ## This is an overhaul of Jeffrey Snover's original Start-Demo script by Joel "Jaykul" Bennett ## ## I've switched it to using ReadKey instead of ReadLine (you don't have to hit Enter each time) ## ...
0
sample_29_67.ps1
# # Module manifest for module 'OCI.PSModules.Mediaservices' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEdi...
0
UIAutomation 1.9.ps1
## UI Automation v 1.8 -- REQUIRES the Reflection module (current version: http://poshcode.org/3174 ) ## # 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.Invo...
0
sample_63_16.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditi...
0
sample_62_75.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 = '86.0.0' # Supported PSEditions Compatib...
0
sample_51_27.ps1
# # Module manifest for module 'OCI.PSModules.Servicemesh' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicemesh.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdition...
0
sample_28_19.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_19_54.ps1
#************************************************ # Function.ps1 # Version 1.0.0 # Date: 03-01-2012 # Author: Wilson Souza - wsouza@microsoft.com # Description: This script contains functions used by others ps1 files #************************************************ Import-LocalizedData -BindingVariable ScriptSt...
0
792.ps1
[CmdletBinding(DefaultParameterSetName="NamedPipe")] param( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $HostName, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $HostProfileId, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] ...
0
DHCP Backup_1.ps1
Import-Module ActiveDirectory param ( [Parameter(Position=1)] $searchBase = "cn=configuration,dc=domain,dc=com", [Parameter(Position=2)] $backupDestRoot = "\\\\network\\share\\" ) function Get-OnlineDhcpServers { param ( [Parameter(Mandatory=$true,Position=1)] $dhcpSear...
0
sample_43_55.ps1
function Test-AzDataProtectionBackupInstanceRestore { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.IOperationJobExtendedInfo')] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Valida...
0
sample_33_46.ps1
/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-------------...
0
sample_38_51.ps1
# escape=` # This Dockerfile will only build on Docker for Windows. # # If you change dependencies etc here, please also check and update # the other Windows build resources: # # - DEVELOPER_GUIDE.md "Windows" section # - appveyor.yml # - .github/workflows/call-build-windows.yaml # - dockerfiles/Dockerfile.windows # ...
0
sample_59_10.ps1
# Helper functions to be used across resources Function New-DellEventLog{ [CmdletBinding()] param( [Parameter (Mandatory=$false)][System.string] $LogName="DellClientBIOS PowerShell", [Parameter (Mandatory=$false)][System.string] $SourceName="DellBIOSProvider DSC" ) $Cust...
0
3732.ps1
function Test-ProfileCrud { $profileName = getAssetName $resourceGroup = TestSetup-CreateResourceGroup $relativeName = getAssetName try { $createdProfile = New-AzTrafficManagerProfile -Name $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -RelativeDnsName $relativeName -Ttl 50 -T...
0
Logger.psm1 0.2.ps1
<# Name : Universal Log4Net Logging Module (Logger.psm1) Version : 0.2 Author : Joel Bennett (MVP) Site : http://www.HuddledMasses.org/ Version History: 0.2 - Configless release. Now configures with inline XML, and supports switches to create "reasonable" default loggers ...
0
sample_63_69.ps1
# # Module manifest for module 'OCI.PSModules.Certificates' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificates.dll' # Version number of this module. ModuleVersion = '89.0.0' # Supported PSEditi...
0
sample_61_40.ps1
- Backport https://github.com/ostreedev/ostree/pull/3205/commits/e47b37096343efa3bea8295f3f44c4dc90cc04e2 - https://github.com/ostreedev/ostree/releases/tag/v2024.4 - https://github.com/ostreedev/ostree/releases/tag/v2024.3 Resolves: #RHEL-19419 - https://github.com/ostreedev/ostree/releases/tag/v2024.2 - https://g...
0
sample_19_81.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# .Synopsis Group Policy tools use administrative template files (.admx, .adml) to populate policy settings in the user interface. This allows administrators to manage registry-based policy settings. This script installes Powe...
0
sample_2_25.ps1
# # Module manifest for module 'OCI.PSModules.Vbsinst' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported PSEditions Compat...
0
sample_2_29.ps1
#************************************************ # DC_SmbClient-Component.ps1 # Version 1.1 # Date: 2009-2019 # Author: Boyd Benson (bbenson@microsoft.com) +WalterE # Description: Collects information about the SMB Client. # Called from: Main Networking Diag, etc. #**********************************************...
0
sample_53_10.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