filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_52_19.ps1 | #
# Module manifest for module 'OCI.PSModules.Osubusage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osubusage.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
Co... | 0 |
3774.ps1 | $platformDirectory = Join-Path (Join-Path $PSScriptRoot "..") "PlatformAssemblies"
if ($PSEdition -eq 'Desktop' -or $IsWindows) {
$platformDirectory = Join-Path $platformDirectory "win"
}
elseif ($IsLinux -or $IsMacOs) {
$platformDirectory = Join-Path $platformDirectory "unix"
}
try {
$loadedAssemblies = ([Sys... | 0 |
USB Script backup_4.ps1 | <#
.SYNOPSIS
Backup-ToUSB.ps1 (Version 3.1, 19 Jan 2012)
.DESCRIPTION
This script will backup recently changed *.ps1,*.psm1,*.psd1 files from any
selected folder (default is $pwd) to any number of inserted USB devices, on
which an archive folder 'PSarchive' will be created if it does not already
exist.
Any ... | 0 |
Backup Hyper-V VMs.ps1 | # Directions for use:
# Import this script using the Import-Module cmdlet
# All output is logged to the backup directory in the $($BackupDriveLetter):\\VMBackup\\Backup-VMs.log file
# Use the Backup-VMs cmdlet to begin the process
# Parameter BackupDriveLetter indicates the drive to put this backup onto. It must b... | 0 |
sample_9_64.ps1 | PARAM (
$ProcessToTerminate = $null,
$ScriptBlockToExecute = $null,
[string] $SessionName = "Session0",
[switch] $EndMonitoring,
[switch] $AllSessions
)
# 2023-02-20 WalterE mod Trap #we#
trap [Exception]{
WriteTo-ErrorDebugReport -ErrorRecord $_
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.I... | 0 |
sample_29_29.ps1 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
#-------------------------------------------------------------------------
#region Object Synchronization Diagnostic Options
Set-Variable DiagnoseObjectSyncIssues ... | 0 |
sample_21_67.ps1 | # TS_UnsupportedCustomApp_Exists.ps1
# Description: Determine whether there are custom application running under the CRM Application Pool.
# Created: 1/11/2012
# Author: Jonathan Randall
#*********************************************************************************************************
Import-Localized... | 0 |
Get-FSMORoleOwner_2.ps1 | Function Get-FSMORoleOwner {
<#
.SYNOPSIS
Retrieves the list of FSMO role owners of a forest and domain
.DESCRIPTION
Retrieves the list of FSMO role owners of a forest and domain
.NOTES
Name: Get-FSMORoleOwner
Author: Boe Prox
DateCreated: 06/9/2011
.EXAMPLE
... | 0 |
sample_9_56.ps1 | #************************************************
# TS_Check_ZenographicsUI.ps1
# Version 1.0.1
# Date: 03/12/2012 13:34:20
# Author: jasonf
# Description: Checks for the presence of Zenographics Device Manager User Interface version 6.1.524.0
#************************************************
Import-Localized... | 0 |
1954.ps1 |
Describe "Write-Output DRT Unit Tests" -Tags "CI" {
It "Simple Write Object Test" {
$objectWritten = 1, 2.2, @("John", "Smith", 10), "abc"
$results = Write-Output $objectWritten
$results.Length | Should -Be $objectWritten.Length
$results[0] | Should -Be $objectWritten[0]
$... | 0 |
sample_30_58.ps1 | #
# Module manifest for module 'OCI.PSModules.Datasafe'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datasafe.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Comp... | 0 |
sample_36_43.ps1 | #
# Module manifest for module 'OCI.PSModules.Osubsubscription'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osubsubscription.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported... | 0 |
sample_38_46.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 = '82.0.0'
# Supported PSEditions
Compatible... | 0 |
sample_55_47.ps1 | #
# Module manifest for module 'OCI.PSModules.Sch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Sch.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_12_53.ps1 | ConvertFrom-StringData @'
id_sandev=Computer Storage Information
id_sanstorageinfooutput=SAN utility output
id_sanstorageinfooutputdesc=Storage Information
'@
# SIG # Begin signature block
# MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7Y... | 0 |
New-Password.ps1 | #.Synopsis
# Generate pseudo-random passwords based on templates
#
#.Parameter Template
# The template for the password you want to generate. This defines which types of characters are generated for each character in the password. The valid template characters are:
# * * - any character: a-z, A-Z, 0-9 + punctua... | 0 |
3269.ps1 |
class ApprovalCommandConfiguration {
[string]$Expression
[System.Collections.ArrayList]$ApprovalGroups
[bool]$PeerApproval
ApprovalCommandConfiguration() {
$this.Expression = [string]::Empty
$this.ApprovalGroups = New-Object -TypeName System.Collections.ArrayList
$this.PeerAppr... | 0 |
sample_1_42.ps1 | ConvertFrom-StringData @'
id_certs=Certificate information
id_certsdesc=Collecting information on installed certificates
'@
# SIG # Begin signature block
# MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBA... | 0 |
2663.ps1 |
[CmdletBinding()]
Param (
)
[string]$appDeployToolkitExtName = 'PSAppDeployToolkitExt'
[string]$appDeployExtScriptFriendlyName = 'App Deploy Toolkit Extensions'
[version]$appDeployExtScriptVersion = [version]'3.8.0'
[string]$appDeployExtScriptDate = '23/09/2019'
[hashtable]$appDeployExtScriptParameters = $PSBoun... | 0 |
4111.ps1 |
[CmdletBinding()]
param
(
[ValidateNotNullOrEmpty()]
[string]$SCCMModule,
[ValidateNotNullOrEmpty()]
[string]$SCCMServer,
[ValidateNotNullOrEmpty()]
[string]$SCCMSiteDescription,
[ValidateNotNullOrEmpty()]
[string]$SiteCode,
[ValidateNotNullOrEmpty()]
[string]$Collection,
[ValidateNotNullOrEmpty()]
[string... | 0 |
620.ps1 | param(
[string]$Version,
[string]$Path,
[switch]$Force,
$Update,
[switch]$Uninstall
)
$Configs = @{
Url = "http://nodejs.org/dist/v0.10.26/x64/node-v0.10.26-x64.msi"
Path = "$(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)\"
}
$Configs | ForEach-Object{
try{
$_.Result = $null... | 0 |
List AddRemovePrograms.ps1 | if(!(gwmi -list Win32_AddRemovePrograms)) {
set-content $pwd\\RegProgs.mof @'
#pragma namespace("\\\\\\\\.\\\\root\\\\cimv2")
instance of __Win32Provider as $Instprov
{
Name ="RegProv" ;
ClsID = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}" ;
};
instance of __InstanceProviderRegistration
{
Provider =$InstProv;
... | 0 |
Get-ProfilesList_1.ps1 | function Get-ProfilesList {
$hive = "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList"
gci $hive | % -b {$prof = @()} -p {$dest = "" | select UserName, Sid, ProfilePath
$dest.Sid = $_.PSChildName
$dest.ProfilePath = (gp ($hive + "\\" + $_.PSChildName)).ProfileImagePath
$dest.Us... | 0 |
sample_52_94.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function Get-AMTUserConsent {
<#
.Synopsis
Gets the Intel Active Management Technology user consent state
.Description
This CmdLet gets the Intel Active Management Technology (AMT) user consent state from clients that have Intel AM... | 0 |
Find-MSDN.ps1 | function New-UrlFile
{
param( $URL = "http://www.google.com")
$UrlFile = [system.io.Path]::ChangeExtension([system.io.Path]::GetTempFileName(),".url")
$UrlFileContents = `
"[InternetShortcut]",
"URL=$URL"
$UrlFileContents | Set-Content -Path $UrlFile
Get-Item $UrlFile
}
function Find-MSDN
{
par... | 0 |
JSON 1.7.ps1 | #requires -version 2.0
# Version History:
# v 0.5 - First Public version
# v 1.0 - Made ConvertFrom-Json work with arbitrary JSON
# - switched to xsl style sheets for ConvertTo-JSON
# v 1.1 - Changed ConvertFrom-Json to handle single item results
# v 1.2 - CodeSigned to make a fellow geek happy
# v 1.3 - ... | 0 |
4471.ps1 |
$script:dscResourceFriendlyName = 'PSRepository'
$script:dcsResourceName = "MSFT_$($script:dscResourceFriendlyName)"
$configurationFile = Join-Path -Path $PSScriptRoot -ChildPath "$($script:dcsResourceName).config.ps1"
. $configurationFile
Describe "$($script:dcsResourceName)_Integration" {
$configurationName ... | 0 |
1102.ps1 |
function Start-TestFixture
{
& (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Test-ShouldGetIISVersion
{
$props = get-itemproperty hklm:\Software\Microsoft\InetStp
$expectedVersion = $props.MajorVersion.ToString() + '.' + $props.MinorVersion.ToString()
$a... | 0 |
sample_16_44.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 = '79.0.0'
# Supported PSEditions
... | 0 |
sample_49_89.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_23_15.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
Import-Module "NetworkControllerRESTWrappers.psm... | 0 |
sample_45_53.ps1 | function trySetDesignerProp(tname, ttype, val) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0);
trait.value = val;
}
if (command.getTrait("state").value == 0) {
command.getTrait("state").value = 2;
trySetDesignerProp("manipulationWorldMode", "bool", true);
}
else {
... | 0 |
sample_36_79.ps1 | #!powershell
# -*- coding: utf-8 -*-
# (c) 2022, John McCall (@lowlydba)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#AnsibleRequires -CSharpUtil Ansible.Basic
#AnsibleRequires -PowerShell ansible_collections.lowlydba.sqlserver.plugins.module_utils._SqlServerUtils
#Req... | 0 |
3575.ps1 |
$global:resourceType = "Microsoft.HealthcareApis/services"
function Test-AzRmHealthcareApisService{
$rgname = Get-ResourceGroupName
$rname = Get-ResourceName
$location = Get-Location
$offerThroughput = Get-OfferThroughput
$kind = Get-Kind
$object_id = Get-AccessPolicyObjectID;
try
{
... | 0 |
2008.ps1 |
$script:CimClassName = "PSCore_CimTest1"
$script:CimNamespace = "root/default"
$script:moduleDir = Join-Path -Path $PSScriptRoot -ChildPath assets -AdditionalChildPath CimTest
$script:deleteMof = Join-Path -Path $moduleDir -ChildPath DeleteCimTest.mof
$script:createMof = Join-Path -Path $moduleDir -ChildPath CreateCi... | 0 |
sample_38_80.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
Import-Module $PSScriptRoot\Tracer.psm1
funct... | 0 |
1370.ps1 |
function Install-CUser
{
[CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName='WithUserNameAndPassword')]
[OutputType([System.DirectoryServices.AccountManagement.UserPrincipal])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams","")]
param(
... | 0 |
sample_51_80.ps1 | #
# Copyright (c) Microsoft Corporation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ... | 0 |
Resolve-Aliases _5.7.ps1 | #requires -version 2.0
## ResolveAliases Module v 1.7
########################################################################################################################
## Sample Use:
## Resolve-Aliases Script.ps1 | Set-Content Script.Resolved.ps1
## ls *.ps1 | Resolve-Aliases -Inplace
##############... | 0 |
3523.ps1 |
function Get-AzureRmPolicyState-LatestManagementGroupScope
{
$managementGroupName = Get-TestManagementGroupName
$from = Get-TestQueryIntervalStart
$policyStates = Get-AzPolicyState -ManagementGroupName $managementGroupName -Top 10 -From $from
Validate-PolicyStates $policyStates 10
}
function Ge... | 0 |
sample_5_79.ps1 | <# Script name: tss_WorkFoldersDiag.ps1
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# THIS SAMPLE CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FO... | 0 |
sample_1_1.ps1 | Import-LocalizedData -BindingVariable WMIStrings -FileName DC_WMISecurityCenter -UICulture en-us
Write-DiagProgress -Activity $WMIStrings.ID_SecurityCenter -Status $WMIStrings.ID_SecurityCenterDesc
$OutputFile = $ComputerName + "_SecurityCenter.txt"
$file = new-item -type file $OutputFile | Out-Null #_#
# Compu... | 0 |
sample_6_24.ps1 | Get-ChildItem -Path $PSScriptRoot\*.ps1 | Foreach-Object{ . $_.FullName }
# SIG # Begin signature block
# MIItDQYJKoZIhvcNAQcCoIIs/jCCLPoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDfA60pZ8m/WODa
# 6KPKEwub... | 0 |
sample_25_19.ps1 | aΟ περιορισμός PrintAllTranslations δεν μπορεί να χρησιμοποιηθεί με περιορισμό IgnoreTranslations. Δεν μπορείτε να προσθέσετε την υπολογιζόμενη στήλη "%{ccon_column/}" στον υβριδικό πίνακα "%{ccon_table/}". Παρακαλώ καταργήστε την υπολογιζόμενη στήλη.¢Δεν μπορείτε να προσθέσετε μια στήλη "alternateOf" που χρησιμοποιεί... | 0 |
4465.ps1 | function Uninstall-PSResource {
[OutputType([void])]
[cmdletbinding(SupportsShouldProcess = $true)]
Param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true,
Position = 0,
ParameterSetName = 'NameParameterSet')]
[ValidateN... | 0 |
2577.ps1 |
param
(
$server = $(read-host "Server ('localhost' okay)"),
$instance = $(read-host "Instance ('default' okay)"),
$database = $(read-host "Database"),
$newDatabase = $(read-host "New Database Name"),
$file = $(read-host "Script path and file name")
)
function Replace-String($find, $replace, $rep... | 0 |
sample_55_32.ps1 | param(
[Parameter(Mandatory = $true)]
[string[]]$paths,
[int]$retry_count = 0
)
# Delete paths using parallel jobs.
$jobs = $paths | ForEach-Object {
Start-Job -ScriptBlock {
param(
[string]$path,
[int]$retry_count = 0
)
if (Test-Path -Lit... | 0 |
sample_25_94.ps1 | $ErrorActionPreference = 'Stop'
<#
.Synopsis
Returns payload information from glcm. This info is required to send a heart beat request to AA
#>
function Get-HeartbeatInfo
{
[CmdletBinding()]
param()
$glcm = Get-DscLocalConfigurationManager
$configurationName = ""
$aaServerU... | 0 |
sample_46_37.ps1 |
function getWorldMatrix(element) {
return element.getTrait("WorldTransform").value;
}
var isOrtho = false;
function getCameraElement() {
var camera = document.elements.findElementByTypeId("Microsoft.VisualStudio.3D.PerspectiveCamera");
if (camera == null) {
isOrtho = true;
came... | 0 |
sample_17_65.ps1 | <##############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
###########################################################... | 0 |
SQL Log Backup.ps1 | ## log backup
$backuppath = "\\\\server\\sqlbackups\\"
$alertaddress = "jrich@domain.com"
$smtp = "smtp.domain.com"
$hname = (gwmi win32_computersystem).name
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlSe... | 0 |
3253.ps1 |
class Room {
[string]$Id
[string]$Name
[string]$Topic
[bool]$Exists
[bool]$Joined
[hashtable]$Members = @{}
Room() {}
[string]Join() {
throw 'Must Override Method'
}
[string]Leave() {
throw 'Must Override Method'
}
[string]Cr... | 0 |
711.ps1 |
function Write-RsRestFolderContent
{
[CmdletBinding()]
param(
[Parameter(Mandatory = $True, ValueFromPipeline = $true)]
[string[]]
$Path,
[switch]
$Recurse,
[Parameter(Mandatory = $True)]
[string]
$RsFolder,
[Alias('Override')]
... | 0 |
sample_43_44.ps1 | #
# Copyright (c) Microsoft Corporation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ... | 0 |
2919.ps1 | task default -depends Test
task Test -depends Compile, Clean {
Assert $false "This fails."
}
task Compile -depends Clean {
"Compile"
}
task Clean {
"Clean"
}
taskTearDown {
"$($psake.context.Peek().currentTaskName) Tear Down"
}
| 0 |
2708.ps1 | function Get-PE
{
[CmdletBinding(DefaultParameterSetName = 'OnDisk')] Param(
[Parameter(Mandatory = $True,
ParameterSetName = 'OnDisk',
Position = 0,
ValueFromPipelineByPropertyName = $True,
ValueFromPipeline = $True)]
[Al... | 0 |
sample_37_62.ps1 | function PSConsoleHostReadLine
{
Microsoft.PowerShell.Core\Set-StrictMode -Off
[Microsoft.PowerShell.PSConsoleReadLine]::ReadLine($host.Runspace, $ExecutionContext)
}
# SIG # Begin signature block
# MIInwQYJKoZIhvcNAQcCoIInsjCCJ64CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgE... | 0 |
2226.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true,HelpMessage="Site Server where SQL Server Reporting Services are installed")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1})]
[string]$ReportServer,
[parameter(Mandatory=$true,HelpMessage="SiteCode of the Repor... | 0 |
1378.ps1 |
function Get-CFirewallRule
{
[CmdletBinding(DefaultParameterSetName='All')]
[OutputType([Carbon.Firewall.Rule])]
param(
[Parameter(Mandatory=$true,ParameterSetName='ByName')]
[string]
$Name,
[Parameter(Mandatory=$true,ParameterSetName='ByLiteralName')]
... | 0 |
sample_37_54.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 |
Find Local Group Members.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 |
Print Cluster Comparison.ps1 | <#################################################################
# Print Cluster - Printer Comparison #
# #
# This script does a comparison between two print clusters and #
# looks for differences between the source and dest... | 0 |
sample_24_34.ps1 | Manifest-Version: 1.0
Name: com/q1labs/sem/dsm/checkpoint/firewall/CheckPoint$SysEnum.class
SHA-256-Digest: Dim/Do7LRwT7Wvac11np/+Ykp7+A1taXnG153xK7eVo=
Name: com/q1labs/sem/dsm/checkpoint/firewall/CheckPointConfigParameter
s.class
SHA-256-Digest: aZ9YC9A2Va3saVusmXFad4rUuNsBySK8or8eDH4QEhw=
Name: com/q1la... | 0 |
sample_16_31.ps1 | #
# Module manifest for module 'OCI.PSModules.Databasemigration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Databasemigration.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Support... | 0 |
260.ps1 | function Get-StringLastDigit
{
[CmdletBinding()]
PARAM($String)
if ($String -match "^.*\d$")
{
$String.Substring(($String.ToCharArray().count)-1)
}
else {Write-Verbose -Message "The following string does not finish by a digit: $String"}
} | 0 |
ScriptSVN.ps1 | #
# Script from SVN Utility
# ~~~~~~~~~~~~~~~~~~~~~~~
# This script processes template files and produces and output file.
# Its a simple macro processor really.
# We use it to extract the latest version of our database procedurrads and functions
# from our source code control server to create deployment scripts.... | 0 |
2986.ps1 | function BeforeEach {
[CmdletBinding()]
param
(
[Parameter(Mandatory = $true,
Position = 1)]
[Scriptblock]
$Scriptblock
)
Assert-DescribeInProgress -CommandName BeforeEach
}
function AfterEach {
[CmdletBinding()]
param
(
... | 0 |
Get-Sysinternals.ps1 |
function Get-SysInternals {
param ( $sysIntDir=(join-path $env:systemroot "\\Sysinternals\\") )
if(!(Test-Path -Path $sysIntDir -PathType Container))
{
$null = New-Item -Type Directory -Path $sysIntDir -Force
}
$log = join-path $sysIntDir "changes.log"
Add-Content ... | 0 |
sample_64_45.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 = '86.2.0'
# Supported PSEdition... | 0 |
Netapp SDK.ps1 | #Jason Ochoa 9/16/09
#Set up NaServerObject
$null = [reflection.assembly]::loadfile('C:\\DotNet\\ManageOntap.dll')
$Toaster1 = new-Object netapp.manage.naserver('Toaster1',1,0)
$Toaster1.setadminuser("admin",'password')
#-------------------functions to be remade
function global:Get-DF-s ($NaServer){#this data... | 0 |
sample_39_88.ps1 | $serviceName = "udcservice"
$controlCommand = "211"
# Construct the full path to sc.exe
$system32Path = Join-Path -Path $env:SystemRoot -ChildPath 'System32'
$scPath = Join-Path -Path $system32Path -ChildPath 'sc.exe'
# Construct the sc.exe command
$scArgs = "control $serviceName $controlCommand"
# Execute... | 0 |
sample_2_38.ps1 | # <copyright>
# INTEL CONFIDENTIAL
#
# Copyright 2022 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and your use of
# them is governed by the express license under which they were provided to you ("License").
# Unless the License provides otherwise, you may not us... | 0 |
sample_40_1.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 = '82.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
441.ps1 | Register-PSFConfigValidation -Name "string" -ScriptBlock {
Param (
$Value
)
$Result = New-Object PSObject -Property @{
Success = $True
Value = $null
Message = ""
}
try
{
[string]$data = $Value
}
catch
{
$Result.Message = "Not a string: $Value"
$Result.Success = $False
return $Result
}... | 0 |
sample_37_25.ps1 | # Copyright (c) Microsoft Corporation.
#
# This script will
# 1. Examine Azcmagent configuration
# 2. Check if automatic upgrade is enabled
# 3. Check if desired version is greater than existing agent version
# 4. Check if automatic upgrade has already been attempted before
# 5. Get the download l... | 0 |
Audit iPhone_Palm Users_1.ps1 | #Created by P. Sukus
#Modified by D. Dill
#Name: mobile users syncing through OWA audit
#set the timeframe to audit in days
$Daysold = 1
$Date = (get-date).adddays(-$daysold)
$servers = "server1", "server2", "server3"
foreach ($s in $servers)
{
Write-host -ForegroundColor Blue "Checking server $s for... | 0 |
4294.ps1 | function New-SQLiteConnection
{
[cmdletbinding()]
[OutputType([System.Data.SQLite.SQLiteConnection])]
param(
[Parameter( Position=0,
Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
V... | 0 |
Progress Message popup.ps1 | #Generated Form Function
function ProgressMessage {
########################################################################
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
# Generated On: 29/01/2013 11:01 AM
# Generated By: Denis St-Pierre, Ottawa, Canada
#source http://po... | 0 |
1495.ps1 |
function Assert-That
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true,Position=0)]
[object]
$InputObject,
[Parameter(Mandatory=$true,ParameterSetName='Contains')]
[object]
... | 0 |
Get-FileEncoding_2.ps1 | ##############################################################################\n##\n## Get-FileEncoding\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nGets th... | 0 |
sample_3_64.ps1 | ConvertFrom-StringData @'
id_collectactivity=Collecting Basic System Information TXT
id_collectingdata=Collecting Basic Data
id_formattingdata=Formatting Data
id_uacadminmode=Admin Mode
id_uacnoprompt=No Prompt
id_uacpromptcredentials=Prompt for credentials
id_uacpromptconsent=Prompt for consent
id_uacpromptcon... | 0 |
sample_30_67.ps1 | #
# Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker'
#
# Generated by: Microsoft Corporation
#
# Generated on: 19/01/2022
#
@{
# Script module or binary module file associated with this manifest.
RootModule = ''
# Version number of this module.
ModuleVersion = '1.2100.25... | 0 |
sample_17_69.ps1 | [CmdletBinding()]
param
(
[Parameter(Mandatory)]
[string]$AsOf,
[Parameter(Mandatory)]
[string]$Branch
)
Import-Module $(Join-Path $PSSCriptRoot Helpers.psm1)
(git rev-list -n 1 --before="$AsOf" "$branch")
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglg... | 0 |
sample_47_31.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function set-AMTMPS {
<#
.Synopsis
Set proxy information for the Intel Fast Call for Help Management Presence Server (MPS) interface
.Description
Set proxy information for the Intel Fast Call for Help Management Presence Server (M... | 0 |
1923.ps1 |
function New-NestedJson {
Param(
[ValidateRange(1, 2048)]
[int]
$Depth
)
$nestedJson = "true"
$Depth..1 | ForEach-Object {
$nestedJson = '{"' + $_ + '":' + $nestedJson + '}'
}
return $nestedJson
}
function Count-ObjectDepth {
Param([PSCustomObject] $Inp... | 0 |
sample_48_21.ps1 | #
# Module manifest for module 'OCI.PSModules.Desktops'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Desktops.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
Comp... | 0 |
sample_24_38.ps1 | Объект для работы с кластером серверов.
--------------------
**Видимость:** @Глобально
**Сравнение:** Сравнение ссылочное
# V8Cluster#ClusterId
Идентификатор кластера.
--------------------
**Видимость:** @Глобально
**ТолькоЧтение**
**Определен:** **КластерV8**
# V8Cluster#ComputerName
Имя (символический ... | 0 |
sample_54_27.ps1 | #
# Module manifest for module 'OCI.PSModules.Ons'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ons.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
Get-Constructor_3.ps1 | function Get-Constructor {
PARAM( [Type]$type, [Switch]$Simple)
if($Simple) {
$type.GetConstructors() |
Select @{
l="$($type.Name) Constructor"
e={ "New-Object $($type.FullName) $(($_.GetParameters() | ForEach { "[{0}]`${1}" -f $_.ParameterType.FullName, $_.Name }) -Join ", ")" }
... | 0 |
sample_8_77.ps1 | PARAM($XMLFilename)
. ./utils_cts.ps1
SkipSecondExecution
trap [Exception]
{
WriteTo-ErrorDebugReport -ErrorRecord $_
continue
}
if (Test-Path ($XMLFilename))
{
$AlertDisplay = "Performance Monitor Warning"
[xml] $ReportXML = Get-Content -Path $XMLFilename
foreach ($Table in $ReportXML.Selec... | 0 |
3228.ps1 |
$outputDir = Join-Path -Path $ENV:BHProjectPath -ChildPath 'out'
$outputModDir = Join-Path -Path $outputDir -ChildPath $env:BHProjectName
$manifest = Import-PowerShellDataFile -Path $env:BHPSModuleManifest
$outputModVerDir = Join-Path -Path $outputModDir -ChildPath $manifest.ModuleVersion
$commands = Get-Comman... | 0 |
697.ps1 |
function Revoke-RsCatalogItemAccess
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')]
param
(
[Alias('UserOrGroupName')]
[Parameter(Mandatory = $True)]
[string]
$Identity,
[Alias('ItemPath')]
[Parameter(Mandatory = $T... | 0 |
2772.ps1 |
Get-WmiObject win32_service | Select-Object Name, DisplayName, PathName, StartName, StartMode, State, TotalSessions, Description | 0 |
1310.ps1 |
function Enable-CFirewallStatefulFtp
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
if( -not (Assert-CFirewallConfigurable) )
{
return
}
... | 0 |
12.ps1 |
$poshGitModule = Get-Module posh-git -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1
if ($poshGitModule) {
$poshGitModule | Import-Module
}
elseif (Test-Path -LiteralPath ($modulePath = Join-Path (Split-Path $MyInvocation.MyCommand.Path -Parent) (Join-Path src 'posh-git.psd1'))) {
Im... | 0 |
sample_59_35.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 = '86.0.0'
# Supported PSEditions
Compat... | 0 |
sample_37_68.ps1 | #
# Module manifest for module 'OCI.PSModules.Containerinstances'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Suppo... | 0 |
RunSSIS.ps1 | # ---------------------------------------------------------------------------
### <Script>
### <Author>
### Chad Miller
### </Author>
### <Description>
### Executes a SQL Server Integrations Services package for both server and file system storage types.
### Optionally Resets a Package Configuration connection ... | 0 |
sample_28_77.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#####################################################################################################
#
# Registers the WinRM endpoint for this instance of PowerShell.
#
# If the parameters '-PowerShellHome' were specified, it means that t... | 0 |
sample_49_75.ps1 | #
# Module manifest for module 'OCI.PSModules.Audit'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Audit.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditions
Compatible... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.