filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_39_82.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 = '82.0.0' # Supported PSEdition...
0
sample_18_34.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
Migrate UserFolder_1.ps1
param( $RootFolder = "\\\\domain.local\\users", $NewRootFolder = "\\\\domain.local\\users2", $LogFolder = "c:\\Projects\\HomeDirs", $NewSubFolders = @("Documents","Favorites","Desktop","Links","Contacts","BlaBla"), [switch]$SetACL ) $UserFolders = gci -Path $RootFolder | ?{$_.PSIsContainer} $UserFolders | forea...
0
Invoke-RemoteExpression_1..ps1
############################################################################## ## ## Invoke-RemoteExpression ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################## <# .SYNOPSIS ...
0
TabExpansion_11.ps1
## Tab-Completion ################# ## For V2CTP3. ## This won't work on V1 and V2CTP and V2CTP2. ## Please dot souce this script file. ## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list. ## ## What this can do is: ## ## [datetime]::n<tab> ## [datetime]::now.d...
0
862.ps1
function New-ClusterWithConfig { $ErrorActionPreference = "Stop" $context = Get-AzContext if ($context -eq $null) { Connect-AzAccount } $context $resourceGroupName = Read-Host -Prompt "Enter the resource group name" $location = Read-Host -Prompt ...
0
sample_47_46.ps1
# # Module manifest for module 'OCI.PSModules.Opsi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opsi.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePS...
0
sample_16_76.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
Get-Exchange-Mail_2.ps1
[Reflection.Assembly]::LoadFile("C:\\Program Files\\Microsoft\\Exchange\\Web Services\\1.1\\Microsoft.Exchange.WebServices.dll") | Out-Null $s = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1) $s.Credentials = New-Object Net.Netwo...
0
sample_6_79.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported PSEditi...
0
sample_32_66.ps1
Windows 7/Windows Server 2008 R2Valitse aloituspainike ja sen jðlkeen Ohjauspaneeli > Nðytð laitteet ja tulostimet kohdasta Laitteisto jaððnet ja napsauta sitten Lisðð tulostin.Windows Vista/Windows Server 2008Valitse aloituspainike ja sen jðlkeen Ohjauspaneeli > Tulostimet kohdasta Laitteisto ja ððnet ja napsautasit...
0
sample_54_58.ps1
########################################################################## # DELL PROPRIETARY INFORMATION # # This software is confidential. Dell Inc., or one of its subsidiaries, has supplied this # software to you under the terms of a license agreement,nondisclosure agreement or both. # You may not copy, disclose, o...
0
1432.ps1
function Set-CIisWebsiteID { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $SiteName, [Parameter(Mandatory=$true)] [int] $ID ) Set-StrictMode -Version 'Latest' Use-CallerPreference ...
0
sample_65_37.ps1
# # Module manifest for module 'OCI.PSModules.Certificates' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Certificates.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditi...
0
sample_25_92.ps1
version: '{build}' skip_tags: true clone_depth: 30 environment: JAVA_HOME: C:\Program Files\Java\jdk11 install: - ps: | Add-Type -AssemblyName System.IO.Compression.FileSystem if (!(Test-Path -Path "C:\maven\apache-maven-3.8.4" )) { (new-object System.Net.WebClient).DownloadFile( 'ht...
0
sample_30_61.ps1
# # Module manifest for module 'OCI.PSModules.Waf' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waf.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions CompatiblePSEd...
0
1361.ps1
function Test-CAdminPrivilege { [CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $identity = [Security.Principal.WindowsIdentity]::GetCurrent() Write-Debug -Message "Checking if current use...
0
sample_38_74.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; // services.debug.trace(tname + "=" + val); } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("snap",...
0
4251.ps1
function Get-ModifiableFile { [CmdletBinding()] Param( [Parameter(ValueFromPipeline=$True, Mandatory = $True)] [String] $Path ) begin { $Excludes = @("MsMpEng.exe", "NisSrv.exe") $OrigError = $ErrorActionPreference $ErrorActionPrefere...
0
sample_66_92.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 # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEE...
0
sample_60_19.ps1
<# .SYNOPSIS Module for extended installed Windows Updates report .DESCRIPTION Collects information on installed Windows Updates and generates a report in .html format .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version Feedback : ...
0
3917.ps1
function Test-ListUsageDetails { $usageDetails = Get-AzConsumptionUsageDetail -Top 10 Assert-NotNull $usageDetails Assert-AreEqual 10 $usageDetails.Count Foreach($usage in $usageDetails) { Assert-NotNull $usage.AccountName Assert-Null $usage.AdditionalProperties Assert-NotNull $usage.Bil...
0
4316.ps1
function Get-FindModuleParameterTestManifest { ConvertFrom-Json -InputObject @" { "TestCaseManifest": { "Parameters": { "Variations": [ { ...
0
Get-PSExecutionPolicy.ps1
#Notes #1. x86 properites will be empty for x86 machines as this property only pertains x64 machines which have both x64 and x86 shells. #2. If policy registry key is not present then restricted is the effective setting param($computerName=$env:computerName) $reg = Get-WmiObject -List -Namespace root\\default -...
0
sample_26_27.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
sample_61_47.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="$basedir\..\..\..\..\..\..\vite@5.2.10\node_modules" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Nod...
0
3470.ps1
function ConsumerGroupsTests { $location = Get-Location $resourceGroupName = getAssetName "RSG" $namespaceName = getAssetName "Namespace-" $eventHubName = getAssetName "EventHub-" $consumerGroupName = getAssetName "ConsumerGroup-" Write-Debug " Create resource group" Write-Debug...
0
sample_1_88.ps1
#************************************************ # DC_BitsClient-Component.ps1 # Version 1.0: Created # Version 1.1.08.13.14: Added collection for "HKLM\Software\Microsoft\Windows\CurrentVersion\BITS", and updated comment section. # Version 1.2.10.20.14: Added -ErrorAction to correct an exception on some systems. ...
0
Get-DLRestriction.ps1
########################################### # Get-DLRestriction # # Uses QAD cmdlets to retrieve distribution list restriction attributes # and then provides a list of users which can send email messages to the group. # # Usage: Get-DLRestriction "Worldwide Everyone" # # Dmitry Sotnikov, http://dmitrysotnikov....
0
sample_33_47.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 New-ServiceFabricApp...
0
Set-Computername_11.ps1
function Set-ComputerName { param( [switch]$help, [string]$originalPCName=$(read-host "Please specify the current name of the computer"), [string]$computerName=$(read-host "Please specify the new name of the computer")) $usage = "set-ComputerName -originalPCname CurrentName -computername AnewName" if (...
0
297.ps1
function Test-PSFParameterBinding { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Test-PSFParameterBinding')] Param ( [Parameter(Mandatory = $true, Position = 0)] [string[]] $ParameterName, [Alias('Reverse')] [switch] $Not, [switch] $And, [Validat...
0
sample_27_66.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
2399.ps1
function Send-File { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string[]]$Path, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Destination, [Parameter(Mandatory)] [System.Management.Automation.Runspaces.PSSession]$Session ) begin { function...
0
399.ps1
$scriptBlock = { $script:___ScriptName = 'psframework.taskengine' try { while ($true) { if ([PSFramework.Runspace.RunspaceHost]::Runspaces[$___ScriptName.ToLower()].State -notlike "Running") { break } $task = $null $tasksDone = @() while ($task = [PSFramework.TaskEngine.TaskHos...
0
sample_49_88.ps1
# Localized 07/06/2023 04:55 PM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Solución de problemas Troubleshoot_DetectDVDDevice=Comprobando dispositivo de DVD... Troubleshoot_DetectDVDvideoDecoder=Comprobando decodificador de video para la reproducción de DVD....
0
Get-PipeLineObject.ps1
# For TabExpansion.ps1 # this requires TabExpansion.ps1 function Get-PipeLineObject { $i = -2 do { $str = $line.Split("|")[$i] # extract the command name from the string # first split the string into statements and pipeline elements # This doesn't handle strings however...
0
sample_17_44.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 = '77.0.0' # Supported PSEditions CompatiblePSEd...
0
RESTful Server.ps1
# PowerShell RESTful server by Parul Jain paruljain@hotmail.com # Version 0.1 April 4th, 2013 # # Use to offer services to other programs as a simple alternative to remoting and webservice technologies # Does not require a webserver such as IIS. Works on its own! # Single threaded; will process requests in order....
0
sample_1_46.ps1
# To check organizations that are not updated on the CRM server. # # Rule to look for organizations that have not been updated to correct version. # # Created: 1/25/2012 # Author: Jonathan Randall #****************************************************************************************************************** ...
0
sample_0_47.ps1
# *********************************************************************************************************** # Version 1.0 # Date: 03-01-2012 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: # Collects Configuration Manager SQL Server Information. # *************************************************...
0
sample_1_64.ps1
[ dynamic, provider("dcismprovider"), Description ( "DCIM_MetricService is a derivation of CIM_MetricService " "and provides the ability to manage metrics. The capabilities " "of the DCIM_MetricService instance are advertised through an " "instance of DCIM_MetricServiceCapabilities." ...
0
ASPX Mailbox (3 of 6).ps1
<%@ Page Language="C#" CodeFile="MailboxConfirm.aspx.cs" AutoEventWireup="true" Inherits="MailboxConfirm" ClassName = "MailboxConfirm" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="He...
0
sample_9_57.ps1
ConvertFrom-StringData @' id_ctssnmp=SNMP id_ctssnmpdescription=Collects information about SNMP. '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCA...
0
sample_61_22.ps1
$ServerCertificateName = "CN=ServiceFabricServerCert" $ClientCertificateName = "CN=ServiceFabricClientCert" function IsSecurityX509([string]$ClusterConfigFilePath) { $jsonConfig = Get-Content $ClusterConfigFilePath -Raw | ConvertFrom-Json $properties = $jsonConfig.properties if ($properties -ne $Nul...
0
Search-NetworkService_1.ps1
#Define PreReqs $timeStamp = Get-Date -UFormat "%m-%d-%Y-%H-%M" $systemVars = Gwmi Win32_ComputerSystem -Comp "." $userName = $systemVars.UserName $compName = $systemVars.Name #User Vars $serviceName = "Spooler" # Spooler will check the Print Spooler <<< Change To Suit Your needs $errorLog = "C:\\Temp\\Log_"+$...
0
1289.ps1
function Get-CMsmqMessageQueue { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Name, [Switch] $Private ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.S...
0
593.ps1
function Update-PowerShellPowerUp{ if(!(Get-Command "git" -ErrorAction SilentlyContinue)){ Install-PPApp Git } cd $PSProfile.Path if(!(Test-Path -Path (Join-Path -Path $PSProfile.Path -ChildPath ".git"))){ git init git remote add origin $PSProfile.GitSource }elseif($(git config --get remote.origin....
0
sample_2_61.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
58.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_40_91.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AMTHardwareAsset { <# .Synopsis Shows hardware information about the system .Description This Cmdlet returns the hardware information from clients that have Intel Active Management Technology (AMT) firmware version 3.2 ...
0
2170.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [string]$SiteServer, [parameter(Mandatory=$true, HelpMessag...
0
SQLite Read _ Write_1.ps1
# Make sure SQLite.Interop.dll is in the same directory as System.Data.SQLite.dll $scriptDir = "Path to your SQLite DLL" Add-Type -Path "$scriptDir\\System.Data.SQLite.dll" ############### SAMPLE USAGE ################### ### Querying: ### ### $readQuery = "SELECT * FROM TABLE" ### $dataArray = $SQLite.q...
0
3590.ps1
$clusterName = Get-ClusterName $resourceGroupName = Get-ResourceGroupName $appTypeName = Get-AppTypeName $v1 = Get-AppTypeV1Name $v2 = Get-AppTypeV2Name $packageV1 = Get-AppPackageV1 $packageV2 = Get-AppPackageV2 $serviceTypeName = Get-ServiceTypeName function Test-AppType { $appType = Get-AzServiceFabr...
0
sample_40_41.ps1
# Copyright (c) 2019-2024, The Khronos Group Inc. # SPDX-License-Identifier: Apache-2.0 $ErrorActionPreference = 'Stop' if (-not $env:VULKAN_SDK_VERSION) { $env:VULKAN_SDK_VERSION = "1.1.114.0" } $SDK_VER = $env:VULKAN_SDK_VERSION if (-not (Test-Path env:VULKAN_SDK)) { if ($env:SYSTEM_DEFAULTWORKINGDIRECTOR...
0
The Old Dogs ExcelCookBo_1.ps1
# # DATE : 6/21/2010 # COMMENT: This is an updated Version of my Cook Book from Augest of 2008 # # #=============================================================== # All errors and mistakes are my own. Thanks to all who have helped # along the way. # # One thing I would add is that if you are using anything...
0
3665.ps1
function Test-CreateUpdateDatabaseReadScale ($serverVersion = "12.0", $location = "Southeast Asia") { $rg = Create-ResourceGroupForTest $server = Create-ServerForTest $rg $location $databaseName1 = Get-DatabaseName $db1 = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $s...
0
sample_24_23.ps1
# # Module manifest for module 'OCI.PSModules.Bds' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Bds.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEd...
0
Invoke-RemoteCommand.ps1
<# # Script FileName: func_Invoke-RemoteCommand.ps1 # Current Version: A03 # Description: Run command on a remote computer as the currently logged on user. # Created By: Adam Listek # Version Notes # A01 - Initial Release # A02 - Conversion to Function # A03 - Abstracted to generic purpos...
0
sample_4_27.ps1
ConvertFrom-StringData @' id_sql_setup_collect_bootstrap_logs=Collecting SQL Setup Bootstrap Logs id_sql_setup_collect_2005_logs=Collecting SQL 2005 Bootstrap Logs id_sql_setup_collect_2008_2008r2_logs=Collecting SQL 2008 and 2008R2 Bootstrap Logs id_sql_setup_collect_2012_logs=Collecting SQL 2012 Bootstrap Logs i...
0
sample_28_65.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Clear-AMTSystemDefense { <# .Synopsis Clears all Intel Active Management Technology System Defense policies and filters .Description This CmdLet clears the Intel Active Management Technology (AMT) network access policy fro...
0
2282.ps1
function Load-Form { $ButtonDelete.Enabled = $false $ButtonDelete.Visible = $true $ButtonRestart.Enabled = $false $ButtonRestart.Visible = $false $Form.Controls.Add($RBLocal) $Form.Controls.Add($RBRemote) $Form.Controls.Add($BlogLink) $Form.Controls.Add($TBPackageID) $Form.Controls.A...
0
3583.ps1
function Test-CreateAndGetService { $rg = Create-ResourceGroupForTest try { $service = Create-DataMigrationService($rg) $all = Get-AzDataMigrationService -ResourceGroupName $rg.ResourceGroupName Assert-AreEqual 1 $all.Count $all = Get-AzDataMigrationService -ResourceGroupName $rg.Resou...
0
901.ps1
$gitdirectory="<Replace with path to local Git repo>" $webappname="mywebapp$(Get-Random)" cd $gitdirectory New-AzWebApp -Name $webappname git push azure master
0
sample_23_79.ps1
<# .SYNOPSIS Launch Developer PowerShell .DESCRIPTION Locates and imports a Developer PowerShell module and calls the Enter-VsDevShell cmdlet. The Developer PowerShell module is located in one of several ways: 1) From a path in a Visual Studio installation 2) From the latest installation of Visual Studio (hig...
0
Get-WebSite_6.ps1
function Get-WebSite { <# .SYNOPSIS Retrieves information about a website. .DESCRIPTION Retrieves information about a website. .PARAMETER Url URL of the website to test access to. .PARAMETER UseDefaultCredentials Use the currently authenticated user's credentials .PARAMETER Proxy Us...
0
Get-SiSReport_1.ps1
Function Get-SiSReport { <# .SYNOPSIS Get the overall SIS usage information. .DESCRIPTION This function uses the sisadmin command to get the usage information for a SIS enabled drive. .PARAMETER SisDisk The drive letter of a disk that ...
0
sample_56_56.ps1
<# .SYNOPSIS MSRD-Collect tracing module .DESCRIPTION Module for MSRD-Collect tracing .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version Feedback : https://aka.ms/MSRD-Collect-Feedback #> $msrdLogPrefix = "Tracing" $TraceFold...
0
Backup full.ps1
# Ańadimos el modulo de exchange If ((Get-PSSnapin | where {$_.Name -match "Exchange.Management"}) -eq $null) { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin } $lista= "" [int]$tam=30 $server = "MAILBOX" $discos=get-wmiobject -class win32_volume -filter "DriveType=3" -computer $server $databases...
0
sample_36_9.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 = '73.1.0' ...
0
3594.ps1
function Get-AzureRmSecurityContact-SubscriptionScope { Set-AzSecurityContact -Name "default1" -Email "ascasc@microsoft.com" -Phone "123123123" -AlertAdmin -NotifyOnAlert $contacts = Get-AzSecurityContact Validate-Contacts $contacts } function Get-AzureRmSecurityContact-SubscriptionLevelResource...
0
sample_55_0.ps1
# region Generated # ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
0
sample_13_70.ps1
#************************************************ # DC_WebClient-Component.ps1 # Version 1.0 # Date: 2009-2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about WebClient/WebDAV. # Called from: Networking Diagnostics #******************************************************* ...
0
2072.ps1
using namespace System.Diagnostics using namespace System.Management.Automation.Internal Describe "PowerShell Command Debugging" -tags "CI" { BeforeAll { $powershell = Join-Path -Path $PsHome -ChildPath "pwsh" } function NewProcessStartInfo([string]$CommandLine, [switch]$RedirectStdIn) { ...
0
sample_2_56.ps1
ConvertFrom-StringData @' id_virtualization=Virtualization Information id_virtualizationobtaining=Obtaining Information about Virtualization Environment '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLC...
0
Resolve-Url.ps1
################################### ## Figure out the real url behind those shortened forms function Resolve-URL([string[]]$urls) { [regex]$snip = "(?:https?://)?(?:snurl|snipr|snipurl)\\.com/([^?/ ]*)\\b" [regex]$tiny = "(?:https?://)?TinyURL.com/([^?/ ]*)\\b" [regex]$isgd = "(?:https?://)?is.gd/([^?...
0
New-Activity.ps1
# # By Adam Driscoll # This is very much a test function to see if this was possible. There was no polishing done. Please visit # http://csharpening.net/?p=867 for more information. # function global:Test-IsCommonParameter { param ( $Parameter ) 'WhatIf','Confirm','UseTra...
0
sample_30_59.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; // services.debug.trace(tname + "=" + val); } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("snap",...
0
459.ps1
Set-PSFConfig -Module PSFramework -Name 'Utility.Size.Style' -Value ([PSFramework.Utility.SizeStyle]::Dynamic) -Initialize -Validation sizestyle -Handler { [PSFramework.Utility.UtilityHost]::SizeStyle = $args[0] } -Description "Controls how size objects are displayed by default. Generally, their string representation i...
0
Get-InstalledProgram_v_3.ps1
function Get-InstalledProgram() { param ( [String[]]$Computer, $User ) ############################################################################################# if ($User) {$Connection = Get-Credential -Credential $User} ########################################################################################...
0
2627.ps1
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") | Out-Null [System.reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | Out-Null function Out-DataTable { [C...
0
sample_44_10.ps1
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. #------------------------------------------------------------------------- # # Event IDs # Set-Variable -Option Constant -Scope script -Name EventIdDiagnosticsReportRun -Value...
0
ConvertTo-CliXml_2.ps1
#requires -version 2.0 function ConvertTo-CliXml { param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [PSObject[]]$InputObject ) begin { $type = [type]::gettype("System.Management.Automation.Serializer") $ctor ...
0
Findup_7.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; namespace Findup { public class FileInfoExt { public FileInfoExt(FileInfo fi) ...
0
sample_12_69.ps1
#************************************************ # TS_StoreAppsFailureForDCOMErrorCheck.ps1 # Version 1.0.1 # Date: 3/13/2013 # Author: V-maam # Description: [Idea ID 7544] [Windows] WinStore - Apps do not launch, because "ALL APPLICATIONS PACKAGES" removed from DCOM ACL # Rule number: 7544 # Rule URL: http:...
0
sample_61_54.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # UnzipAndCopyMDS.ps1 # Kill all running Monitoring processes an...
0
sample_6_14.ps1
<# ISM PowerShell Service Module This module contains a set of wrapper scripts that enable Administrator To Configure 'Invoke-FullPowerCycle' ISM feature such as Enable/Disable Get the current status of feature. #> function IsAdministrator { <# .SYNOPSIS IsAdministrator. .DESCRIPTION ...
0
sample_64_57.ps1
ConvertFrom-StringData @' ###PSLOC ProcessorCount = Hostname {0} processor count: {1} NicCount = Hostname {0} Network Adapter count: {1} TotalMemory = Hostname {0} total memory capacity is {1} GB in {2} modules TestMemory = Testing memory module {0} MemoryCapacity = Total memory for '{0}' is '{1}', expected at le...
0
sample_26_61.ps1
# # Module manifest for module 'OCI.PSModules.Vulnerabilityscanning' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vulnerabilityscanning.dll' # Version number of this module. ModuleVersion = '73.1.0' #...
0
Hack ESXi_3.ps1
$screen = " You see here a virtual switch. ------------ ------ #...........| |....| --------------- ###------------ |...(| |..%...........|########## ###-@...| ...
0
sample_6_2.ps1
# # Module manifest for module 'OCI.PSModules.Networkloadbalancer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Networkloadbalancer.dll' # Version number of this module. ModuleVersion = '92.1.0' # Sup...
0
sample_25_15.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\semver@7.5.4\node_modules\semver\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\semver@7.5....
0
Trace-Route.ps1
function Trace-Route { param( # The URL to trace [Parameter(Mandatory=$true)] [Uri]$Url, # The timeout for the request, in milliseconds [Timespan]$Timeout = "0:0:0.25", # The maximum number of hops for the trace route [Int]$MaximumHops = 32 ) process { Invoke-Expressio...
0
Import-BufferBox.ps1
################################################################################################### ##### BUFFER UTILITIES SCRIPT FUNCTIONS AND SETUP ################################################################################################### ## A bunch of script functions for creating a simple in-console spl...
0
sample_28_34.ps1
# Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 <# .Synopsis Build script for Packer. .Description Build script for Packer for all supported platforms and architectures. By default the following OSs and architectures are targeted. OS: * linux * darwin * wind...
0
Get-ADSite-byIP.ps1
#get-site-byIP, ipv4 #written by Nathan Linley # http://myitpath.blogspot.com Param( [Parameter(Mandatory=$true,HelpMessage="IP Address")][validatepattern('^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$')]$ip, [Parameter(Mandatory=$false,HelpMessage="Netmask")]$nmask, [Parameter(Mandatory=$false,HelpMessa...
0
O-ChristmasTree.ps1
ipmo PowerBoots ## Merry Christmas boots { $global:lights = @() grid { # A trunk rectangle -width 20 -height 40 -fill brown -HorizontalAlignment Center -VerticalAlignment Bottom # A perfect, triangular, tree polygon -points { "87.5,0","0,150","175,150","87.5,0" } -margin "0,2...
0
sample_53_5.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ActionGroup.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.ActionGroup.internal.psm1' if(Test-Path $internalModulePath) { ...
0
sample_13_61.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_41_82.ps1
<############################################################## # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # ###########################################################...
0