filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_19_92.ps1
# # Module manifest for module 'OCI.PSModules.Events' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Events.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions Compatib...
0
sample_11_34.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
4071.ps1
[CmdletBinding()] param ( [switch] $OutputFile, [string] $TextFileLocation = '\\drfs1\DesktopApplications\ProductionApplications\Waller\MappedDrivesReport\Reports', [string] $UNCPathExclusionsFile = "\\drfs1\DesktopApplications\ProductionApplications\Waller\MappedDrivesReport\UNCPathExclusions.txt", [switch] $...
0
MailChimp .ps1
#Author: Ant B 2012 #Purpose: Batch feed recipients to MailChimp # Check for ActiveDirectory Module and load if it isn't already. if ( (Get-Module -Name ActiveDirectory -ErrorAction SilentlyContinue) -eq $null ) { Import-Module ActiveDirectory } $ie = new-object -com "InternetExplorer.Application" # V...
0
Modal File Dialogs.ps1
Add-Type -TypeDefinition @" using System; using System.Windows.Forms; public class Win32Window : IWin32Window { private IntPtr _hWnd; public Win32Window(IntPtr handle) { _hWnd = handle; } public IntPtr Handle { get { return _hWnd; } } } "@ -Referenced...
0
2913.ps1
Framework '4.6' task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) {} else { $output = &msbuild /version /nologo 2>&1 Assert ($output -NotLike '14.0') '$output should contain 14.0' } }
0
sample_48_16.ps1
# # Module manifest for module 'OCI.PSModules.Generativeai' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeai.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditi...
0
sample_5_62.ps1
ConvertFrom-StringData @' id_compressingfilename=Compressing selected file id_compressingfilenamedesc=Compressing %filename%. Please wait... id_filelarger2gb=Destination/ compressed file %filename% is larger than 2GB. This diagnostic can only upload files that are smaller than 2GB. Please click Next and select a fil...
0
DNS functions_1.ps1
Param ( [Parameter(Mandatory=$true, Position=1)][string] $SourceServer, [Parameter(Mandatory=$true, Position=2)][string] $SourceZone, [Parameter(Mandatory=$true, Position=3)][string] $DestinationServer, [Parameter(Mandatory=$true, Position=4)][string] $DestinationZone, [string[]] $RRtypes = @("MicrosoftDNS_AType")...
0
sample_12_45.ps1
# *********************************************************************************************** # File: utils_ConfigMgr12-ps1 # Version 1.0 # Date: 02-17-2012 - Last edit 2022-06-01 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Utility Script to load common variables/functions. View utils_ConfigM...
0
sample_7_68.ps1
[dynamic, provider("dcismprovider"), Description( "DCIM_LifecycleJobAlertIndication is a derivation of " "CIM_ProcessIndication.")] class DCIM_LifecycleJobAlertIndication : CIM_AlertIndication { [ Description ("The time at which indication is generated") ] datetime Ind...
0
sample_66_82.ps1
param([string] $AgentInstallDir) #Get the agent updater module path using intallation directory details $AgentInstallDir=$AgentInstallDir.Trim() $AgentUpdaterModulePath=Join-Path -Path $AgentInstallDir -ChildPath "Kailani.Afs.Updater.Cmdlets.dll" Write-Host "Running the agent updater action from $AgentUpdaterModu...
0
1654.ps1
function Get-SNMPPrinterInfo { param ( [string[]]$printers ) begin { $snmp = New-Object -ComObject olePrn.OleSNMP $ping = New-Object System.Net.NetworkInformation.Ping } process { foreach ($printer in $printers) { try { $result ...
0
sample_18_57.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 = '79.0.0' # Suppo...
0
sample_38_93.ps1
# Compiling libva/libva-utils deps $ProgressPreference = "SilentlyContinue" $MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent . "$MyPath\mesa_init_msvc.ps1" Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "deps" | Out-Null $depsInstallPath="C:\mesa-deps" Write-Host "Cloning libva at:" Get-Date gi...
0
LNK file testing.ps1
param( $Path = (Split-Path $PSHOME -Qualifier) ) if($lnks -eq $null) { $lnks = ls -Recurse $Path | ?{$_.extension.tolower() -eq ".lnk"} } $wsh = New-Object -ComObject WScript.Shell; foreach($lnk in $lnks) { $lnko = $wsh.CreateShortcut($lnk.fullname); $rtn = New-Object psobject -Property...
0
sample_56_89.ps1
########################################################### # # 'ExtensionService' module # ########################################################### $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest Import-Module "$PSScriptRoot\ServiceHelper.psm1" $script:GCInstallPath = "$PSScriptRoot\.....
0
Register-TemporaryEvent..ps1
##############################################################################\n##\n## Register-TemporaryEvent\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\n...
0
sample_11_95.ps1
# Rule ID: 3416 # # Rule checking to see if Power Plan of the server is set to High Performance # # Created: 7/19/2012 # Author: Jonathan Randall #****************************************************************************************************************** Import-LocalizedData -BindingVariable Localized...
0
475.ps1
function Import-PSCredential{ param( [Parameter(Mandatory=$false)] [String] $Path = "temp.credentials.config.xml" ) $Import = Import-Clixml $Path if ( !$Import.UserName -or !$import.EncryptedPassword ) { Throw "Input is not a valid ExportedPSCredential object, exiting." } ...
0
sample_39_34.ps1
@{ GUID="{Fb6cc51d-c096-4b38-b78d-0fed6277096a}" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" RootModule="Microsoft.Management.Infrastructure.CimCmdlets" RequiredAssembli...
0
sample_42_1.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Start-AMTUserConsent { <# .Synopsis Starts the Intel Active Management Technology user consent process .Description This CmdLet starts the user consent process on clients that have Intel Active Management Technology (AMT) ...
0
3472.ps1
function NamespaceAuthTests { $location = Get-Location $locationKafka = "westus" $resourceGroupName = getAssetName "RGName" $namespaceName = getAssetName "Eventhub-Namespace-" $namespaceNameKafka = getAssetName "Eh-NamespaceKafka-" $authRuleName = getAssetName "Eventhub-Namespace-Authoriz...
0
sample_27_20.ps1
<# .SYNOPSIS Edge Automation Hours of Battery Life Workload Assessment .DESCRIPTION Automates Edge Browsing Activations. .PARAMETER Iterations Integer, execution iterations. .PARAMETER ScenarioJson Integer, scenario json file. 0 : scenario.default.json, 1 : scenario.browsin...
0
sample_32_47.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_51_95.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
Get-SPListItem.ps1
#.Example # Get-SPListItem "Scrum Team Assignments" # Gets all the items in the list with the default columns on them #.Example # Get-SPListItem -Name "Scrum Team Assignments" -Property "Scrum Team","Team Role","Last","First" # Gets all the items in the list with just the specified columns as properties #.Ex...
0
sample_43_24.ps1
# # Module manifest for module 'OCI.PSModules.Lockbox' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Lockbox.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compat...
0
Convert-ToCHexString.ps1
function Convert-ToCHexString { param([String] $input $ans = '' [System.Text.Encoding]::ASCII.GetBytes($str) | % { $ans += "0x{0:X2}, " -f $_ } return $ans.Trim(',',' ') }
0
Invoke-Sql_2.ps1
<# .SYNOPSIS Runs a T-SQL Query and optional outputs results to a delimited file. .DESCRIPTION Invoke-Sql script will run a T-SQL query or stored procedure and optionally outputs a delimited file. .EXAMPLE PowerShell.exe -File "C:\\Scripts\\Invoke-Sql.ps1" -ServerInstance "Z003\\sqlprod2" -Database orders -Query ...
0
sample_45_13.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagementhub' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagementhub.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported P...
0
IE Proxy Toggle (Silent).ps1
# Process command line parameter (if present). [bool] $DISABLE_PROXY = $false; foreach ($param in $MyInvocation.UnboundArguments) { if ($param -like 'disable') { $DISABLE_PROXY = $true; } } # Apply/refresh the organization's default proxy settings. @@ [string] $proxyServer = '###.###.###.###:####'; ...
0
sample_8_45.ps1
# # Module manifest for module 'OCI.PSModules.Ocvp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocvp.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEditions CompatiblePS...
0
3354.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$True, Position=0)] [String]$Version, [Parameter(Mandatory=$True, Position=1)] [String]$Release, [Parameter(Mandatory=$False, Position=2)] [String]$Folder, [Parameter(ParameterSetName="Major")] [Switch]$Major, [Parameter(ParameterSetName="Minor")] [Switch]$Minor, [Paramet...
0
sample_21_10.ps1
ConvertFrom-StringData @' progressbar_id_crm_iis7httpcompression_enabled=WCF httpCompression is not enabled on the Microsoft Dynamics CRM 2011 server progressbar_id_crm_iis7httpcompression_enableddesc=While this setting is on the Microsoft CRM Server, it will have a very big impact on the Microsoft CRM 2011 Outlook c...
0
sample_29_82.ps1
# # Module manifest for module 'PowerShellEditorServices' # # Generated by: daviwil # # Generated on: 5/12/2016 # @{ # Script module or binary module file associated with this manifest. RootModule = 'PowerShellEditorServices.Commands.psm1' # Version number of this module. ModuleVersion = '0.2.0' # I...
0
3024.ps1
Set-StrictMode -Version Latest $functionName = '01c1a57716fe4005ac1a7bf216f38ad0' if (Test-Path Function:\$functionName) { Remove-Item Function:\$functionName -Force -ErrorAction Stop } function global:01c1a57716fe4005ac1a7bf216f38ad0 { return 'Original Function' } function script:Testing { return '...
0
4333.ps1
function Get-PublishLocation { [CmdletBinding()] Param ( [Parameter()] [String] $Location ) $PublishLocation = $null if($Location) { if(Microsoft.PowerShell.Management\Test-Path -Path $Location) { $PublishLocation = $Location ...
0
sample_38_89.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\nanoid@3.3.7\node_modules\nanoid\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\nanoid@3.3....
0
4415.ps1
function Update-ModuleManifest { [CmdletBinding(SupportsShouldProcess=$true, PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=619311')] Param ( [Parameter(Mandatory=$true, Position=0, ValueFrom...
0
sample_39_11.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Invoke-AMTForceBoot { <# .Synopsis Invokes the Intel Active Management Technology force boot command .Description This CmdLet invokes an Intel Active Management Technology (AMT) force boot to a PXE server, the local hard ...
0
sample_62_73.ps1
# # Module manifest for module 'OCI.PSModules.Objectstorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Objectstorage.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEdi...
0
1400.ps1
function Use-CallerPreference { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] $Cmdlet, [Parameter(Mandatory = $true)] [Management.Automation.SessionState] $SessionState ) Set-StrictMode -Ve...
0
get-serials.ps1
<# .SYNOPSIS Get the BIOS serial numbers from computers in the domain. .DESCRIPTION Return a list of computers with their serial numbers. For Dell computers the Win32_BIOS.SerialNumber property is the service tag of the computer. This identifies the computer on the Dell support site...
0
sample_24_10.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> $ScratchDiskTemplateName = 'D:\UpdateScratchDisk...
0
sample_61_96.ps1
# # Module manifest for module 'OCI.PSModules.Generativeai' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeai.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported PSEditi...
0
sample_16_9.ps1
#************************************************ # TS_HPZ12ServiceCheck.ps1 # Version 1.0 # Date: 1-11-2011 # Author: v-anecho # Description: Checks if 'Net Driver HPZ12' or 'Pml Driver HPZ12' is one of the installed services and startup type is something different than Disabled #********************************...
0
sample_2_90.ps1
ConvertFrom-StringData @' id_sbsl_dhcprelaykb2459530_sd=This machine may experience a three to five second delay in obtaining an IP address through Dynamic Host Configuration Protocol (DHCP) at restart due missing hotfix 2459530. '@ # SIG # Begin signature block # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZ...
0
New-XVM.ps1
#Examples <# New-XVM -Name "WS2012-TestServer01" -SwitchName "Switch(192.168.2.0/24)" -VhdType NoVHD New-XVM -Name "WS2012-TestServer02" -SwitchName "Switch(192.168.2.0/24)" -VhdType ExistingVHD -VhdPath 'D:\\vhds\\WS2012-TestServer02.vhdx' New-XVM -Name "WS2012-TestServer03" -SwitchName "Switch(192.168.2.0/24)" ...
0
4273.ps1
function Invoke-HostEnum { [CmdletBinding()] Param( [Switch]$All, [Switch]$Local, [Switch]$Domain, [Switch]$Quick, [Switch]$Privesc, [Switch]$HTMLReport ) $ErrorActionPreference = "SilentlyContinue" If ($All) {$Local = $True; $Doma...
0
4329.ps1
function Test-WebUri { [CmdletBinding()] [OutputType([bool])] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [Uri] $uri ) return ($uri.AbsoluteURI -ne $null) -and ($uri.Scheme -match '[http|https]') }
0
sample_67_87.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagementhub' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagementhub.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported P...
0
sample_50_30.ps1
# # Module manifest for module 'OCI.PSModules.Ons' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ons.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePSEd...
0
562.ps1
function Add-SPOChoiceFieldtoList { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string] $listTitle, [Parameter(Mandatory=$true, Position=2)] [string] $fieldName, [Parameter(Mandatory=$true, Position=3)] [string] $values ) $options = "" $valArray = $values.Split...
0
2397.ps1
function Get-MissingUpdates { [CmdletBinding()] [OutputType([System.Management.Automation.PSCustomObject])] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string]$ComputerName ) begin { function Get-32BitProgramFilesPath { if ((Get-Architecture) -eq 'x64') { ${...
0
Join-Collections 2.0.ps1
#requires -version 2.0 #################################################################################################### ## Version History: ## ## Version 2.0 Added Join-Object and removed dependency on ConvertFrom-Hashtable ## Now works on DataTables! ## Version 1.1 Fixed column uniqueness bug ...
0
sample_51_81.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-Acl", "Set-Acl", "Get-PfxCertific...
0
sample_44_35.ps1
[CmdletBinding()] param ( [string]$OutFile, [string]$AltDownload, [string]$Proxy, [string]$AltHisEndpoint ) $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $refVersion = [version] '4.5' $provider = 'Microsoft.HybridCompute' # Error codes used by azcmagent are ...
0
sample_24_76.ps1
# # Module manifest for module 'OCI.PSModules.Datasafe' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datasafe.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Comp...
0
sample_58_29.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(Manda...
0
1197.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 = $null $privateQueueName = $null function Start-...
0
sample_1_81.ps1
#************************************************ # DC_CollectSqlErrorlogs.ps1 # Version 1.0.0 # Date: 8-19-2011 # Author: Shon Hauck - Shonh@Microsoft.com # Description: Collects OS Performance Related Information # Processor Information # Operating System Performance Information # # NOTE: # #***...
0
Get-Parameter _1.5.ps1
#Requires -version 2.0 #.Synopsis # Enumerates the parameters of one or more commands #.Notes # With many thanks to Hal Rottenberg, Oisin Grehan and Shay Levy # Version 0.80 - April 2008 - By Hal Rottenberg http://poshcode.org/186 # Version 0.81 - May 2008 - By Hal Rottenberg http://poshcode.org/255 # Ver...
0
sample_23_90.ps1
[CmdletBinding()] param ( [Parameter(Mandatory=$true, ValueFromPipeline=$true)] [string]$Path ) Import-Module $(Join-Path $PSSCriptRoot Helpers.psm1) $lastTouched = $(git log -1 --format="format:%ci" -- $Path) try { [datetime]::Parse($lastTouched) } catch { "" } # SIG # Begin signatu...
0
1152.ps1
Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $GroupName = 'AddMemberToGroup' $user2 = $null $user1 = $CarbonTestUser $user2 = Install-User -Credential (New-Credential -UserName 'CarbonTestUser2' -Password 'P@ssw0rd!') -PassThru func...
0
3302.ps1
function New-PoshBotTextResponse { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Scope='Function', Target='*')] [cmdletbinding()] param( [parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$Text, ...
0
sample_29_51.ps1
# # Module manifest for module 'OCI.PSModules.Osubsubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubsubscription.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported...
0
sample_41_62.ps1
# # Module manifest for module 'OCI.PSModules.Genericartifactscontent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Genericartifactscontent.dll' # Version number of this module. ModuleVersion = '77.0.0...
0
3281.ps1
class TeamsConnectionConfig : ConnectionConfig { [string]$BotName [string]$TeamId [string]$ServiceBusNamespace [string]$QueueName [string]$AccessKeyName [securestring]$AccessKey }
0
sample_20_29.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-ExecutionP...
0
sample_0_37.ps1
# TS_AnonymousAuthentication_Enabled.ps1 # Description: Determine whether anonymous authentication is enabled on the CRM web site. # Created: 1/10/2012 # Author: Jonathan Randall #************************************************************************************************* # Date: 11-12-2012 # Description:...
0
2436.ps1
[CmdletBinding(SupportsShouldProcess)] [OutputType()] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string]$Zone, [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [string]$Name, [Parameter(ValueFromPipeline, ValueFromPipelineByProp...
0
4192.ps1
[CmdletBinding()] param () function Close-Process { [CmdletBinding()][OutputType([boolean])] param ( [ValidateNotNullOrEmpty()][string]$ProcessName ) $Process = Get-Process -Name $ProcessName -ErrorAction SilentlyContinue If ($Process -ne $null) { $Output = "Stopping " + $Process.Name + " process........
0
4108.ps1
[CmdletBinding()] param ( [ValidateNotNullOrEmpty()][string]$PrinterName ) Clear-Host $Files = Get-ChildItem -Path $env:windir"\system32\spool\printers" -Filter *.SHD $DeleteFiles = @() foreach ($File in $Files) { $Contents = [System.IO.File]::ReadAllBytes($File.FullName) $Contents = $Contents | Where-Object...
0
sample_52_87.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
500.ps1
function Install-PPApp{ param( [Parameter(Mandatory=$false)] [String[]] $Name, [switch] $Force, [switch] $IgnoreDependencies, [switch] $Uninstall ) $CurrentLocation = (Get-Location).Path $AppD...
0
Portgroup NIC Team.ps1
# PG-duplex.ps1 : NIC Teaming with failover set on duplexity # This script will configure the portgroup to use NIC Teaming where the failover is # depending on the duplexity of the Active NIC. # # Parameters: # $esxName : name of the ESX server # $vSwitch : name of the vSwitch # $portgroup : name of the portgrou...
0
1342.ps1
function Assert-CAdminPrivilege { [CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( -not (Test-CAdminPrivilege) ) { Write-Error "You are not currently running with administrative...
0
sample_11_39.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" ...
0
sample_8_85.ps1
ConvertFrom-StringData @' id_dpm_dpmdb_activity=Gathering DPMDB id_dpm_dpmdb_status=Running DC_CollectDPMDB.ps1 id_dpm_notinstalled=CollectDPMLogs did not run due to missing registry key pointing to the DPM installation folder '@ # SIG # Begin signature block # MIIoOAYJKoZIhvcNAQcCoIIoKTCCKCUCAQExDzANBglghkgBZQ...
0
sample_49_26.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Import Observability EventSource $observabili...
0
sample_15_93.ps1
#************************************************ # DC_ExchangeServerEventLogs.ps1 # Version 1.2.0 # Date: 2013-05-21 # Author: Brian Prince - brianpr@microsoft.com # Description: This script calls TS_GetEvents.ps1 to export Exchange Server and backup -related event logs #*****************************************...
0
1775.ps1
Import-Module HelpersSecurity try { $defaultParamValues = $PSDefaultParameterValues.Clone() $PSDefaultParameterValues["it:Skip"] = !$IsWindows Describe "Importing PowerShell script files are not allowed in ConstrainedLanguage" -Tags 'CI','RequireAdminOnWindows' { BeforeAll { ...
0
Create a VIAccount.ps1
function New-VIAccount($principal) { $flags = ` [System.Reflection.BindingFlags]::NonPublic -bor [System.Reflection.BindingFlags]::Public -bor [System.Reflection.BindingFlags]::DeclaredOnly -bor [System.Reflection.BindingFlags]::Instance $method = $defaultviserver.GetType().GetMethods($flags) |...
0
sample_59_56.ps1
.$psScriptRoot\Set-Dell1stBootdevice.ps1 .$psScriptRoot\Get-DellBiosSettings.ps1 .$psScriptRoot\Clear-DellAdminPassword.ps1 .$psScriptRoot\Set-DellAutoOnForSelectDays.ps1 # SIG # Begin signature block # MIIqwQYJKoZIhvcNAQcCoIIqsjCCKq4CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAA...
0
sample_10_89.ps1
ConvertFrom-StringData @' id_sccm_checksqlconfig=Checking SQL Database Configuration id_sccm_checksqlvalue=Checking the Value of id_sccm_checksqlconfigdesc=Trying to connect to the SQL Database '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGs...
0
sample_29_23.ps1
# # Module manifest for module 'OCI.PSModules.Loadbalancer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loadbalancer.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditi...
0
sample_64_21.ps1
#!/usr/bin/env pwsh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
0
sample_37_85.ps1
using namespace System.Management.Automation using namespace System.Management.Automation.Language # This is an example profile for PSReadLine. # # This is roughly what I use so there is some emphasis on emacs bindings, # but most of these bindings make sense in Windows mode as well. Import-Module PSReadLine ...
0
sample_52_29.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 = '81.0.0' # Supported PSEdi...
0
Get-ADGroupMembers.ps1
Function Get-ADGroupMembers { <# .SYNOPSIS Return a collection of users in an ActiveDirectory group. .DESCRIPTION This function returns an object that contains all the properties of a user object. This function works for small groups as well as groups in ex...
0
Select-FilteredObject.ps.ps1
##############################################################################\n##\n## Select-FilteredObject\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nPr...
0
sample_66_62.ps1
# # Module manifest for module 'OCI.PSModules.Workrequests' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Workrequests.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditi...
0
1294.ps1
function Assert-CService { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( -not (Test-CService $Name) ) { ...
0
4027.ps1
$TestOutputRoot = [System.AppDomain]::CurrentDomain.BaseDirectory; $ResourcesPath = Join-Path $TestOutputRoot "ScenarioTests" function Get-ResourceGroupName { return getAssetName } function Get-ResourceName { return getAssetName } function Get-PasswordForVM { return (getAssetName) + '_196Ab...
0
sample_49_76.ps1
# Copyright (C) Intel Corporation, 2021 All Rights Reserved. function Invoke-GenerateKeyPair { <# .Synopsis Generate Key Pair. .Description This cmdlet generates a KeyPair object and adds the new key to AMT. .Notes AMT Provisioning: The vPro client AMT firmware must be provisione...
0
Compare 2 foldertrees.ps1
function Compare-Foldertrees { param( $path1, $path2 ) $len1 = $path1.length $len2 = $path2.length . Require-function Get-MD5 Write-Host "====== First path only =======`n" gci $path1 -rec | ? {! $_.PSISContainer} | % { $fileName1 = $_.fullN...
0
FuncionInfo_1.types.ps1xml.ps1
<?xml version="1.0" encoding="utf-8" ?> <Types> <Type> <Name>System.Management.Automation.FunctionInfo</Name> <Members> <ScriptProperty> <Name>Verb</Name> <GetScriptBlock> if ($this.Name.Contains("-")) { $this.Name.Substring(0,$this.Name.Indexof("-")) } else { $null ...
0
1382.ps1
function Test-CZipFile { [OutputType([bool])] [CmdletBinding()] param( [Parameter(Mandatory=$true)] [Alias('FullName')] [string] $Path ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState...
0
1778.ps1
return function IsWin10OrHigher { $version = [system.environment]::osversion.version return ($version.Major -ge 10) } function RemoveTestUsers { param([string] $basename) $results = Get-LocalUser $basename* foreach ($element in $results) { Remove-LocalUser -SID $element.SID } }...
0