filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
HelpModules 2.0.ps1
# HelpModules # A Module for generating module stubs so you can Update-Help (or Save-Help) # Includes two options for reading the help from those modules (StubFunctions or Get-ModuleHelp) # 1.0 - 2013/2/1 - Initial release Friday, Feb 1st, 2013 # 2.0 - 2013/2/1 - Updated release with improved pipeline/remot...
0
sample_60_32.ps1
# # Module manifest for module 'OCI.PSModules.Loganalytics' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loganalytics.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditi...
0
New-Eicar.ps1
function New-Eicar { <# .SYNOPSIS New-Eicar Author: Chris Campbell (@obscuresec) License: BSD 3-Clause .DESCRIPTION A function that generates the EICAR string to test ondemand scanning of antivirus products. .PARAMETER $Path Specifies the path to write the eicar file...
0
sample_50_5.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 = '83.2.0' # Supported PSEditions Comp...
0
Edit-File in Notepad++_1.ps1
<# .Synopsis Open a file for editing in notepad++ .Description Opens one or more files in Notepad++, passing all the switches each time. Accepts filenames on the pipeline .Notes I took the "no" off the parameters, because in PowerShell you only need to enter just enough of the parameter name to differ...
0
sample_24_84.ps1
<# .SYNOPSIS Adds whatever IPAddress you want to a remote sessions Hosts file .PARAMETER Session Passed in Remote session object that can be generated from Local-Create-Remote-Session.ps1 .PARAMETER IPAddress Any specific IP Address you want to use, for this particular script, we generally use it for 127....
0
sample_45_95.ps1
/* eslint-disable no-undef */ var plugin = require("plugin-vs-v2"); if (typeof plugin != "undefined") { plugin.Messaging.addEventListener("pluginready", function () { setHtmlText(); }); } function setHtmlText() { // resource strings used by docker.web.default.html setTextContent("#dockerWebCor...
0
sample_51_94.ps1
# # Module manifest for module 'OCI.PSModules.Certificatesmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificatesmanagement.dll' # Version number of this module. ModuleVersion = '75.1.0' ...
0
3200.ps1
function Invoke-Parallel { [cmdletbinding(DefaultParameterSetName='ScriptBlock')] Param ( [Parameter(Mandatory=$false,position=0,ParameterSetName='ScriptBlock')] [System.Management.Automation.ScriptBlock]$ScriptBlock, [Parameter(Mandatory=$false,ParameterSetName='ScriptFile')] ...
0
Create datastore by LUN .ps1
function New-DatastoreByLun { param( [string]$vmHost, [string]$hbaId, [int]$targetId, [int]$lunId, [string]$dataStoreName ) $view = Get-VMHost $vmHost | get-view $lun = $view.Config.StorageDevice.ScsiTopology | ForEach-Object { $_.Adapter } | Where-Object {$_.Key -match $hbaId} | ForEach-Object {$_.Target} | ...
0
36.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...
0
sample_54_95.ps1
<# .SYNOPSIS SyncShare.psd1 file This is a place-holder module file only for agent patch build purposes #> Write-Host "This module functionality is deprecated and is place-holder only" # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEE...
0
1748.ps1
[CmdletBinding(DefaultParameterSetName = "NotByPath")] param ( [parameter(Mandatory = $true, ParameterSetName = "ByPath")] [switch]$Force, [string] $PowerShellHome ) Set-StrictMode -Version Latest if (! ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::Get...
0
sample_28_98.ps1
class AzStackHciConnectivityTarget { # Attributes for Azure Monitor schema [string]$Name #Name of the individual test/rule/alert that was executed. Unique, not exposed to the customer. [string]$Title #User-facing name; one or more sentences indicating the direct issue. [string]$Severity #Severity o...
0
sample_2_19.ps1
#************************************************ # Version 1.0.0 # Date: 02-14-2012, 2021 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Runs Configuration Manager 2007 Diagnostics locally and/or remotely. # 0) Loads ConfigMgr Environment Information from Utils\utils_ConfigMgr07.ps1 # 1) Get...
0
sample_22_67.ps1
$target = (Join-Path $PSScriptRoot config.cmd) cmd /c "$target" ## Setup Skype User Account ############################ # Load Skype User Reg Keys reg.exe load HKU\Skype $Env:SystemDrive\Users\Skype\NTUSER.DAT # Import the keys specific to the Skype user $SkypeUserReg = (Join-Path $PSScriptRoot SkypeUser....
0
sample_20_56.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_12_98.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 = '81.0.0' # Supported PSEditions Co...
0
mklink.ps1
using System; using System.Text; using System.IO; using System.Runtime.InteropServices; namespace mklink { class mklink { [DllImport("kernel32.dll")] static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int dwFlags); static void Main(st...
0
sample_59_60.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 = 'https://aka...
0
Install-Solarized_1.ps1
[CmdletBinding()] param($Path = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Accessories\\Windows PowerShell\\Windows PowerShell.lnk" ) # SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB # --------- ------- ---- ------- ----------- ---------- ----------- ----------- ...
0
sample_48_62.ps1
# # Module manifest for module 'OCI.PSModules.Servicemesh' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicemesh.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEdition...
0
sample_40_99.ps1
# # Script module for module 'Az.LogicApp' that is executed when 'Az.LogicApp' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 02/29/2024 09:34:59 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { ...
0
1360.ps1
function New-CCredential { [CmdletBinding()] [OutputType([Management.Automation.PSCredential])] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams","")] param( [Alias('User')] [string] $UserName, [Parameter(Mandatory...
0
sample_46_57.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> $ErrorActionPreference = 'Stop' $observabilityNuget...
0
sample_35_77.ps1
# # Script module for module 'Az.Relay' that is executed when 'Az.Relay' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 04/23/2024 13:01:43 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { if ...
0
sample_28_16.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_4_34.ps1
<# .SYNOPSIS MSRD-Collect 'data collection' specific functions .DESCRIPTION Module for the MSRD-Collect local 'data collection' 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...
0
sample_52_21.ps1
param() if ($env:AzPSAutorestTestPlaybackMode) { $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' . ($loadEnvPath) return $env.SubscriptionId } return (Get-AzContext).Subscription.Id # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # B...
0
sample_43_9.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Security.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.Security.Module]::Instance # Export nothing to clear implicit exports ...
0
sample_51_28.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # # Azure File Sync: List per item sync errors # # Version 2.3...
0
Get-InstalledProgram_v_4.ps1
function Get-InstalledProgram() { param ( [String[]]$Computer, $User ) ############################################################################################# if ($User) {$Connection = Get-Credential -Credential $User} ########################################################################################...
0
2131.ps1
Describe "Split Operator" -Tags CI { Context "Binary split operator" { It "Binary split operator can split array of value" { $res = "a b", "c d" -split " " $res.count | Should -Be 4 $res[0] | Should -Be "a" $res[1] | Should -Be "b" $res[2] | Shou...
0
sample_1_16.ps1
Get-ChildItem -Path $PSScriptRoot\*.ps1 | Foreach-Object{ . $_.FullName } # SIG # Begin signature block # MIItDQYJKoZIhvcNAQcCoIIs/jCCLPoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDfA60pZ8m/WODa # 6KPKEwub...
0
4358.ps1
function Get-AuthenticodePublisher { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [System.Management.Automation.Signature] $AuthenticodeSignature ) if($AuthenticodeSignature.SignerCertificate) { $chain = New-Object System.Security.Cryptography.X509Certi...
0
sample_41_94.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function ConvertTo-ScriptExtent { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding()] [OutputType([System.Management.Automation.Language.IScriptExtent])] param( [Parameter(...
0
sample_17_21.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 = '79.0.0' # S...
0
sample_44_76.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_Mp...
0
3649.ps1
function Test-ManagedInstanceActiveDirectoryAdministrator { $rg = Create-ResourceGroupForTest $vnetName = "cl_initial" $subnetName = "Cool" $virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location $subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq...
0
Sync-Time_3.ps1
function sync-time( [string] $server = "sync-time 0.pool.ntp.org, clock.psu.edu", [int] $port = 37) { $servertime = get-time -server $server -port $port -set #leave off -set to just check the remote time write-host "Server time:" $servertime write-host "Local time :" $(date) }
0
VMware Lab Manager _1.x.ps1
function Ignore-SslErrors { # Create a compilation environment $Provider=New-Object Microsoft.CSharp.CSharpCodeProvider $Compiler=$Provider.CreateCompiler() $Params=New-Object System.CodeDom.Compiler.CompilerParameters $Params.GenerateExecutable=$False $Params.GenerateInMemory=$True $Params.IncludeDebugIn...
0
1463.ps1
function Get-CPrivilege { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Identity ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState [Carbon.Security.Privilege]::GetPrivi...
0
4218.ps1
$pscanloaded = $null function PortScan { param( [Parameter(Mandatory=$true)][string]$IPaddress, [Parameter(Mandatory=$false)][string]$Ports="1-1000", [Parameter(Mandatory=$false)][string]$maxQueriesPS=1000, [Parameter(Mandatory=$false)][int]$Delay=0 ) if ($psversiontable.PSVersion.Major -lt 4) { try { ...
0
sample_3_16.ps1
var OfficeaicopilotStrings={ChatContainerKeepItActionButtonText:"Conservar",ChatContainerUndoActionButtonText:"Desfacer",ChatContainerInsertActionButtonText:"Inserir",ChatContainerFeedbackNudgeContent:"Axúdanos a aprender e a adestrar os modelos marcando os resultados que xeren os LLM cun polgar cara arriba ou cara aba...
0
Function Run-Script_4.ps1
################################################################################# # This function should be included in the PowerShell ISE profile.ps1 and it will # display the start and end times of any scripts started by clicking 'Run Script' # in the Add-ons Menu, or F2; additionally they will be logged to the S...
0
2311f39b-7495-4f1a-9a8b-bc425f057624.ps1
function Get-EasterWestern { Param( [Parameter(Mandatory=$true)] [int] $Year ) $a = $Year % 19 $b = [Math]::Floor($Year / 100) $c = $Year % 100 $d = [Math]::Floor($b / 4) $e = $b % 4 $f = [Math]::Floor(($b + 8) / 25) $g = [Math]::Floor((($b - $f + 1) / 3)) $h = ((19 ...
0
sample_22_71.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
Connect-VMHost.ps1
#requires -version 2 -pssnapin VMware.VimAutomation.Core Function Connect-VMHost { <# .Summary Used to Connect a disconnected host to vCenter. .Parameter VMHost VMHost to reconnect to virtual center .Example Get-VMHost | Where-Object {$_.state -eq "Disconnected"} | Conne...
0
sample_22_49.ps1
# # This script just calls the Add-AppDevPackage.ps1 script that lives next to it. # param( [switch]$Force = $false, [switch]$SkipLoggingTelemetry = $false ) $scriptArgs = "" if ($Force) { $scriptArgs = '-Force' } if ($SkipLoggingTelemetry) { if ($Force) { $scriptArgs +...
0
sample_58_72.ps1
@{ GUID="A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Get-Credential", "Get-ExecutionPolicy", "Set-E...
0
1075.ps1
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'CarbonDscTest' -Resolve) -Force $UserName = 'CarbonDscTestUser' $Password = [Guid]::NewGuid().ToString() $tempDir = $null Install-User -Credential (New-Credential -UserName $UserName -Password $Password) function New-MockDir { $path = (Joi...
0
1169.ps1
$rootKey = 'hklm:\Software\Carbon\Test\Test-GetRegistryValue' function Start-TestFixture { & (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { if( -not (Test-Path $rootKey -PathType Container) ) { New-Item $rootKey -ItemType Regi...
0
sample_47_30.ps1
# # Module manifest for module 'OCI.PSModules.Resourcemanager' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Resourcemanager.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported P...
0
sample_3_24.ps1
// ================================================================== // DCIM_LCLogManagesRecord // ================================================================== [dynamic, provider("dcismprovider"), Association, Description ( "A class derived from LogManagesRecord " "that associates t...
0
New-StoredProcFunction.ps1
# New-StoredProcFunction.ps1 # Steven Murawski # http://blog.usepowershell.com # 04/08/2009 # Example: ./New-StoredProcFunction.ps1 'DataSource=MySqlServer;Database=Northwind;User=AnythingButSa;Password=abc123' sp_createnewcustomer # Example 'sp_createnewcustomer | ./New-StoredProcFunction.ps1 'DataSource=MySqlS...
0
sample_20_40.ps1
ConvertFrom-StringData @' id_printsettmpsystem32check_st=One or more TMP file found under system32 folder and this may cause problems to install printer drivers '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8...
0
3757.ps1
function Test-CreateIntegrationAccountPartner { $resourceGroup = TestSetup-CreateResourceGroup $integrationAccountName = "IA-" + (getAssetname) $integrationAccount = TestSetup-CreateIntegrationAccount $resourceGroup.ResourceGroupName $integrationAccountName $integrationAccountPartnerName = getAss...
0
471.ps1
[CmdletBinding()] Param ( [string] $Branch = "master", [switch] $UserMode, [ValidateSet('AllUsers', 'CurrentUser')] [string] $Scope = "AllUsers", [switch] $Force ) $ModuleName = "PSFramework" $BaseUrl = "https://github.com/PowershellFrameworkCollective/psframework" $SubFolder = "PSFramework" $...
0
GPRS Online log_8.ps1
<# .SYNOPSIS Get-GprsTime (V4.0 Update for Windows 7 and allow time correction) (V4.2 'Interval' now incorporate previous 'FormatSpan' function) Check the total connect time of any GPRS SIM devices from a specified date. Use 'Get-Help .\\Get-GprsTime -full' to view Help for this script. .DESCRIPTION...
0
4348.ps1
function Get-InstalledScriptDetails { [CmdletBinding()] param ( [Parameter()] [string] $Name, [Parameter()] [string] $RequiredVersion, [Parameter()] [string] $MinimumVersion, [Parameter()] [string] $MaximumVer...
0
PoSh Email Tester GUI.ps1
<# .NOTES Name : PoSh Email Tester GUI Author : Bryan Jaudon <bryan.jaudon@gmail.com> Version : 1.0 Date : 10/30/2012 .Description GUI Email tester program utilizing PowerShell Send-MailMessage cmdlet. #> #requires -version 2 #region IconExtrator TypeDef $code...
0
sample_16_6.ps1
#************************************************ # DC_DFSServer-Component.ps1 # Version x # Date: 20022 # Author: WalterE # Description: Collects information about DFS Server. # Called from: Networking Diags #******************************************************* Trap [Exception] { # Handle exception a...
0
sample_46_87.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=ėī ėīëĶ„ 및 ėœ í˜•ė˜ 환ęē― ëģ€ėˆ˜ę°€ ėīëŊļ ėĄīėžŽí•Đ니ë‹Ī. EnvironmentErrorDoesNotExists=ėī ėīëĶ„ 및 ėœ í˜•ė˜ 환ęē― ëģ€ėˆ˜ę°€ ėĄīėžŽí•˜ė§€ ė•ŠėŠĩ니ë‹Ī. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFA...
0
sample_55_11.ps1
var state = command.getTrait("state"); var manipData = services.manipulators.getManipulatorData("CameraManipulator"); var mode = manipData.getTrait("CameraManipulationMode"); var tool = new Object(); tool.activate = function () { state.value = 2; mode.value = 2; // Orbit mode } tool.deactivate = fun...
0
sample_7_53.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 = 'https://aka...
0
2620.ps1
Import-Module C:\git-repositories\PowerShell\MSFVMLab\MSFVMLab.psm1 -Force $LabConfig = Get-Content C:\git-repositories\PowerShell\MSFVMLab\LabVMS.json | ConvertFrom-Json $Servers = $LabConfig.Servers $Domain = $LabConfig.Domain foreach($network in $LabConfig.Switches){ If(!(Get-VMSwitch $network.Name -ErrorAct...
0
sample_25_62.ps1
@{ GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Start-Transcript", "Stop-Transcript" AliasesTo...
0
sample_64_27.ps1
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { t...
0
2269.ps1
function Load-Form { $Form.Controls.Add($TabControl) $TabControl.Controls.AddRange(@($TabPageGeneral, $TabPageCAS, $TabPagePrimary, $TabPageSecondary, $TabPageSiteRoles, $TabPageOther)) $TabPageGeneral.Controls.AddRange(@($OutputBoxGeneral, $BlogLink, $LabelHeader, $LabelGeneralRestart, $LabelGener...
0
sample_19_19.ps1
# Copyright (C) Microsoft Corporation. All rights reserved. # # Module manifest for module 'ProvisioningTestModule' # @{ # Version number of this module. ModuleVersion = '1.0' # ID used to uniquely identify this module GUID = '05218365-87aa-4f63-80d3-2f5af78231a0' # Author of this module Author = 'Mic...
0
sample_8_42.ps1
#************************************************ # TS_AppCompatDisabledCheck.ps1 # Version 1.0.1 # Date: 6/8/2012 # Author: v-blchen # Description: [Idea ID 3317] [Windows] DisableEngine reg entry can cause app install or registration failure # Rule number: 3317 # Rule URL: http://sharepoint/sites/rules/Rule...
0
3731.ps1
function Test-TestStreamingAnalyticsE2E { $resourceGroup = "ASASDK" $jobName = "TestJobPS" $inputName = "Input" $outputName = "Output" $transformationName = "transform1" $functionName = "scoreTweet" $expectedContainerName = "samples" $expectedTableName = "Samples" $expectedStreamingUnits =...
0
copy-data.ps1
function copy-data { param($source, $dest) $counter = 0 $files = Get-ChildItem $source -Force -Recurse foreach($file in $files) { $status = "Copying file {0} of {1}: {2}" -f $counter, $files.count, $file.name Write-Progress -Activity "Copyng Files" -Status $status -PercentComplete ($counter/$files.coun...
0
1433.ps1
function Set-CryptoKeySecurity { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [Security.Cryptography.X509Certificates.X509Certificate2] $Certificate, [Parameter(Mandatory=$true)] [Security.AccessControl.CryptoKeySecurity] $CryptoKeySecurity, [P...
0
A Process Block.ps1
Process { #Get the type of object we have $InputTypeName = $_.GetType().Name #Do something with that object #is it VMware? if ( $InputTypeName -eq "VMHostImpl" ) { $output = $_ | Get-View | Select-Object $VMHost_UUID #is it Xen? } elseif ($InputTypeName -eq "Host"){ $output = $_ | g...
0
sample_36_25.ps1
# # Module manifest for module 'OCI.PSModules.Logging' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Logging.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compat...
0
sample_53_72.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
sample_55_19.ps1
# # Module manifest for module 'OCI.PSModules.Core' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Core.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions CompatiblePS...
0
sample_20_69.ps1
# # Module manifest for module 'DscInstall' # # Generated by: Zia Jalali # # Generated on: 07/31/2017 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'Heartbeat.psm1' # Version number of this module. ModuleVersion = '1.1' # ID used to uniquely identify thi...
0
sample_37_8.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# PowerShell Diagnostics Module This module contains a set of wrapper scripts that enable a user to use ETW tracing in Windows PowerShell. #> $script:Logman="$env:windir\system32\logman.exe" $script:wsmanlogfile = "$env:wind...
0
NTFS ACLs Folder Tree_5.ps1
####################################### # TITLE: listACL.ps1 # # AUTHOR: Santiago Fernandez Mu&#241;oz # # # # DESC: This script generate a HTML # # report show all ACLs asociated with # # a Folder tree structure starting in # # root specified by the user...
0
sample_63_99.ps1
# # Module manifest for module 'OCI.PSModules.Waa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waa.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEditions CompatiblePSEd...
0
Import-CSV.ps1
Param($file,$headers) # Check for Input and fill $data if($input){$data = @();$input | foreach-Object{$data += $_}} # Check for File and Test the Path if($file) { if(Test-Path $file) { # Check for Headers... if none use import-csv if(!$headers) { import-Csv $data...
0
sample_14_80.ps1
# Copyright (C) Intel Corporation, 2021 All Rights Reserved. <# .Synopsis Invokes the Intel Active Management Technology force boot command using the One-Click Recovery boot options .Description This cmdlet invokes the Intel Active Management Technology force boot command using the One-Click Recover...
0
sample_34_32.ps1
# Localized 03/22/2024 09:01 AM (GMT) 303:7.0.30723 MsmqBpa.psd1 # # Only add new (name,value) pairs to the end of this table # Do not remove, insert or re-arrange entries # ConvertFrom-StringData @' ###PSLOC start localizing # # Install on non-DC servers # InstallOnNonDC_Title=MSMQ should b...
0
2634.ps1
function Get-FreeDBSpace{ [cmdletbinding()] param([parameter(ValueFromPipeline)][string[]] $InstanceName = 'localhost' ,[switch] $IncludeSystemDBs) BEGIN{ $output = @() } PROCESS{ $smo = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $InstanceName try{ ...
0
datareader to dataset.ps1
@@This code was copied from the site http://www.ti4fun.com @@----------------------------------------------------------- Public Function ConvDataReaderToDataTable(Byval command As System.Data.SqlClient.SqlCommand) As System.Data.DataTable Dim datatable As New System.Data.DataTable Dim reader As ...
0
sample_36_27.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
437.ps1
$registrationEvent = { } $begin_event = { function Get-LogFilePath { [CmdletBinding()] param ( ) $path = Get-PSFConfigValue -FullName 'PSFramework.Logging.LogFile.FilePath' $logname = Get-PSFConfigValue -FullName 'PSFramework.Logging.LogFile.LogName' $scriptBlock = { param ( [string...
0
sample_20_73.ps1
# Localized 05/07/2022 03:58 AM (GMT) 303:7.0.30723 MSFT_WindowsOptionalFeature.strings.psd1 # Localized resources for MSFT_WindowsOptionalFeature ConvertFrom-StringData @' ###PSLOC DismNotAvailable=PowerShell module Dism could not be imported. NotAClientSku=This Resource is only available for Windows Client. ...
0
sample_19_21.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
0
sample_63_5.ps1
function ISFrontDoorCdnProfile([string]$SkuName) { if ($SkuName -eq [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName]::PremiumAzureFrontDoor -or $SkuName -eq [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName]::StandardAzureFrontDoor) { return $true }else{ return $false ...
0
sample_59_24.ps1
@{ GUID="eb74e8da-9ae2-482a-a648-e96550fb8733" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." Description='PowerShell module for working with ZIP archives.' ModuleVersion="1.2.5" PowerShellVersion="3.0" FunctionsToExport = @('Compress...
0
CSV Validator Framework.ps1
# --- begin test-csv.ps1 --- param( [string]$Path = $(throw "require CSV path!"), [string]$RulesetPath = $(throw "require Ruleset path!") ) $csvFiles = Resolve-Path -Path $Path # load rules if ((Test-Path (Resolve-Path $RulesetPath))) { # ruleset is found, execute and assign result to vari...
0
2049.ps1
function getIndex { param([string[]]$strings,[string]$pattern) for ($i = 0; $i -lt $strings.Count; $i++) { if ($strings[$i] -like $pattern) { return $i } } return -1 } try { if ( ! $IsWindows ) { $PSDefaultParameterValues["it:pending"] = $true } Describe "CIM Objects are adapted proper...
0
sample_51_79.ps1
# # Module manifest for module 'OCI.PSModules.Ocicontrolcenter' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported...
0
996.ps1
class CsvProcessor { [psobject]$Logger [psobject]$ProcessItemFunction CsvProcessor($logger, $processItemFunction) { $this.Logger = $logger $this.ProcessItemFunction = $processItemFunction } [psobject] LoadCsv($CsvFilePath) { $resolvedCsvPath = Resolve-Path -LiteralP...
0
24.ps1
. $PSScriptRoot\Shared.ps1 Describe 'Module Manifest Tests' { It 'Passes Test-ModuleManifest' { Test-ModuleManifest -Path $moduleManifestPath | Should Not BeNullOrEmpty $? | Should Be $true } }
0
sample_8_97.ps1
#************************************************ # utils_Exchange_all_exchange_versions_withoutpowershellaccess.ps1 # Version 2.0.1 # Date: 04-12-2013 # Author: Brian Prince - brianpr@microsoft.com # Description: Utility functions for use by Exchange SDP 3.0+ manifests #****************************************...
0
4176.ps1
[CmdletBinding()] param () function Get-Architecture { [CmdletBinding()][OutputType([string])] param () $OSArchitecture = (Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture).OSArchitecture Return $OSArchitecture } function Get-RelativePath { [CmdletBinding()][OutputType([string...
0