filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
Get-User_10.ps1 | function Get-User($user)
{
# this function should be passed the CN of the user to be returned
$dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$root = [ADSI] "LDAP://$($dom.Name)"
$searcher = New-Object System.DirectoryServices.DirectorySearcher $root
$searcher.filter = "(&(objec... | 0 |
sample_40_6.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmsynthetics'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmsynthetics.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEdi... | 0 |
2972.ps1 |
[cmdletbinding()]
param(
[validateSet('Test', 'Analyze', 'Pester', 'Clean', 'Build', 'CreateMarkdownHelp', 'BuildNuget', 'PublishChocolatey', 'PublishPSGallery')]
[string]$Task = 'Test',
[switch]$Bootstrap
)
$sut = Join-Path -Path $PSScriptRoot -ChildPath 'src'
$manifestPath ... | 0 |
sample_65_76.ps1 | #
# Module manifest for module 'OCI.PSModules.Secrets'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Secrets.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEditions
Compat... | 0 |
sample_55_98.ps1 | #
# Module manifest for module 'OCI.PSModules.Filestorage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Filestorage.dll'
# Version number of this module.
ModuleVersion = '84.0.0'
# Supported PSEdition... | 0 |
Select-ToString_1.ps1 | [CmdletBinding(DefaultParameterSetName='DefaultParameter')]
param(
[Parameter(ValueFromPipeline=$true)]
[System.Management.Automation.PSObject]
${InputObject},
[Parameter(ParameterSetName='DefaultParameter', Position=0)]
[System.String[]]
${Property},
[Parameter(ParameterSetName=... | 0 |
sample_21_23.ps1 | ConvertFrom-StringData @'
id_w32timeoutput=W32Time
id_w32timeobtaining=Gathering W32Time information
'@
# SIG # Begin signature block
# MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlA... | 0 |
sample_3_13.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 = '93.0.0'
# Supported P... | 0 |
sample_12_73.ps1 | ConvertFrom-StringData @'
id_fileacl=Determining file ACL's
'@
# SIG # Begin signature block
# MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA6VsPfmmzM00am
# qvD0ITk80rX9ws5... | 0 |
sample_3_53.ps1 | # Load Common Library
#_#$debug = $false
Write-Host "____ Loading utils_cts, Utils_Shared.ps1" #| WriteTo-StdOut -ShortFormat
. ./utils_cts.ps1
. ./Utils_Shared.ps1
Import-LocalizedData -BindingVariable MainStrings -FileName TS_Main_SUVP -UICulture en-us
#_#
TraceOut "Start Main Script"
<#
. ./utils_cts... | 0 |
createSiteFromTemplate.ps1 | # Load the template
$url = "http://spf" # where template base
$namesite = "Good Site" #name new site title
$targeturl = "goodsite" #name url new site
# find id = viewAlltemplate
$templateID = "{055CF2A7-43A8-48E1-95CB-19DC393F0215}"
#$templateID = "{055CF2A7-43A8-48E1-95CB-19DC393F0215}#kolam"
$site= new-Objec... | 0 |
446.ps1 | Register-PSFConfigValidation -Name "integerpositive" -ScriptBlock {
Param (
$Value
)
$Result = New-Object PSOBject -Property @{
Success = $True
Value = $null
Message = ""
}
try { [int]$number = $Value }
catch
{
$Result.Message = "Not an integer: $Value"
$Result.Success = $False
return $Result... | 0 |
1797.ps1 |
Describe "Move-Item tests" -Tag "CI" {
BeforeAll {
$content = "This is content"
Setup -f originalfile.txt -content "This is content"
$source = "$TESTDRIVE/originalfile.txt"
$target = "$TESTDRIVE/ItemWhichHasBeenMoved.txt"
Setup -f [orig-file].txt -content "This is not conte... | 0 |
Set-SecureAutoLogon.ps1 | [cmdletbinding()]
param (
[Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]
$Username,
[Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [System.Security.SecureString]
$Password,
[Parameter()] [string]
$Domain,
[Parameter()] [Int]
$AutoLogonCount,
[Parameter()] [switch... | 0 |
3784.ps1 |
$aliaspage = Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json" -TimeoutSec 5
$parsedJson = $aliaspage.Content | ConvertFrom-Json
$win10Image = @"
{
"publisher": "MicrosoftVisualStudio",
"offer": "Windows",
"sku": "Win... | 0 |
3525.ps1 |
function Get-TestManagementGroupName
{
"azgovtest5"
}
function Get-TestResourceGroupName
{
"jilimpolicytest2"
}
function Get-TestResourceId
{
"/subscriptions/d0610b27-9663-4c05-89f8-5b4be01e86a5/resourcegroups/govintpolicyrp/providers/microsoft.network/trafficmanagerprofiles/gov-int-policy-r... | 0 |
sample_21_14.ps1 | ConvertFrom-StringData @'
id_getexch2013datagatheringlogs=Gathering Exchange Logs
id_getexchdatacollectingact=Collecting Data:
id_getexchservermailbox=Exchange Mailbox Server Role
id_getexchdatawait=This may take several minutes. Please wait
id_getexchservercas=Exchange Client Access Server Role
id_getexchserver... | 0 |
4004.ps1 |
function Test-E2ECertificates
{
$resourceGroupName = "to-delete-01"
$automationAccountName = "fbs-aa-01"
$thumprint = "3a7dfabed24f7443e79e815239c51826042737dc"
$thumbprint2 = "38dae807ad6fb1f42bde1658b5abec85ace5615e"
$Password = ConvertTo-SecureString -String "Password" -AsPlainText... | 0 |
FTP download.ps1 | $File = "D:\\Dev\\somefilename.zip"
$ftp = "ftp://username:password@example.com/pub/incoming/somefilename.zip"
"ftp url: $ftp"
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
"Uploading $File..."
$webclient.UploadFile($uri, $File)
| 0 |
3875.ps1 |
function Test-GetWebAppSlot
{
$rgname = Get-ResourceGroupName
$appname = Get-WebsiteName
$slotname1 = "staging"
$slotname2 = "testing"
$location = Get-Location
$planName = Get-WebHostPlanName
$tier = "Standard"
$resourceType = "Microsoft.Web/sites"
try
{
New-AzResourceGroup -Name $rgnam... | 0 |
sample_9_55.ps1 | #************************************************
# TS_HyperVKB2263829Check.ps1
#************************************************
Import-LocalizedData -BindingVariable RegKeyCheck
Write-DiagProgress -Activity $RegKeyCheck.ID_HyperVKB2263829Check -Status $RegKeyCheck.ID_HyperVKB2263829CheckDesc
$RootCauseDetect... | 0 |
sample_15_14.ps1 | @{
GUID="{Fb6cc51d-c096-4b38-b78d-0fed6277096a}"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
RootModule="Microsoft.Management.Infrastructure.CimCmdlets"
RequiredAssembli... | 0 |
sample_3_14.ps1 | <#
.SYNOPSIS
MSRD-Collect framework functions
.DESCRIPTION
Module for the MSRD-Collect framework functions
.NOTES
Author : Robert Klemencz
Requires : MSRD-Collect.ps1
Version : See MSRD-Collect.ps1 version
Feedback : https://aka.ms/MSRD-Collect-Feedback
#>
if (!($global:msr... | 0 |
1482.ps1 |
function Publish-NuGetPackage
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$ManifestPath,
[Parameter(Mandatory=$true)]
[string]
$NuspecPath,
[Parameter(Mandatory=$true)]
[string]
... | 0 |
4319.ps1 | function ValidateAndGet-AuthenticodeSignature
{
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$true)]
[PSModuleInfo]
$ModuleInfo
)
$ModuleDetails = $null
$AuthenticodeSignature = $null
$ModuleName = $ModuleInfo.Name
$ModuleBasePath = $ModuleInfo.ModuleBase
... | 0 |
Get-LeaderBoard_3.ps1 | <#
.SYNOPSIS
Pulls down the leaderboards for the 2011 Scripting Games
.DESCRIPTION
Quick and dirty script to pull down the leaderboards for the 2011 scripting games.
Can choose either beginner or advanced via a command line switch. To see the output
in a table, you must pipe to "format-table -autosi... | 0 |
sample_31_28.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 = '73.1.0'
# Supported PSEditions
Compatible... | 0 |
sample_67_40.ps1 | #
# Module manifest for module 'OCI.PSModules.Email'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Email.dll'
# Version number of this module.
ModuleVersion = '90.0.0'
# Supported PSEditions
Compatible... | 0 |
2240.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site server name with SMS Provider installed")]
[string]$SiteServer,
[parameter(Mandatory=$true, HelpMessage="Path to where the Driver Source root directory is located")]
[ValidatePattern("^\\\\\w+\\\w+")]
... | 0 |
sample_18_47.ps1 | @{
GUID = "1DA87E53-152B-403E-98DC-74D7B4D63D59"
Author = "PowerShell"
CompanyName = "Microsoft Corporation"
Copyright = "Copyright (c) Microsoft Corporation."
ModuleVersion = "7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion = "3.0"
CmdletsToExport = @(
'Export-Alias', 'Get-Alias', 'Import-Alias', 'New-Al... | 0 |
sample_0_23.ps1 | ConvertFrom-StringData @'
id_clustercsvd=Cluster Shared Volume information
id_clustercsvdesc=Obtaining information about Cluster Shared Volumes
'@
# SIG # Begin signature block
# MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
... | 0 |
sample_66_10.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 |
sample_20_1.ps1 | # Load Common Library
# Load Reporting Utilities
#_#$debug = $false
. ./utils_cts.ps1
. ./TS_RemoteSetup.ps1
# 2023-02-20 WalterE mod Trap #we#
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue
Write-Host "$($_.InvocationIn... | 0 |
sample_18_91.ps1 | ConvertFrom-StringData @'
IPAddressDisplayNameFormat=IP adresa: {0}
NetworkNameDisplayNameFormat=Název: {0}
NetworkNameOfflineDisplayNameFormat=IP adresa: Adresa v podsíti {0}
CreateClusterProgressValidationStart=Ověřuje se vhodnost serverů pro cluster s podporou převzetí služeb při selhání.
CreateClusterProgressV... | 0 |
sample_45_61.ps1 | // On windows, create a .cmd file.
// Read the #! in the file to see what it uses. The vast majority
// of the time, this will be either:
// "#!/usr/bin/env <prog> <args...>"
// or:
// "#!<prog> <args...>"
//
// Write a binroot/pkg.bin + ".cmd" file that has this line in it:
// @<prog> <args...> %dp0%<target> %*
cons... | 0 |
Get_Set Signature _2.0.ps1 | #Requires -version 2.0
## Authenticode.psm1 updated for PowerShell 2.0 (with time stamping)
####################################################################################################
## Wrappers for the Get-AuthenticodeSignature and Set-AuthenticodeSignature cmdlets
## These properly parse paths, so they... | 0 |
2894.ps1 | task default -depends DisplayNotice
task DisplayNotice {
if ( $IsMacOS -OR $IsLinux ) {}
else {
exec { msbuild /version }
}
}
| 0 |
Test-UserCredential_4.ps1 | function Test-UserCredential {
[CmdletBinding(DefaultParameterSetName = "set1")]
[OutputType("set1", [System.Boolean])]
[OutputType("PSCredential", [System.Boolean])]
param(
[Parameter(Mandatory=$true, ParameterSetName="set1", position=0)]
[ValidateNotNullOrEmpty()]
[String] $Username,
[Parameter... | 0 |
sample_46_52.ps1 | #
# Module manifest for module 'OCI.PSModules.Applicationmigration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Applicationmigration.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# S... | 0 |
sample_3_4.ps1 | // Copyright (c) 2016 Dell Inc. or its subsidiaries. All Rights Reserved.
// ==================================================================
// DCIM_IPMICLPAccountManagementCapabilities
// ==================================================================
[ dynamic, provider("dcismprovider"),
Descrip... | 0 |
sample_62_36.ps1 | #requires -Version 5.0
enum BcArtifactSource {
OnPrem
Sandbox
Insider
}
#Import-Module (Join-Path $PSScriptRoot ClientContext\ClientContext.psd1)
#Import-Module (Join-Path $PSScriptRoot ClientContext\ClientContext.psm1)
#. "$PSScriptRoot\ClientContext\ClientContextLibLoader.ps1" -BcLibVersion (G... | 0 |
sample_53_75.ps1 | // @ES5 => ./es5.ohm
ES6 <: ES5 {
AssignmentExpression<guardIn> += ArrowFunction<guardIn>
ArrowFunction<guardIn> = ArrowParameters<guardIn> #(spacesNoNL "=>") ConciseBody<guardIn>
ConciseBody<guardIn> = ~"{" AssignmentExpression<guardIn> -- noBraces
| "{" FunctionBody "}" ... | 0 |
sample_56_76.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 |
135.ps1 |
function Get-AuthToken {
[cmdletbinding()]
param
(
[Parameter(Mandatory=$true)]
$User
)
$userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User
$tenant = $userUpn.Host
Write-Host "Checking for AzureAD module..."
$AadModule = Get-Module -Name "AzureAD" -ListAvailable
if ($Aa... | 0 |
Measure-Total.ps1 | #.Synopsis
# Calculate sums on top of Measure-Object
#.Description
# Pipe in objects with numerical properties, and get an extra output item
# with the sum of all the specified properties
#.Parameter Property
# The names of the properties to total
#.Example
# wc *.ps1 | total words, lines
#
# Calculates... | 0 |
1536.ps1 | function Get-MrAutoStoppedService {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[string[]]$ComputerName,
[System.Management.Automation.Credential()]$Credential = [Syst... | 0 |
1620.ps1 | function Logoff-User ($Name, $Server) {
if (!(gcm quser -ea 0)) {
throw 'could not find quser.exe'
}
$users = quser /server:$Server | select -Skip 1
if ($Name) {
$user = $users | ? {$_ -match $Name}
} else {
$user = $users | Out-Menu
}
$id = ($user.split() | ? ... | 0 |
Get-EasterEastern.ps1 | function Get-EasterEastern {
Param(
[Parameter(Mandatory=$true)]
[int] $Year
)
$a = $Year % 4
$b = $Year % 7
$c = $Year % 19
$d = ((19 * $c) + 15) % 30
$e1 = -$d #here because powershell is picking up - (subtraction operator) as incorrect toekn
$e = ((2 * $a) + (4 * $b) + ... | 0 |
sample_28_62.ps1 | #
# Module manifest for module 'OCI.PSModules.Cloudguard'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Cloudguard.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEditions
... | 0 |
4337.ps1 | function Validate-ModuleCommandAlreadyAvailable
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true)]
[PSModuleInfo]
$CurrentModuleInfo,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string]
$InstallLocation,
[Parameter()]
... | 0 |
sample_35_26.ps1 |
///////////////////////////////////////////////////////////////////////////////
// Helper to set a designer prop
///////////////////////////////////////////////////////////////////////////////
function setDesignerProp(tname, ttype, tvalue) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)... | 0 |
Backup Rotation (7zip).ps1 | First file RotateBackups_MasterList.txt
RowNbr,BackupName,VersionsRetained,BackupType
1,TargetBackup,2,Folder
2,LstDefBackup,5,File
3,XMLBackup,3,File
4,SourceBackup,2,Folder
5,TXTBackup,8,File
Second file RotateBackups_FolderList.txt
RowNbr,BackupName,FolderName
1,TargetBackup,c:\\MyBooks\\target
2,SourceB... | 0 |
The PowerShell Talk Demo.ps1 | #The PowerShell Takl
#Demo 1 - Hypervisors
#ESX
#Connect to vCenter
Get-Credential | connect-viserver -Server "Your vCenter Address"
#Create Our Network
Get-VMHost "ESXServerName" | New-VirtualSwitch -Name "Test" -NumPorts 64
#And a Port Group on that network
Get-VMHost "ESXServerName" | get-virtualswitch... | 0 |
3998.ps1 |
function Test-E2ESchedules
{
$resourceGroupName = "to-delete-01"
$automationAccountName = "fbs-aa-01"
$output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue
$StartTime = Get-Date "13:00:00"
$S... | 0 |
sample_2_7.ps1 | # ***********************************************************************************************************
# Version 1.0
# Date: 01-24-2014
# Author: Vinay Pamnani - vinpa@microsoft.com
# Description: Collects data from SMS Provider
# *****************************************************************************... | 0 |
f81bf3c1-15b5-492d-b806-22073181af89.ps1 | # Name: zip.ps1
# Author: Shadow
# Created: 05/12/2008
param([string]$zipfilename=$(throw "ZIP archive name needed!"),
[string[]]$filetozip=$(throw "Supply the file(s) to compress (wildcards accepted)"))
trap [Exception] {break;}
#empyt zip file contents
$emptyzipfile=80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0... | 0 |
1067.ps1 |
function Start-TestFixture
{
& (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Test-ShouldGetCanonicalCaseForDirectory
{
$currentDir = (Resolve-Path '.').Path
foreach( $badPath in ($currentDir.ToUpper(),$currentDir.ToLower()) )
{
$canoni... | 0 |
1274.ps1 |
function Get-CIisMimeMap
{
[CmdletBinding(DefaultParameterSetName='ForWebServer')]
[OutputType([Carbon.Iis.MimeMap])]
param(
[Parameter(Mandatory=$true,ParameterSetName='ForWebsite')]
[string]
$SiteName,
[Parameter(ParameterSetName='ForWebsite')]
... | 0 |
sample_64_41.ps1 | <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit" xmlns:layoutPrimitivesToolkit="clr-namespace:System.Windows.Contro... | 0 |
sample_9_40.ps1 | #************************************************
# TS_DCDiag.ps1
# Version 1.0.1
# Date: 09-23-2009
# Author : Andre Teixeira/ David Fisher (CSS)/ Craig Landis
# Description: Obtain DCPromo and DCPromoUI logs
#************************************************
if($debug -eq $true){[void]$shell.popup("Run DC... | 0 |
sample_57_47.ps1 | # Localized 05/30/2024 04:59 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 |
342.ps1 | function Unregister-PSFConfig
{
[CmdletBinding(DefaultParameterSetName = 'Pipeline', HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Unregister-PSFConfig')]
param (
[Parameter(ValueFromPipeline = $true, ParameterSetName = 'Pipeline')]
[PSFramework.Configuration.Config[]]
$ConfigurationIte... | 0 |
sample_30_45.ps1 | #
# Module manifest for module 'OCI.PSModules.Aivision'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aivision.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
Comp... | 0 |
Logger.psm1.ps1 | <#
Name : Universal Log4Net Logging Module (Logger.psm1)
Version : 0.1
Author : Joel Bennett (MVP)
Site : http://www.HuddledMasses.org/
See Also : http://poshcode.org/1743
You should download this config and put it in your Modules\\Logger folder with this Logger.psm1
Uses L... | 0 |
sample_19_13.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 = '79.0.0'
# Supported... | 0 |
sample_52_76.ps1 | #
# Module manifest for module 'OCI.PSModules.Email'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Email.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
Compatible... | 0 |
4276.ps1 | function Get-LAPSPasswords
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$false,
HelpMessage="Credentials to use when connecting to a Domain Controller.")]
[System.Management.Automation.PSCredential]
[System.Management.Automation.Credential()]$Credential = [System.Manageme... | 0 |
sample_11_81.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 = '74.1.0'
# Supported PSEditions
Co... | 0 |
sample_46_5.ps1 | #
# Module manifest for module 'OCI.PSModules.Identity'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identity.dll'
# Version number of this module.
ModuleVersion = '79.0.0'
# Supported PSEditions
Comp... | 0 |
Get-Hostname_3.ps1 | # .SYNOPSIS
# Print the hostname of the system.
# .DESCRIPTION
# This function prints the hostname of the system. You can additionally output the DNS
# domain or the FQDN by using the parameters as described below.
# .PARAMETER Short
# (Default) Print only the computername, i.e. the same value as returned by $env... | 0 |
5566cee5-63c0-4a96-8ed6-c53a1f2237b2.ps1 | function KillDBConnections([string]$serverName, [string]$DBName)
{
$ConnectionString = "Data Source=$serverName;Initial Catalog=master;Integrated Security=SSPI"
$connection = New-Object System.Data.SqlClient.SqlConnection($ConnectionString);
$command = New-Object System.Data.SqlClient.SqlComman... | 0 |
2404.ps1 |
[CmdletBinding(DefaultParameterSetName = 'Local')]
param (
[Parameter(Mandatory = $True,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True)]
[string]$ProductName,
[Parameter(Mandatory = $False,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True)]
[s... | 0 |
ComObjects.Types.ps1 | <Types>
<Type>
<Name>System.__ComObject</Name>
<Members>
<ScriptMethod>
<Name>GetProperty</Name>
<Script>
param([Parameter(Mandatory=$true,Position=1)]$PropertyName)
Write-Verbose "PropertyName: $PropertyName"
Write-Ve... | 0 |
Set-ConsoleProperties.ps.ps1 | ## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n\nSet-StrictMode -Version Latest\n\nPush-Location\nSet-Location HKCU:\\Console\nNew-Item '.\\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'\nSet-Location '.\\%SystemRoot%_system32_WindowsPowerShell_v1.0_powe... | 0 |
sample_27_87.ps1 | #
# Module manifest for module 'OCI.PSModules.Capacitymanagement'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Capacitymanagement.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Suppo... | 0 |
Disconnect-VMHost_1.ps1 | #requires -version 2
#requires -pssnapin VMware.VimAutomation.Core
Function Disconnect-VMHost {
<#
.Summary
Used to Disconnect a Connected host from vCenter.
.Parameter VMHost
VMHost to Disconnect to virtual center
.Example
Get-VMHost | Where-Object {$_.state -eq "Conn... | 0 |
sample_52_14.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
Import-Module -Name "$PSScriptRoot\..\..\Physica... | 0 |
sample_33_16.ps1 | #!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
$pathsep=":"
$env_node_path=$env:NODE_PATH
$new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\esbuild@0.19.12\node_modules\esbuild\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\esbuild... | 0 |
sample_11_71.ps1 | ConvertFrom-StringData @'
id_hypervkb2263829check=Checking for KB2263829
id_hypervkb2263829checkdesc=Checking version of Hvax64.exe and other binaries
'@
# SIG # Begin signature block
# MIIoVAYJKoZIhvcNAQcCoIIoRTCCKEECAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE6... | 0 |
sample_51_33.ps1 | #
# Module manifest for module 'Microsoft.SME.FileExplorer'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.SME.FileExplorer.psm1'
# Version number of this module.
ModuleVersion = '4.14.0'
# Supported PSEditions
# CompatiblePSEditions = @()
# ID used... | 0 |
sample_40_49.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function Invoke-AMTSOL {
<#
.Synopsis
Establishes a Serial-Over-LAN (SOL) session
.Description
This CmdLet establishes a Serial-Over-LAN communication to interact with clients that have Intel Active Management Technology (AMT) firm... | 0 |
Set-Encoding.ps1 | function Set-Encoding{
<#
.Synopsis
Takes a Script file or any other text file into memory
and Re-Encodes it in the format specified.
.Parameter FilePath
The path to the file to be re-encoded.
.Parameter Unicode
Outputs the file in Unicode format.
.Parameter UTF7
Outputs the file in UTF7 format.... | 0 |
sample_20_72.ps1 | #
# Module manifest for module 'Microsoft.SME.ScheduledTasks'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.SME.ScheduledTasks.psm1'
# Version number of this module.
ModuleVersion = '4.10.0'
# Supported PSEditions
# CompatiblePSEditions = @()
# ID ... | 0 |
4233.ps1 |
$arploaded = $null
function Invoke-Arpscan {
param (
[Parameter(Mandatory = $False)]
[string]$IPCidr,
[Parameter(Mandatory=$False)]
[switch]$Resolve,
[Parameter(Mandatory=$False)]
[switch]$AddType
)
if ($AddType.IsPresent) {
echo "[+] Loading Assembly using AddType"
echo ""
Add-Type -Type... | 0 |
3221.ps1 |
describe 'Get-PoshBotConfiguration' {
BeforeAll {
$PSDefaultParameterValues = @{
'Get-PoshBotConfiguration:Verbose' = $false
}
}
it 'Gets a configuration from path' {
$psd1 = Get-Item -Path (Join-Path -Path $PSScriptRoot -ChildPath '..\..\Artifacts\Cherry2000.psd1')
... | 0 |
2904.ps1 | BuildSetup {
throw "forced error"
}
Task default -depends Compile, Test, Deploy
Task Compile {
"Compiling"
}
Task Test -depends Compile {
"Testing"
}
Task Deploy -depends Test {
"Deploying"
}
| 0 |
sample_16_12.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=Das erforderliche PowerShell-Modul (FailoverClusters) wurde nicht gefunden. Installieren Sie es mit dem Tool „Rollen und Funktionen“: Remoteserver-Verwaltungstools | Featureverwaltungstools | Failoverclustering-Tools | Failoverclustermodul für Windows PowerShell... | 0 |
428.ps1 | Register-PSFTeppScriptblock -Name 'PSFramework.Message.Module' -ScriptBlock {
Get-PSFMessage | Select-Object -ExpandProperty ModuleName | Select-Object -Unique
}
Register-PSFTeppScriptblock -Name 'PSFramework.Message.Function' -ScriptBlock {
Get-PSFMessage | Select-Object -ExpandProperty FunctionName | Select-Object... | 0 |
sample_3_10.ps1 | If ($OSVersion.Major -ge 6)
{
Import-LocalizedData -BindingVariable SLMGRStrings
Write-DiagProgress -Activity $SLMGRStrings.ID_KMSActivation -Status $SLMGRStrings.ID_KMSActivationObtaining
Function Runslmgr ([string]$ScriptOption="")
{
$CommandToExecuteLenght = $ScriptOption.Length + 10
"-" * ($Com... | 0 |
Import-Delimited 2.3.ps1 | ################################################################################
## Convert-Delimiter - A function to convert between different delimiters.
## E.g.: commas to tabs, tabs to spaces, spaces to commas, etc.
################################################################################
## Written pri... | 0 |
Security group monitor_2.ps1 | #Get group membership for a list of security
#groups and export to an XML for comparison
#against baseline.
#
$script:WorkingDirectory = split-path $myinvocation.Mycommand.Definition -parent
Function Re-Baseline
{
#First, declare array and hashtable.
$securitygroups = @()
$table = @{}
#Import Security... | 0 |
Get-NextPrime_1.ps1 | $primes = 2,3,5 #,7,11,13,17,19,23
$primeIndex = 0
function Get-NextPrime {
[CmdletBinding(DefaultParameterSetName="KnownPrime")]
param(
[Parameter(Position=0,ParameterSetName="KnownPrime")]
$knownPrime = $(if($primeIndex -lt $primes.Count){ $primes[$primeIndex] } else { $primes[-1] } )
,
... | 0 |
New-RDP.ps1 | ########################################################################################################################
# NAME
# New-RDP
#
# SYNOPSIS
# Creates a new RDP file to store Remote Desktop connection settings.
#
# SYNTAX
# Start-RDP [-Path] <string> [[-Server] <string>] [-PassThru] [-Forc... | 0 |
format-iislog.ps1 | param
(
[Parameter(
Mandatory=$true,
Position = 0,
ValueFromPipeline=$true,
HelpMessage="Specifies the path to the IIS *.log file to import. You can also pipe a path to Import-Iss-Log."
)]
[ValidateNotNullOrEmpty()]
[string]
$Path,
[Parameter(
Mandatory=$true,
Position = 1,
Value... | 0 |
sample_64_63.ps1 | @{
GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
NestedModules="Microsoft.PowerShell.Commands.Management.dll"
HelpInfoURI = 'ht... | 0 |
sample_47_12.ps1 | 주제
about_IntelEthernetCmdlets
짧은 설명
IntelEthernetCmdlets 모듈을 사용하여 정보를 가져오거나 구성 설정
또는 인텔(R) 이더넷 장치를 지원해 디버그 문제에 대해 설명합니다.
긴 설명
IntelEthernetCmdlets 모듈은 시스템 내 인텔(R) 이더넷 장치에
대한 정보를 가져오거나 설정을 구성할 수 있는 cmdlet이 포함됩니다.
펌웨어 로그를 지원하는 장치에는 문제를 디버그하는 데 도움이 되는
로그를 구성하고 생성할 수 있습니다.
... | 0 |
1284.ps1 |
function Set-CHostsEntry
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[Net.IPAddress]
$IPAddress,
[Parameter(Mandatory=$true)]
[string]
$HostName,
[string]
$Description,
... | 0 |
284.ps1 |
[CmdletBinding()]
Param(
[Parameter(Mandatory=$TRUE, HelpMessage="Name of capacity for scaling or target for workspaces migration.")]
[string]$CapacityName,
[Parameter(Mandatory=$TRUE, HelpMessage="ResourceGroup of capacity for scaling or tar... | 0 |
1572.ps1 |
function Invoke-MrPesterToSpeech {
[CmdletBinding()]
param (
[switch]$Quiet
)
$Params = @{}
if ($PSBoundParameters.Quiet) {
$Params.Quiet = $true
}
$Results = Invoke-Pester -PassThru @Params |
Select-Object -ExpandProperty TestResult
foreach ($Result in $Results) ... | 0 |
sample_33_24.ps1 | #
# This script launches the VC redist executable and handles certain error scenarios.
#
param(
[Parameter(Mandatory=$true)][String][ValidateNotNullOrEmpty()]$PayloadDirectory,
[Parameter(Mandatory=$true)][String][ValidateSet("arm64","x64","x86")]$Architecture,
[Parameter(Mandatory=$true)][String][Val... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.