filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_1_0.ps1
# # Module manifest for module 'OCI.PSModules.Clusterplacementgroups' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Clusterplacementgroups.dll' # Version number of this module. ModuleVersion = '92.1.0' ...
0
1826.ps1
Describe "Join-Path cmdlet tests" -Tags "CI" { $SepChar=[io.path]::DirectorySeparatorChar BeforeAll { $StartingLocation = Get-Location } AfterEach { Set-Location $StartingLocation } It "should output multiple paths when called with multiple -Path targets" { Setup -Dir SubDir1 (Join-Path -P...
0
347.ps1
function Reset-PSFConfig { [CmdletBinding(DefaultParameterSetName = 'Pipeline', SupportsShouldProcess = $true, ConfirmImpact = 'Low', HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Reset-PSFConfig')] param ( [Parameter(ValueFromPipeline = $true, ParameterSetName = 'Pipeline')] [PSFramework...
0
sample_15_84.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
sample_57_94.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 = '84.0.0' # Supported PSEditions Comp...
0
4046.ps1
param([string]$outputDir = $(throw "You must specify the output path to emit the generated file"), [string]$configuration = $(throw "You must specify the build configuration")) function WrapText($width = 74, $indent = 8) { begin { $indent = " " * $indent $whitespace = "`t`r`n ".ToCh...
0
Set-PsBreakPointLastErro.ps1
Set-StrictMode -Version Latest\n\n$lastError = $error[0]\nSet-PsBreakpoint $lastError.InvocationInfo.ScriptName `\n $lastError.InvocationInfo.ScriptLineNumber
0
Get-FileEncoding.ps1
<# .SYNOPSIS Gets file encoding. .DESCRIPTION The Get-FileEncoding function determines encoding by looking at Byte Order Mark (BOM). Based on port of C# code from http://www.west-wind.com/Weblog/posts/197245.aspx .EXAMPLE Get-ChildItem *.ps1 | select FullName, @{n='Encoding';e={Get-FileEncoding $_.FullName}} | ...
0
Get-PSVersion.ps1
Set-Alias Ver Get-PSVersion function Get-PSVersion { [string]$Major = ($PSVersionTable).PSVersion.Major [string]$Minor = ($PSVersionTable).PSVersion.Minor [string]$Out = $Major + '.' + $Minor Write-Output $Out }
0
sample_28_37.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Aks.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Aks.internal.psm1' if(Test-Path $internalModulePath) { $null = Impo...
0
2531.ps1
param ([string]$sqlserver, [string]$filename) [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Replication") | out-null [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Rmo") | out-null $TableQuery = "SELECT DISTINCT Server FROM SQLDatabases WHERE DatabaseName LIKE '%distribution%' ...
0
1085.ps1
Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $EnvVarName = "CarbonRemoveEnvironmentVar" function Assert-NoTestEnvironmentVariableAt( $Scope ) { $actualValue = [Environment]::GetEnvironmentVariable($EnvVarName, $Scope) It ('sho...
0
sample_41_16.ps1
# # Module manifest for module 'OCI.PSModules.Oda' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oda.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEd...
0
Get-Hostname.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
1198.ps1
$userDomain = $env:USERDNSDOMAIN $computerDomain = Get-WmiObject 'Win32_ComputerSystem' | Select-Object -ExpandProperty Domain if( (Get-Service -Name MSMQ -ErrorAction SilentlyContinue) -and $userDomain -eq $computerDomain ) { $publicQueueName = 'CarbonTestGetQueue-Public' $privateQueueName = 'Ca...
0
sample_46_50.ps1
# # Module manifest for module 'OCI.PSModules.Fleetsoftwareupdate' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Fleetsoftwareupdate.dll' # Version number of this module. ModuleVersion = '82.0.0' # Sup...
0
17.ps1
. $PSScriptRoot\Shared.ps1 . $modulePath\Utils.ps1 $expectedEncoding = if ($PSVersionTable.PSVersion.Major -le 5) { "utf8" } else { "ascii" } Describe 'Utils Function Tests' { Context 'Add-PoshGitToProfile Tests' { BeforeAll { [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDec...
0
sample_16_25.ps1
Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Built-By: vsts Created-By: Apache Maven Build-Jdk: 11.0.21 Name: com/microsoft/azure/toolkit/lib/appservice/deploy/FlexFunctionDe ployHandler.html SHA-256-Digest: hWh6bXy5Ig28HsqQWMIuLTIM/NEKTGekpbZxQzgnnu4= Name: jquery/jszip-utils/dist/jszip-utils.j...
0
2622.ps1
Import-Module C:\git-repositories\PowerShell\MSFVMLab\MSFVMLab.psm1 -Force $LabConfig = Get-Content C:\git-repositories\PowerShell\MSFVMLab\LabVMS.json | ConvertFrom-Json $WorkingDirectory = $LabConfig.WorkingDirectory $Domain = $LabConfig.Domain $LocalAdminCred = Import-Clixml "$WorkingDirectory\vmlab_localadmin.xml...
0
1461.ps1
function Test-CRegistryKeyValue { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Path, [Parameter(Mandatory=$true)] [string] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $...
0
sample_3_51.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_27_15.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 = '74.1.0' # Support...
0
sample_17_15.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
0
sample_21_91.ps1
# # Module manifest for module 'OCI.PSModules.Licensemanager' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Licensemanager.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSE...
0
sample_61_82.ps1
<# .SYNOPSIS MSRD-Collect global functions .DESCRIPTION Module for the MSRD-Collect global functions .NOTES Author : Robert Klemencz Requires : At least PowerShell 5.1 (This module is not for stand-alone use. It is used automatically from within the main MSRD-Collect.ps1 script) Version...
0
Beginner event 10 .ps1
# # Summer 2009 Scripting games # Beginner Event 10 - The 1,500-Meter race # http://blogs.technet.com/heyscriptingguy/archive/2009/06/18/hey-scripting-guy-2009-scripting-games-event-10-details-beginner-and-advanced-1-500-meter-race.aspx # # ToDo: In this event, you must write a script that will count down from th...
0
sample_46_43.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
sample_29_14.ps1
# make sure we stop on exceptions $ErrorActionPreference = "Stop" # This object reprents the result value for tab expansion functions when no result is returned. # This is so that we can distinguish it from $null, which has different semantics $NoResultValue = New-Object PSObject -Property @{ NoResult = $true } ...
0
sample_51_92.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
0
sample_3_1.ps1
#************************************************ # TS_MemoryManagerSystemPagesCheck.ps1 # Version 1.0.1 # Date: 5/14/2012 # Author: v-kaw # Description: [Idea ID 2389] [Windows] Hang caused by kernel memory depletion due 'SystemPages' reg key with wrong value # Rule number: 2389 # Rule URL: //sharepoint/site...
0
2624.ps1
Import-Module C:\git-repositories\PowerShell\MSFVMLab\MSFVMLab.psm1 -Force $LabConfig = Get-Content C:\git-repositories\PowerShell\MSFVMLab\LabVMS.json | ConvertFrom-Json $WorkingDirectory = $LabConfig.WorkingDirectory $Domain = $LabConfig.Domain $dc = ( $LabConfig.Servers | Where-Object {$_.Class -eq 'DomainContro...
0
sample_60_4.ps1
# # Module manifest for module 'OCI.PSModules.Computecloudatcustomer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computecloudatcustomer.dll' # Version number of this module. ModuleVersion = '86.0.0' ...
0
1512.ps1
function Assert-NotEqual { [CmdletBinding()] param( [Parameter(Position=0)] $Expected, [Parameter(Position=1)] $Actual, [Parameter(Position=2)] $Message ) if( $Expected -eq $Actual ) { ...
0
PowerShellServer Cmdlet .ps1
\n#Global Hashtable to Control all Powershell Server Runspace\nSet-Variable -name '__PSRUNSPACES__' -scope 'global' -value @{} -force\n\nfunction global:New-PowerShellServerRunspace\n{\n param(\n $Credential,\n $ErrorAction='Stop',\n [switch]$Force,\n $Password,\n $Port=22,\n $Server='127.0.0.1',\n $SSHAccept,\n...
0
sample_32_4.ps1
# # Module manifest for module 'msft.sme.sdn.route-tables' # @{ # Script module or binary module file associated with this manifest. RootModule = 'msft.sme.sdn.route-tables.psm1' # Version number of this module. ModuleVersion = '3.3.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to...
0
368.ps1
function Get-PSFTypeSerializationData { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSPossibleIncorrectUsageOfAssignmentOperator", "")] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Get-PSFTypeSerializationData')] Param ( [Parameter(ValueFromPipeline = $true)] [obj...
0
ESX host NTP Settings.ps1
<#====================================================================================== File Name : ESX-NTP.ps1 Original Author : Kenneth C. Mazie : Description : This is a VMware PowerCLI script for synchronizing NTP settings across : all ESX hosts in a Vi...
0
sample_5_90.ps1
ConvertFrom-StringData @' id_setupapilogs=Setup API Logs id_setupapilogsobtaining=Obtaining SetupAPI.*.Log id_setupapilogsoutput=SetupAPI Log id_setupapilogsoutputdesc=Device Drivers Instalation Logs '@ # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3...
0
sample_14_59.ps1
#************************************************ # TS_ClusterValidationTests.ps1 # Version 1.0.1 # Date: 07-24-2009 # Author: Andre Teixeira - andret@microsoft.com # Hacked by Jacques Boulet - jaboulet@microsoft.com - 2019-02-21 # Description: This script is used to obtain cluster validation report. # ...
0
sample_55_25.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # RemoveMDS.ps1 # Kill all Monitoring processes and clean up tra...
0
sample_49_18.ps1
[KillbotsRuleset] Name=Killbots Name[ar]=معركة الآليين Name[bs]=Ubij botove Name[ca]=Killbots Name[ca@valencia]=Killbots Name[cs]=Killbots Name[da]=Killbots Name[de]=Killbots Name[el]=Killbots Name[en_GB]=Killbots Name[eo]=Killbots Name[es]=Killbots Name[et]=Killbots Name[eu]=Killbots Name[fi]=Killbots Name[fr]=Killbot...
0
3613.ps1
function Test-NewAzureRmAlertRuleWebhook { try { Assert-Throws { New-AzAlertRuleWebhook } "Cannot process command because of one or more missing mandatory parameters: ServiceUri." $actual = New-AzAlertRuleWebhook 'http://hello.com' Assert-AreEqual $actual.ServiceUri 'http://...
0
3986.ps1
function ServiceBusTests { $location = Get-Location $resourceGroupName = getAssetName "RGName-" $namespaceName = getAssetName "Namespace1-" $namespaceName2 = getAssetName "Namespace2-" Write-Debug "Create resource group" New-AzResourceGroup -Name $resourceGroupName -...
0
3658.ps1
function Test-CreateElasticPool { $location = Get-Location "Microsoft.Sql" "operations" "Southeast Asia" $rg = Create-ResourceGroupForTest $location $server = Create-ServerForTest $rg $location try { $poolName = Get-ElasticPoolName $job = New-AzSqlElasticPool -ServerName $server.Server...
0
sample_22_89.ps1
[CmdletBinding()] param() function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string]$path) { if (!(Test-Path $path)) { return } $fileContents = Get-Content $path $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' return } $scriptsDir = split-path -parent $scri...
0
sample_16_24.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
sample_62_6.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
0
sample_37_89.ps1
# # Module manifest for module 'OCI.PSModules.Dts' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dts.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions CompatiblePSEd...
0
50.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
sample_7_0.ps1
# $ConfigXMLPath = $Path ### Do not remove this param line # 2023-02-20 WalterE mod Trap #we# trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $...
0
sample_65_56.ps1
# # Script module for module 'Az.Migrate' that is executed when 'Az.Migrate' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 07/04/2024 08:22:40 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { ...
0
sample_54_52.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> Import-Module -Name "$PSScriptRoot\..\..\Physica...
0
sample_22_58.ps1
#Volumetric soil moisture content 'Volumetric soil moisture content' = { discipline = 2 ; parameterCategory = 0 ; parameterNumber = 9 ; } #Upper layer soil temperature 'Upper layer soil temperature' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 1 ; } #Upper layer soil moisture 'Upper laye...
0
sample_30_4.ps1
import { isScalar } from '../nodes/Node.js'; function mapIncludes(ctx, items, search) { const { uniqueKeys } = ctx.options; if (uniqueKeys === false) return false; const isEqual = typeof uniqueKeys === 'function' ? uniqueKeys : (a, b) => a === b || (isScalar(a) && ...
0
1649.ps1
|: | |: | $a = "<style>"...
0
sample_43_71.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 = '83.1.0' # Supported PSEditions Compat...
0
sample_41_27.ps1
@{ RootModule = 'PSReadLine.psm1' NestedModules = @("Microsoft.PowerShell.PSReadLine2.dll") ModuleVersion = '2.1.0' GUID = '5714753b-2afd-4492-a5fd-01d9e2cff8b5' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' Description = 'Gr...
0
sample_31_24.ps1
# # Module manifest for module 'OCI.PSModules.Emwarehouse' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Emwarehouse.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEdition...
0
ADFS troubleshooting.ps1
<# This Script will check the MSOnline Office 365 setup. It will prompt the user running it to specify the credentials. It will then check compare the onsite information with the online information and inform the user if it is out of sync. #> $PSAdmin = Read-host "This script needs to be run as Administrator,...
0
Check HBA status .ps1
########################################################################################### # Title: Check HBA status # Filename: Check-HBA.ps1 # Created by: Alberto Damiano # Date: June 2009 # Version: 1.0 ########################################################################################...
0
35.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
2567.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, Description, DNSHostName, Domain, DomainRole, PartOfDomain, NumberOfProcessor...
0
sample_23_42.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
216.ps1
function Expand-ScriptAlias { [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Low')] PARAM ( [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateScript({ Test-Path -Path $_ })] [Alias('FullName')] [System.String]$Path ) PROCESS { FOREACH ($File in $Path) { Write-Verbose ...
0
sample_33_57.ps1
Import-Module $PSScriptRoot\AzStackHci.Ports.Helpers.psm1 -Force -DisableNameChecking -Global Import-Module $PSScriptRoot\..\AzStackHci.EnvironmentChecker.Utilities.psm1 -Force -DisableNameChecking -Global Import-Module $PSScriptRoot\..\AzStackHci.EnvironmentChecker.Reporting.psm1 -Force -DisableNameChecking -Global ...
0
sample_59_55.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEdition...
0
3967.ps1
function Test-NetworkSecurityGroupCRUD { $rgname = Get-ResourceGroupName $vnetName = Get-ResourceName $subnetName = Get-ResourceName $nsgName = Get-ResourceName $nicName = Get-ResourceName $domainNameLabel = Get-ResourceName $rglocation = Get-ProviderLocation ResourceMana...
0
4376.ps1
function Get-ValidModuleLocation { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $LocationString, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $ParameterName, [Parameter...
0
1812.ps1
Describe "Remove-Item" -Tags "CI" { $testpath = $TestDrive $testfile = "testfile.txt" $testfilepath = Join-Path -Path $testpath -ChildPath $testfile Context "File removal Tests" { BeforeEach { New-Item -Name $testfile -Path $testpath -ItemType "file" -Value "lorem ipsum" -Force Test-Path $...
0
sample_10_63.ps1
ConvertFrom-StringData @' id_mats_networkadapter=Network Adapter id_mats_networkadaptertype=Type id_mats_networkadapterspeed=Speed id_mats_ipaddresses=IP Addresses id_mats_defaultgateway=Default Gateway id_mats_dnsservers=DNS Servers id_mats_proxyenabled=Proxy Server id_enabled=Enabled id_mats_proxyserveradd=P...
0
Select-Random v2.2.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Joel "Jaykul" Bennett ### </Author> ### <Description> ### Selects a random element from the collection either passed as a parameter or input via the pipeline. ### If the collection is passed in as an argum...
0
sample_10_34.ps1
# Source: https://github.com/edbarnes-msft/DrDAV/blob/master/Test_MsDavConnection.ps1 <# Script name: tss_MSDavConnection.ps1 Purpose: - check WebDAV/WebClient related settings and connectivity #> param( [Parameter(Mandatory=$False,Position=0,HelpMessage='Choose a writable output folder location, i.e. C:\Temp\ ...
0
sample_33_1.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_21_3.ps1
#************************************************ # TS_2628581_HPUPDUpgrade.ps1 # Version 1.0.1 # TemplateVersion 1.2 # Date: 04/17/2012 08:02:35 # Author: jasonf # Description: Checks the registry for an HP UPD upgrade from 5.2 to 5.3 which is known to cause issues #********************************************...
0
2743.ps1
if (Get-Command Get-SmbSession -ErrorAction SilentlyContinue) { Get-SmbSession }
0
sample_50_87.ps1
define({"provide":{"provided":[645],},"provided":{"provided":[645],},"prts":{"kprtscr":[210],},"prtsc":{"kprtscr":[210],},"prtscr":{"kprtscr":[210],},"ps":{"ps":[324,325],},"ptor":{"descriptor":[378,381],},"ptp":{"ptp":[528],},"ptp同":{"启用由ptp同步的mrs以同步多个读码器同步触发":[528],},"ptp同步":{"启用由ptp同步的mrs以同步多个读码器同步触发":[528],},"ptp同步...
0
sample_64_5.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function Remove-ServiceFabric...
0
3245.ps1
class CommandAuthorizationResult { [bool]$Authorized [string]$Message CommandAuthorizationResult() { $this.Authorized = $true } CommandAuthorizationResult([bool]$Authorized) { $this.Authorized = $Authorized } CommandAuthorizationResult([bool]$Authorized, [string]$Message)...
0
sample_25_3.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
0
sample_12_56.ps1
# Initialize variables if they aren't already defined. # These may be defined as parameters of the importing script, or set after importing this script. # CI mode - set to true on CI server for PR validation build or official build. [bool]$ci = if (Test-Path variable:ci) { $ci } else { $false } # Build configuration....
0
sample_12_97.ps1
# # # Rule to look for organizations that are newer than the deployment # # Created: 5/24/2012 # Author: Jonathan Randall #****************************************************************************************************************** #region Functions function GetOrganizationData([string] $conn_string) ...
0
60e46e16-ef39-4620-84a5-bc955433e811.ps1
[void]([reflection.assembly]::LoadWithPartialName("Microsoft.office.server")) $serverContext = [Microsoft.Office.Server.ServerContext]::Default $upm = [Microsoft.Office.Server.UserProfiles.UserProfileManager]$serverContext @@ $upm.psbase.properties | ? { $_.isvisibleonviewer } | select DisplayName, name, displa...
0
Get-NTFSPermissions.ps1
<# .SYNOPSIS Author:..Vidrine Date:....2013.01.14 .DESCRIPTION Thanks to http://jfrmilner.wordpress.com/ Specify target host and root directory. The script will then recursively check for all folders and report on their NTFS permissions. Output is stored in a custom object, that is then exported...
0
sample_51_78.ps1
# # Module manifest for module 'OCI.PSModules.Queue' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Queue.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compatible...
0
sample_29_50.ps1
let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl(); let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/docker.webCore.eventHandlers.js"]; let currentScriptElement = document.querySelector("script[src='Scripts/docker.webCore.plugin.js']"); if (currentScriptElement !== nu...
0
sample_1_49.ps1
<# .SYNOPSIS DC_CM12BitlockerInfo.ps1 - Configuration Manager module for collecting bitlocker information .DESCRIPTION Leverages existing DND Module functionality to collect bitlocker information .NOTES Dev. Lead: sabieler Authors : lamosley Requires : PowerShell V4 (Supported from Windows 8.1...
0
2244.ps1
[CmdletBinding()] param( [parameter(Mandatory=$true)] $SiteServer, [parameter(Mandatory=$true)] $SiteCode, [parameter(Mandatory=$true)] $ComputerName, [parameter(Mandatory=$true)] $PastHours ) $TimeFrame = [System.Management.ManagementDateTimeConverter]::ToDmtfDateTime((Get-Date).AddHours(-$PastHours)) $TSSummary = Ge...
0
Logoff all users_2.ps1
function RemoveSpace([string]$text) { $private:array = $text.Split(" ", ` [StringSplitOptions]::RemoveEmptyEntries) [string]::Join(" ", $array) } $quser = quser foreach ($sessionString in $quser) { $sessionString = RemoveSpace($sessionString) $session = $sessionString.split() i...
0
3080.ps1
$global:ValidatorRoot = Split-Path $MyInvocation.MyCommand.Path BeforeEachFeature { New-Module -Name ValidatorTestEs { . $global:ValidatorRoot\ValidatorEs.ps1 -Verbose } | Import-Module -Global } AfterEachFeature { Remove-Module ValidatorTestEs } Given 'MiValidator finge devolver True' { Mock...
0
sample_25_45.ps1
# # Module manifest for module 'OCI.PSModules.Streaming' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Streaming.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Co...
0
sample_32_49.ps1
ConvertFrom-StringData @' ###PSLOC TestAD = Testing AD Credential can query LDAP. Result '{0}'. Expected '{1}' NoADModule = Active Directory PS Module unavailable. Install Active Directory PS Module. TestLocalCredential = Testing Local credential {0} is admin on '{1}', result '{2}'. Expected '{3}' TestClusterNodeN...
0
Bash Aliases.ps1
## Aliases Module, Bash-style aliases with functions function alias { # pull together all the args and then split on = $alias,$cmd = [string]::join(" ",$args).split("=",2) | % { $_.trim()} if($Host.Version.Major -ge 2) { $cmd = Resolve-Aliases $cmd } New-Item -Path function: -Name "Global:...
0
sample_53_1.ps1
if ((Test-Path "HKLM:\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter") -And ((Get-Item "HKLM:\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter").GetValue("Windows") -eq "Blocked")) { & reg.exe add "HKLM\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter" /v Windows /t REG_SZ /d Allowed /f } if ((Test-Pat...
0
sample_56_45.ps1
""" Module for managing PowerShell through PowerShellGet (PSGet) :depends: - PowerShell 5.0 - PSGet Support for PowerShell """ import logging import xml.etree.ElementTree import salt.utils.platform import salt.utils.versions from salt.exceptions import CommandExecutionError # Set up logging log = logging.g...
0
2975.ps1
param ( [Parameter(Mandatory)] [string] $ApiKey ) $VerbosePreference = 'Continue' $ErrorActionPreference = 'Stop' $baseDir = $PSScriptRoot try { $buildDir = "$baseDir\build\psgallery\Pester" Write-Verbose 'Importing PowerShellGet module' $psGet = Import-Module PowerShellGet -PassThru -Verbose:$fa...
0
sample_41_37.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PackageManagement.Resources.psd1 # ######################################################################################### ConvertFrom-StringDa...
0
Get-HostEntry.ps1
param ( [parameter(Mandatory=$true, ValueFromPipeline=$true)] [String[]]$HostnameOrIPs ) process { ForEach ($HostnameOrIP in $HostnameOrIPs) { try { $result = [System.Net.Dns]::GetHostEntry($HostnameOrIP) "" | select @{Name='HostName'; Expression={$result.HostName}}, @{Name='AddressList'; Expression...
0
sample_32_65.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 = '73.1.0' # Supported PSEditions Co...
0
Audit Script_2.ps1
##################################################### # # # Audit script by Alan Renouf - Virtu-Al # # Blog: http://teckinfo.blogspot.com/ # # # # Usage: Audit.ps1 'pathtolistofservers' # # # # The file is optional and needs to be a # ...
0
sample_53_12.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '82.0.0' # Sup...
0