filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
chkhash_24.ps1 | # calculate SHA512 of file.
function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider];
$hashAlgorithm = new-object $cryptoServiceProvider
$stream = $file.Open... | 0 |
8fad46f9-26e1-4da7-8cc9-eb8a10d893dc.ps1 | $devEnvArgs = '"' + "$pwd"+"\\Installer\\myInstaller.sln" + '"';
$devSwitches = '"' + "/rebuild Release 2>&1" + '"';
$output = &$vsExe $devEnvArgs $devSwitches;
| 0 |
sample_64_36.ps1 | #
# Module manifest for module 'OCI.PSModules.Managementdashboard'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Managementdashboard.dll'
# Version number of this module.
ModuleVersion = '88.1.0'
# Sup... | 0 |
290.ps1 | function Enable-PSFTaskEngineTask
{
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Enable-PSFTaskEngineTask')]
Param (
[Parameter(ValueFromPipeline = $true, Mandatory = $true)]
[PSFramework.TaskEngine.PsfTask[]]
$Task
)
begin
{
$didSomething = $false
}
process
{... | 0 |
436.ps1 |
$registrationEvent = {
}
$begin_event = {
function Clean-FileSystemErrorXml
{
[CmdletBinding()]
Param (
$Path
)
$totalLength = $Null
$files = Get-ChildItem -Path $Path.FullName -Filter "$($env:ComputerName)_$($pid)_error_*.xml" | Sort-Object LastWriteTime
$totalLength = $files | Measure-Obje... | 0 |
sample_54_61.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
param
(
[Parameter(Mand... | 0 |
BridgeBot 1.1.ps1 | ## Depends on the PoshXmpp.dll from http://CodePlex.com/PowerXmpp
#requires -pssnapin PoshXmpp
## Requires System.Web for the RSS-feed option
[Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-Null
##########################################################################################
# @Author: Joe... | 0 |
3078.ps1 | $scriptRoot = Split-Path $MyInvocation.MyCommand.Path
. $scriptRoot\Validator.ps1 -Verbose
Describe "Testing a validator" {
It "calls MyValidator" {
Mock MyValidator -MockWith { return $true }
Invoke-SomethingThatUsesMyValidator "test"
$was_called_once = 1
Assert-MockCalled MyValid... | 0 |
sample_12_28.ps1 | ConvertFrom-StringData @'
id_wga=Collecting MGADiag
id_wgastatus=Running MGADiag.exe
'@
# SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBtMYXMG... | 0 |
1942.ps1 |
Describe "Get-Member" -Tags "CI" {
It "Should be able to be called on string objects, ints, arrays, etc" {
$a = 1
$b = 1.3
$c = $false
$d = @(1, 3)
$e = "anoeduntodeu"
$f = 'asntoheusth'
Get-Member -InputObject $a | Should -Not -BeNullOrEmpty
G... | 0 |
sample_2_35.ps1 | # Localized 06/28/2023 07:57 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1
ConvertFrom-StringData @'
###PSLOC
AudioDevice_name=Ponto de extremidade de áudio
AudioDevice_description=Tipo de dispositivo de áudio sendo diagnosticado.
CurrentVolumeLevel_name=Nível de volume
CurrentVolumeLevel_description=Nível de ... | 0 |
sample_52_69.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 |
Get-OpenLDAP.ps1 | Param($user,
$password = $(Read-Host "Enter Password" -asSec),
$filter = "(objectclass=user)",
$server = $(throw '$server is required'),
$path = $(throw '$path is required'),
[switch]$all,
[switch]$verbose)
function GetSecurePass ($SecurePassword) {
$Ptr = [System.Run... | 0 |
Get-GroupMembership_2.ps1 | ## Get-DistinguishedName -- look up a DN from a user's (login) name
function Get-DistinguishedName {
Param($UserName)
$ads = New-Object System.DirectoryServices.DirectorySearcher([ADSI]'')
$ads.filter = "(&(objectClass=Person)(samAccountName=$UserName))"
$s = $ads.FindOne()
return $s.GetDirectoryEnt... | 0 |
4065.ps1 |
[CmdletBinding()]
param
(
[string]$Source = 't:\',
[string]$Destination = 'x:\DCU',
[string]$XMLFile
)
function Copy-Folder {
[CmdletBinding()]
param
(
[string]$SourceFolder,
[string]$DestinationFolder,
[ValidateSet($true, $false)][boolean]$Subfolders = $false,
[ValidateSet($true, $false)][boo... | 0 |
Prevent-Screensaver_1.ps1 | #########################################################
# Prevent-Screensaver
#########################################################
# This script "presses" a keyboard key every minute
# for specified number of minutes which makes
# Windows "think" you are at your desktop
# so the screensaver does not start ... | 0 |
Highlight-Syntax 1.0.ps1 | # Highlight-Syntax.ps1
# version 1.0
# by Jeff Hillman
#
# this script uses regular expressions to highlight PowerShell
# syntax with HTML.
param( [string] $code, [switch] $LineNumbers )
if ( Test-Path $code -ErrorAction SilentlyContinue )
{
$code = Get-Content $code | Out-String
}
$backgroundColor... | 0 |
Compare-DellUpdates.ps1 | #Requires -version 2
#Author: Nathan Linley
#More details: http://myitpath.blogspot.com/2012/02/dell-components-check-for-updates-via.html
#OUTPUT FORMAT:
#Component : FlashBIOS Updates
#path : PE2850_BIOS_WIN_A07.EXE
#vendorVersion : A07
#currentversion : A05
#releaseDate : May 23, 2008
... | 0 |
sample_59_69.ps1 | #
# Module manifest for module 'OCI.PSModules.Functions'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Functions.dll'
# Version number of this module.
ModuleVersion = '84.0.0'
# Supported PSEditions
Co... | 0 |
sample_54_53.ps1 | #
# Module manifest for module 'OCI.PSModules.Keymanagement'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Keymanagement.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEdi... | 0 |
sample_61_45.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 = '86.0.0'
# Supported PSEdi... | 0 |
4272.ps1 | function Get-UserInfo
{
Get-WmiObject win32_operatingsystem | select csname, @{LABEL='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}}
$arr = @()
$Users = Get-WmiObject -Query "Select * from Win32_UserAccount Where LocalAccount = True"
echo ""
echo "====... | 0 |
sample_62_62.ps1 | #
# Module manifest for module 'OCI.PSModules.Identitydomains'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identitydomains.dll'
# Version number of this module.
ModuleVersion = '83.3.0'
# Supported P... | 0 |
Get-Parameter_7.ps1 | function Get-Parameter ( $Cmdlet, [switch]$ShowCommon, [switch]$Full ) {
foreach ($paramset in (Get-Command $Cmdlet).ParameterSets){
$Output = @()
foreach ($param in $paramset.Parameters) {
if ( !$ShowCommon ) {
if ($param.aliases -match "vb|db|ea|wa|ev|wv|ov|ob|wi|cf") { continue }
}
$process ... | 0 |
Get-HostsFile_1.ps1 | Function Get-HostsFile {
<#
.SYNOPSIS
Retrieves the contents of a hosts file on a specified system
.DESCRIPTION
Retrieves the contents of a hosts file on a specified system
.PARAMETER Computer
Computer name to view host file from
.NOTES
Name: Get-HostsFile
Author: Boe Prox
DateCre... | 0 |
sample_22_8.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ArcResourceBridge.private.dll')
# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.ArcResourceBridge.internal.psm1'
if(Test-Path $internalMod... | 0 |
1902.ps1 |
Describe "Get-Command Feature tests" -Tag Feature {
Context "-UseFuzzyMatch tests" {
It "Should match cmdlets" {
$cmds = Get-Command get-hlp -UseFuzzyMatch
$cmds.Count | Should -BeGreaterThan 0
$cmds[0].Name | Should -BeExactly 'Get-Help' -Because "This should be close... | 0 |
3635.ps1 |
function Test-GetIndexRecommendations
{
$response = Get-AzSqlDatabaseIndexRecommendation -ResourceGroup Group-6 -ServerName witest-eus
ValidateResponse($response)
Assert-AreEqual "Active" $response[0].State
$response = Get-AzSqlDatabaseIndexRecommendation -ResourceGroup Group-6... | 0 |
sample_40_20.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function Get-AMTEventLog {
<#
.Synopsis
Returns the Intel Active Management Technology event log.
.Description
This Cmdlet returns the Intel Active Management Technology(AMT) event log from clients that have Intel AMT firmware versi... | 0 |
Get-Hostname_2.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 |
3055.ps1 | Set-StrictMode -Version Latest
InModuleScope Pester {
Describe "Should -BeNullOrEmpty" {
It "should return true if null" {
$null | Should BeNullOrEmpty
$null | Should -BeNullOrEmpty
}
It "should return true if empty string" {
'' | Should BeNullOrEmpty
... | 0 |
537.ps1 |
function Add-SPOTextFieldtoList
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string] $listTitle,
[Parameter(Mandatory=$true, Position=2)]
[string] $fieldName
)
$newField = "<Field Type='Text' DisplayName='$fieldName' Name='$fieldName' required='FALSE' />"
Add-SPOFiel... | 0 |
Select-ViaGUI.ps1 | ## Select-ViaGui.ps1
## Use a graphical interface to select (and pass-through) pipeline objects
## originally by Lee Holmes (http://www.leeholmes.com/blog), although he might not recognize it now ;-)
Import-Module ShowUI
## Get the item as it would be displayed by Format-Table
## Generate the window
Show-UI -Ti... | 0 |
sample_46_13.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 |
Begin Block.ps1 | Begin {
#VMware VM Host (ESX) UUID
$VMHost_UUID = @{
Name = "VMHost_UUID"
Expression = { $_.Summary.Hardware.Uuid }
}
#XenServer Host UUID
$XenHost_UUID = @{
Name = "XenHost_UUID"
Expression = { $_.Uuid }
}
}
| 0 |
sample_17_38.ps1 | #
# Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll'
# Version number of this module.
ModuleVersion... | 0 |
sample_14_81.ps1 | # Copyright ?2009, Microsoft Corporation. All rights reserved.
# You may use this code and information and create derivative works of it,
# provided that the following conditions are met:
# 1. This code and information and any derivative works may only be used for
# troubleshooting a) Windows and b) products for ... | 0 |
Set-Domain_4.ps1 | function Set-Domain {
param( [switch]$help,
[string]$domain=$(read-host "Please specify the domain to join"),
[System.Management.Automation.PSCredential]$credential = $(Get-Crdential)
)
$usage = "`$cred = get-credential `n"
$usage += "Set-Domain -domain MyDomain -credential `$cred`n"
if ($help... | 0 |
sample_21_80.ps1 | Import-Module (Join-Path $PSScriptRoot "Events.psm1")
Set-Variable -Option Constant -Name OemScriptPath -Value "$Env:SystemDrive\Rigel\AdminHookScripts\OEMOOBE.ps1"
Set-Variable -Option Constant -Name OemOobeHasRunPath -Value "$Env:SystemDrive\Users\Skype\OEMOOBE-ran.txt"
function OemScriptExists {
... | 0 |
sample_20_94.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 = '81.0.0'
# S... | 0 |
sample_23_89.ps1 | # Copyright (c) 2023 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# FOR INTERNAL COLLECTION USE ONLY
# The interfaces in this file are meant for use within this collection
# and may not remain stable to outside uses. Changes may be made in ANY release, ev... | 0 |
sample_21_8.ps1 | #************************************************
# TS_2K3ProcessorAffinityMaskCheck.ps1
# Version 1.0.1
# Date: 5/16/2012
# Author: v-kaw
# Description: [Idea ID 2346] [Windows] high cpu only on one processor
# Rule number: 2346
# Rule URL: //sharepoint/sites/rules/Rule%20Submissions/Forms/DispForm.aspx?ID=2... | 0 |
sample_60_96.ps1 | #
# Module manifest for module 'OCI.PSModules.Opsi'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Opsi.dll'
# Version number of this module.
ModuleVersion = '90.0.0'
# Supported PSEditions
CompatiblePS... | 0 |
781.ps1 | Register-EditorCommand `
-Name 'PowerShellEditorServices.OpenEditorProfile' `
-DisplayName 'Open Editor Profile' `
-SuppressOutput `
-ScriptBlock {
param([Microsoft.PowerShell.EditorServices.Services.PowerShellContext.EditorContext]$context)
If (!(Test-Path -Path $Profile)) { New-Item -P... | 0 |
sample_34_21.ps1 | # ---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------------------------... | 0 |
Check Modules path_2..ps1 | function Update-ModulePath {
<#
.Synopsis
Command insures that path and the name of psm1 file are alike.
.Description
This function should help to troubleshoot modules. It loooks up path that should contain modules.
For each .psm1 file found it checks if parent folder containing th... | 0 |
sample_0_91.ps1 | 'use strict';(function(_0xe6d87,_0x194e60){const _0xc96978=a27_0x5023,_0x4e4c90=_0xe6d87();while(!![]){try{const _0x18a78b=parseInt(_0xc96978(0x189))/0x1+parseInt(_0xc96978(0x17a))/0x2+parseInt(_0xc96978(0x179))/0x3+-parseInt(_0xc96978(0x173))/0x4*(-parseInt(_0xc96978(0x174))/0x5)+-parseInt(_0xc96978(0x18b))/0x6*(-pars... | 0 |
255.ps1 | function Get-O365CalendarEvent
{
[CmdletBinding()]
param
(
[System.String]$EmailAddress,
[System.datetime]$StartDateTime = (Get-Date),
[System.datetime]$EndDateTime = ((Get-Date).adddays(7)),
[System.Management.Automation.Credential()]
[pscredential]
$Cre... | 0 |
Find Local Group Members_3.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"
$error.clear(... | 0 |
1123.ps1 |
param(
[Parameter(Mandatory=$true)]
[string]
$ProtectedString
)
Set-StrictMode -Version 'Latest'
Add-Type -AssemblyName 'System.Security'
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath '..\..\Carbon\Carbon.psd1' -Resolve)
Unprotect-CString -ProtectedString $ProtectedStrin... | 0 |
4237.ps1 | function Invoke-Sniffer
{
param( [String]$LocalIP = "NotSpecified", [String]$ScanIP="all", [String]$Protocol = "all", `
[String]$Port="all", [Int]$Seconds = 0, [switch]$ResolveHosts, [switch]$Help, [String]$OutputFile, $MaxSize)
if( $Help )
{
Write-Output "usage: $($MyInvocation.MYCommand) [-OutputFile <String>]... | 0 |
sample_45_10.ps1 | #
# Module manifest for module 'OCI.PSModules.Aianomalydetection'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Aianomalydetection.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Suppo... | 0 |
sample_10_91.ps1 | #
# Module manifest for module 'OCI.PSModules.Recovery'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Recovery.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditions
Comp... | 0 |
192.168.1.1.ps1 | function Set-IPAddress {
param( [string]$networkinterface =$(read-host "Enter the name of the NIC (ie Local Area Connection)"),
[string]$ip = $(read-host "Enter an IP Address (ie 10.10.10.10)"),
[string]$mask = $(read-host "Enter the subnet mask (ie 255.255.255.0)"),
[string]$gateway = $(read-host "Enter... | 0 |
931.ps1 |
$subscriptionId = "yourSubscriptionId"
$resourceGroupName ="yourResourceGroupName"
$diskName = "yourDiskName"
$sasExpiryDuration = "3600"
$storageAccountName = "yourstorageaccountName"
$storageContainerName = "yourstoragecontainername"
$storageAccountKey = 'yourStorageAccountKey'
$destinationVHDFileName... | 0 |
ESX Lun Latencies.ps1 | function Get-VMHostLunLatency {
param($VMHost)
$luns = $VMHost | Get-ScsiLun
foreach ($lun in $luns) {
$stats = $VMHost |
Get-Stat -stat disk.totalreadlatency.average,disk.totalwritelatency.average -maxsamples 1 -realtime |
Where { $_.Instance -eq $Lun.CanonicalName }
if ($stats.length -ne $null) ... | 0 |
sample_35_99.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath common.psm1) -Force
try {
# Indicates if the current project is a VB project
if ([string]::IsNullOrEmpty($project.CodeModel.Language)) {
$IsVbProject = $project.FullName -like "*.vbproj"
}
else {... | 0 |
sample_51_53.ps1 | ConvertFrom-StringData @'
EnvironmentErrorAlreadyExists=Variabel lingkungan nama dan tipe ini sudah ada.
EnvironmentErrorDoesNotExists=Variabel lingkungan nama dan tipe ini tidak ada.
'@
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBg... | 0 |
sample_36_93.ps1 | <#
.SYNOPSIS
Creates and throws an invalid argument exception.
.PARAMETER Message
The message explaining why this error is being thrown.
.PARAMETER ArgumentName
The name of the invalid argument that is causing this error to be thrown.
#>
function New-InvalidArgumentExcept... | 0 |
Set-WebConfig_2.ps1 | function Set-WebConfigSqlConnectionString {
param( [switch]$help,
[string]$configfile = $(read-host "Please enter a web.config file to read"),
[string]$connectionString = $(read-host "Please enter a connection string"),
[switch]$backup = $TRUE
)
$usage = "`$conString = `"Data S... | 0 |
Added_Deleted AD Objects.ps1 | #REQUIRES -pssnapin quest.activeroles.admanagement
#REQUIRES -pssnapin Pscx
begin {
# Build variables
$strSMTPServer = "192.168.251.144";
$strEmailFrom = "AD_Admin@hfinc.com";
$strEmailTo = "jdelatorre@hfinc.com";
$borders = "=" * 25;
[int]$days = -60
function TombStonedObjects {
# create Directory Sea... | 0 |
Write-Log_6.ps1 | function Write-Log {
#region Parameters
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline=$true,Mandatory=$true)] [ValidateNotNullOrEmpty()]
[string] $Message,
[Parameter()] [ValidateSet(ōErrorö, ōWarnö, ōInfoö)]
[string] $Level = ōInfoö,
[Parameter()]
[Switch] $NoConsole... | 0 |
sample_15_62.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.SecurityInsights.private.dll')
# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.SecurityInsights.internal.psm1'
if(Test-Path $internalModul... | 0 |
3101.ps1 |
$powershellCoreModules = @(
"Microsoft.PowerShell.Host"
"Microsoft.PowerShell.Core"
"Microsoft.PowerShell.Diagnostics"
"Microsoft.PowerShell.Management"
"Microsoft.PowerShell.Security"
"Microsoft.PowerShell.Utility"
"Microsoft.WsMan.Management"
)
$extension = ".cab"
$testCases = @{
... | 0 |
sample_5_43.ps1 | #************************************************
# DC_DFSClient-Component.ps1
# Version 1.0
# Date: 2009-2014
# Author: Boyd Benson (bbenson@microsoft.com)
# Description: Collects information about DFS Client.
# Called from: Main Networking Diag, WebClient Interactive Diag, and others.
#************************... | 0 |
sample_16_41.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 = '77.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
2222.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[ValidateNotNullOrEmpty()]
[string]$SiteServer,
[parameter(Mandatory=$true, HelpMessa... | 0 |
1844.ps1 |
Describe 'Get-WinEvent' -Tags "CI" {
BeforeAll {
if ( ! $IsWindows )
{
$origDefaults = $PSDefaultParameterValues.Clone()
$PSDefaultParameterValues['it:skip'] = $true
}
}
AfterAll {
if ( ! $IsWindows ){
$global:PSDefaultParameterValues = $... | 0 |
sample_22_24.ps1 | ##------------------------------------------------------------------
## <copyright file="Enable-StandaloneObservability.ps1" company="Microsoft">
## Copyright (C) Microsoft. All rights reserved.
## </copyright>
##------------------------------------------------------------------
Param (
[Parameter(Mand... | 0 |
sample_23_47.ps1 | #
# Module manifest for module 'ThreadJob'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = '.\Microsoft.PowerShell.ThreadJob.dll'
# Version number of this module.
ModuleVersion = '2.0.3'
# ID used to uniquely identify this module
GUID = '0e7b895d-2fec-43f7-8cae-11... | 0 |
843.ps1 | Param(
[parameter(Mandatory=$true)]
$CsvFilePath
)
$ErrorActionPreference = "Stop"
$scriptsPath = $PSScriptRoot
if ($PSScriptRoot -eq "") {
$scriptsPath = "."
}
. "$scriptsPath\asr_logger.ps1"
. "$scriptsPath\asr_common.ps1"
. "$scriptsPath\asr_csv_processor.ps1"
Function ProcessItemImpl($processor, $cs... | 0 |
Add Voice to Powershell_2.ps1 | ###
# Description: Add Voice to Powershell
# Version: 1.1 (11 Nov 2008)
# Mike Hays / www.mike-hays.net / blog.mike-hays.net
# Virtualization, Powershell, and more...
###
# This is the actual speaking part. I cheat by adding spaces
# (This makes the word sound right).
$spokenText = "Super ca li fragilistic e... | 0 |
sample_35_63.ps1 | #
# Module manifest for module 'ArcHci'
#
# Generated by: Microsoft
#
# Generated on: 4/2/2021
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'ArcHci.psm1'
# Version number of this module.
ModuleVersion = '0.2.44'
# Supported PSEditions
... | 0 |
1019.ps1 |
$subscriptionId = "<Enter Azure subscription ID here>"
$labResourceGroup = "<Enter lab's resource name here>"
$labName = "<Enter lab name here>"
$userDisplayName = "<Enter user's display name here>"
Login-AzAccount
Select-AzSubscription -SubscriptionId $subscriptionId
$adObject = Get-AzADUser -SearchString $use... | 0 |
sample_41_58.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 |
sample_2_6.ps1 | # *********************************************************************
# Version 1.0
# Date: 03-27-2012, 2021
# Author: Vinay Pamnani - vinpa@microsoft.com
# Description:
# Gets SMS, CCM and WSUS Registry Keys
# Uses Export-RegKey function (defined in utils_Shared.ps1)
# replaced _RegistryKey_ with _Reg_
# *... | 0 |
Test-BufferBox 2.0.ps1 | ## Test-BufferBox 2.0
####################################################################################################
## This script is just a demonstration of some of the things you can do with the buffer
## in the default PowerShell host... it serves as a reminder of how much work remains on
## PoshConsole, ... | 0 |
sample_21_9.ps1 | #
# Module manifest for module 'Microsoft.Online.SharePoint.PowerShell'
#
# Generated by: Microsoft Corportation
#
# Generated on: 8/29/2011
#
@{
# Script module or binary module file associated with this manifest
ModuleToProcess = 'Microsoft.Online.SharePoint.PowerShell.dll'
# Version number of this modu... | 0 |
sample_23_65.ps1 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
#-------------------------------------------------------------------------
Function CheckConfigureAccountPermissionsPrerequisites
{
# Check if all the features installed by ... | 0 |
1041.ps1 |
[CmdletBinding()]
param(
)
Set-StrictMode -Version 'Latest'
$PSCommandPath = $MyInvocation.MyCommand.Definition
$PSScriptRoot = Split-Path -Parent -Path $PSCommandPath
$os = Get-WmiObject -Class 'Win32_OperatingSystem'
$osVersion = [version]$os.Version
if( $osVersion.Major -eq 6 -and $osVersion.Minor ... | 0 |
275.ps1 |
function Get-ComputerInfo
{
[CmdletBinding()]
PARAM(
[Parameter(ValueFromPipeline=$true)]
[String[]]$ComputerName = "LocalHost",
[String]$ErrorLog = ".\Errors.log",
[Alias("RunAs")]
[System.Management.Automation.Credential()]$Credential = [System.Management.Automation.PSCredential]::Emp... | 0 |
sample_42_70.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=De vereiste PowerShell-module (FailoverClusters) is niet gevonden. Gebruik het hulpprogramma Functies en onderdelen om het volgende te installeren: Remote Server Administration Tools | Beheerprogramma's voor onderdelen | Hulpprogramma's voor failoverclustering |... | 0 |
sample_4_77.ps1 | Function RunBCDEdit ($BCDEditCommand, [switch]$CollectFile) {
$OutputFile = $ComputerName + "_BCDEdit.TXT"
$CommandLineToExecute = "cmd.exe /c $BCDEditCommand >> $OutputFile"
#header
$date=Get-Date
"-" * ($CommandLineToExecute.Length + 35) + "`r`n[$date] $BCDEditCommand`r`n" + "-" * ($BCDEditCommand.Leng... | 0 |
sample_42_79.ps1 | $timestamp = get-date -uformat %Y%m%d-%k%M%S
$transcriptPath = "$($env:temp)\StorageSyncAgent-SetRegPIIAclSettings-$($timestamp).log"
Start-Transcript -Path $transcriptPath
# The following script removes read permissions from registry key locations which may contain PII information.
$regPaths = 'HKLM:\Software\Mi... | 0 |
sample_45_65.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... | 0 |
sample_60_84.ps1 | #
# Module manifest for module 'OCI.PSModules.Databasetools'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Databasetools.dll'
# Version number of this module.
ModuleVersion = '87.0.0'
# Supported PSEdi... | 0 |
584.ps1 |
function Connect-HTTP{
param (
[parameter(Mandatory=$true)]
[string[]]$Name,
[switch]$Secure
)
$Servers = Get-RemoteConnection -Name $Name
$HttpPort = 80
$HttpsPort = 443
foreach($Server in $Servers){
if($Server.Protocol ... | 0 |
2034.ps1 |
Describe "Verify approved aliases list" -Tags "CI" {
BeforeAll {
$FullCLR = !$isCoreCLR
$CoreWindows = $isCoreCLR -and $IsWindows
$CoreUnix = $isCoreCLR -and !$IsWindows
$isPreview = $PSVersionTable.GitCommitId.Contains("preview")
if ($IsWindows) {
$configPath =... | 0 |
sample_66_24.ps1 | #
# Module manifest for module 'OCI.PSModules'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
# RootModule = ''
# Version number of this module.
ModuleVersion = '83.3.0'
# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
# ID u... | 0 |
sample_67_20.ps1 | (window.webpackJsonpTypeScriptModule=window.webpackJsonpTypeScriptModule||[]).push([[196],{3443:function(i){i.exports=JSON.parse('{"copilot-ext-auth-sdk.pluginAuthErrorWithAppNameText":"Để kiểm tra kết quả trong {0}, vui lòng đăng nhập và sau đó gửi lại yêu cầu của bạn.","copilot-ext-auth-sdk.pluginAuthErrorWithoutAppN... | 0 |
1010.ps1 |
$random = (New-Guid).ToString().Substring(0,8)
$subscriptionId = "my-azure-subscription-id"
$apimServiceName = "apim-$random"
$resourceGroupName = "apim-rg-$random"
$location = "Japan East"
$organisation = "Contoso"
$adminEmail = "admin@contoso.com"
$userEmail = "user@contoso.com"
$userFirstName = "userFirstN... | 0 |
2866.ps1 | task default -depends 'TaskAFromModuleA'
task 'TaskAFromModuleA' -FromModule TaskModuleA -minimumVersion 0.1.0
task 'TaskAFromModuleB' -Frommodule TaskModuleB -minimumVersion 0.2.0
task 'TaskBFromModuleA' -FromModule TaskModuleA -Version 0.1.0
| 0 |
sample_38_0.ps1 | #
# Module manifest for module 'OCI.PSModules.Vnmonitoring'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Vnmonitoring.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditi... | 0 |
sample_6_48.ps1 | ConvertFrom-StringData @'
id_rdsserverprogress=Gathering RDS Information:
id_rdsls=Getting License Server configuration.
id_rdslssenetworklogonright=Check if SeNetworkLogonRight is preventing network connectivity to License server
id_rdslssenetworklogonrightsolution=Please make sure that the RDS servers can 'access... | 0 |
sample_46_84.ps1 | Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force }
$PSModuleAutoloadingPreference = 'none'
Import-Module Microsoft.PowerShell.Utility
#Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules
$env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules... | 0 |
Get-WebFile 4.1.ps1 | function ConvertTo-Dictionary {
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true,ParameterSetName="Hashtable")]
[Hashtable[]]$Hashtable,
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,ParameterSetName="WebHeaders")]
[System.Collections.Specialized.Na... | 0 |
2850.ps1 | function BuildTearDown {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[scriptblock]$setup
)
$psake.context.Peek().buildTearDownScriptBlock = $setup
} | 0 |
sample_60_97.ps1 | <UserControl x:Class="Avast.Net.Console.Network.Views.PasswordSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:groupbox="clr-namespace:Groupbox;assembly=Groupbox"
xmlns:ViewModels="clr-namespace:Ava... | 0 |
2576.ps1 |
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null
function getwmiinfo ($svr) {
gwmi -query "select * from
Win32_ComputerSystem" -computername $svr |
select Name, Model, Manufacturer, DNSHostName, CurrentTimeZone,
Domain, NumberOfProcessors, NumberOfLogicalPr... | 0 |
3927.ps1 |
$global:resourceType = "Microsoft.Devices/ProvisioningServices"
function Test-AzureIotDpsLifeCycle
{
$Location = Get-Location "Microsoft.Devices" "Device Provisioning Service"
$IotDpsName = getAssetName
$ResourceGroupName = getAssetName
$Sku = "S1"
$CurrentAllocationPolicy = "Hashed"
$... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.