filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_57_53.ps1
Test-xDscResource..\DSCResources\DCPP_POSTBehavior Test-xDscSchema..\DSCResources\DCPP_POSTBehavior\DCPP_POSTBehavior.schema.mof # SIG # Begin signature block # MIIutQYJKoZIhvcNAQcCoIIupjCCLqICAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBA...
0
2304.ps1
function Invoke-PasswordRoll { [CmdletBinding(DefaultParameterSetName = "Encryption")] Param ( [Parameter(Mandatory = $true)] [String[]] $ComputerName, [Parameter(Mandatory = $true)] [String[]] $LocalAccounts, [Parameter(Mandatory = $true)] [String] $TsvFileName, [Parameter(ParameterSet...
0
3156.ps1
$global:ThemeSettings = New-Object -TypeName PSObject -Property @{ GitSymbols = @{ BranchSymbol = 'branch' OriginSymbols = @{ Enabled = $false Github = [char]::ConvertFromUtf3...
0
sample_6_70.ps1
// ================================================================== // DCIM_ADMProfilesOwningCollectionElement // ================================================================== [dynamic, provider("dcismprovider"), Association, Description( "DCIM_ADMProfilesOwningCollection is a" "...
0
Set-Computername_15.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
sample_41_36.ps1
# # Module manifest for module 'OCI.PSModules.Managementagent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Managementagent.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported P...
0
sample_65_92.ps1
# # Script module for module 'Az.DataFactory' that is executed when 'Az.DataFactory' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 07/31/2024 06:54:56 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try { ...
0
sample_65_22.ps1
"use strict"; /* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, selec...
0
1535.ps1
function Get-MrNetFirewallState { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [string[]]$ComputerName = $env:COMPUTERNAME, [System.Management.Automation.Credential()]$Credential = [System.Management.Automation.PSCredential]::Empty ) $ScriptBlock = @' ...
0
2398.ps1
function Import-Certificate { [CmdletBinding()] param ( [Parameter()] [ValidateNotNullOrEmpty()] [string]$ComputerName = $env:COMPUTERNAME, [Parameter()] [ValidateNotNullOrEmpty()] [pscredential]$Credential, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [ValidateSet('CurrentUser', 'Loca...
0
sample_32_76.ps1
# # Module manifest for module 'Microsoft.SME.EventViewer' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.EventViewer.psm1' # Version number of this module. ModuleVersion = '4.11.1' # Supported PSEditions # CompatiblePSEditions = @() # ID used t...
0
2190.ps1
param( [parameter(Mandatory=$true)] $IPRangeOld, [parameter(Mandatory=$true)] $IPRangeNew ) Begin { $ReferenceObject = $IPRangeOld.Split(",") $ReferenceObjectCount = [System.Math]::Round(($ReferenceObject | Measure-Object).Count / 2) $DifferenceObject = $IPRangeNew.Split(",") $DifferenceObjectCount = [S...
0
sample_15_2.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
2937.ps1
$ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest properties { $container = @{} } Task default -depends task2 Task Step1 -alias task1 { 'Hi from Step1 (task1)' } Task Step2 -alias task2 -depends task1 { 'Hi from Step2 (task2)' }
0
4364.ps1
function ValidateAndGet-ScriptDependencies { param( [Parameter(Mandatory=$true)] [string] $Repository, [Parameter(Mandatory=$true)] [PSCustomObject] $DependentScriptInfo, [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.Manag...
0
09af4d5a-52a6-4d61-89dd-7b9016c3d1d7.ps1
<%@ Page language="c#" AutoEventWireup="true" Debug="true" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.IO" %> <%@ Import Namespace="System.Management.Automation.Runspaces" %> <%@ Import Namespace="System.Management.Automation" %> <%@ Import Namespace="System.Collections.ObjectModel" %> <s...
0
3214.ps1
$moduleName = $env:BHProjectName $manifest = Import-PowerShellDataFile -Path $env:BHPSModuleManifest $outputDir = Join-Path -Path $ENV:BHProjectPath -ChildPath 'out' $outputModDir = Join-Path -Path $outputDir -ChildPath $env:BHProjectName $outputModVerDir = Join-Path -Path $outputModDir -ChildPath $manifest.ModuleVers...
0
sample_41_52.ps1
# # Module manifest for module 'Microsoft.SME.AzureCenter' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.AzureCenter.psm1' # Version number of this module. ModuleVersion = '4.12.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used t...
0
sample_42_87.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 = '82.0.0' # Suppo...
0
UIAutomation 1.3.ps1
# # # Select-Window Notepad | Remove-Window -passthru # # ## And later ... # # Select-Wi...
0
sample_35_46.ps1
using namespace System.Text.RegularExpressions $BETTER_LINE_MATCH_PATTERN = [Regex]::new('^(\s*)([\d\.\:]+)(\s+)([^\s]+)(.*)$') function New-HostsFileEntryPattern([string] $IPAddress, [string] $Hostname) { return [Regex]::new("^\s*${IPAddress}\s+${Hostname}(\s*)?(#.*)?$") } function New-HostsFileEntryPatt...
0
sample_33_60.ps1
@{ # Script module or binary module file associated with this manifest ModuleToProcess = 'nuget.psm1' # Version number of this module. ModuleVersion = '2.0.0.0' # ID used to uniquely identify this module GUID = '76e6f9c4-7045-44c0-a557-17fab0835c12' # Author of this module Author = 'NuGet Team' # Com...
0
sample_65_1.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ # Loads all Service Fabric SD...
0
sample_43_82.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 = '79.0.0' # Sup...
0
sample_25_64.ps1
# Copyright (C) Intel Corporation, 2007 - 2021 All Rights Reserved. .$psScriptRoot\Invoke-AMTPowerManagement.ps1 .$psScriptRoot\Invoke-AMTForceBoot.ps1 .$psScriptRoot\Invoke-AMTForceBoot_OCR.ps1 .$psScriptRoot\Set-AMT3PDS.ps1 .$psScriptRoot\Get-AMT3PDS.ps1 .$psScriptRoot\Clear-AMT3PDS.ps1 .$psScriptRoot\set-AM...
0
sample_6_17.ps1
#************************************************ # DC_ServerManagerLogs.ps1 # Version 1.0.1 # Date: 01-04-2011 # Author: Andre Teixeira - andret@microsoft.com # Description: This script can be used to obtain server manager related logs #************************************************ PARAM($MachineName=$Comp...
0
sample_42_36.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
0
2241.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true)] [string]$SiteServer, [parameter(Mandatory=$true)] [ValidateScript({Test-Path -Path $_ -PathType Container})] [string]$DriverSourcePath, [parameter(Mandatory=$true)] [ValidateScript({Test-Path -Path $_ -PathTyp...
0
4145.ps1
[CmdletBinding()] param ( [ValidateNotNullOrEmpty()][string]$ReferenceTS = '\\DeploymentShare\Control\WIN10REF\ts.xml', [ValidateNotNullOrEmpty()][string]$ProductionTS = '\\DeploymentShareTST\Control\WINDOWS10PROD\ts.xml', [string]$ARPExclusionsFile = "\\InstalledApplications\ARPExclusions.txt", [string]$TSExclusi...
0
VMWare Quick Migration_2.ps1
######################################### #Name: VMWare Quick Migration Function #Author: Justin Grote <jgrote NOSPAMAT enpointe DOT com> #Credit: Inspired by Mike DiPetrillo's Quick Migration Script: http://www.mikedipetrillo.com/mikedvirtualization/2008/10/quick-migration-for-vmware-the-power-of-powershell.html #...
0
sample_16_36.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll' # Version number of this module. ModuleVersion...
0
sample_54_13.ps1
# # Module manifest for module 'Az.Security' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.Security.psm1' # Version number of this module. ModuleVersion = '1.6.2' # Supported PSEditions ...
0
1407.ps1
function Restart-CRemoteService { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $Name, [Parameter(Mandatory=$true)] [string] $ComputerName ) Set-StrictMode -Version 'Latest' Use...
0
sample_41_74.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservice.dll' # Version number of this module. ModuleVersion = '83.2.0' # Sup...
0
2831.ps1
Set-StrictMode -Version latest $projectRoot = Resolve-Path -Path "$PSScriptRoot/.." if (-not $projectRoot) { $projectRoot = $PSScriptRoot } Import-Module -Name (Join-Path -Path $projectRoot -ChildPath 'tests/MetaFixers.psm1') -Verbose:$false -Force Describe 'Text files formatting' { $allTextFiles = Get-Tex...
0
sample_26_26.ps1
############################ version information begin ####################################### # Script "cru.ps1" # current status: version, v2.0 # cru.ps1 release from: 26.02.2018 ############################ version information end ####################################### #region ############ reading script p...
0
1487.ps1
[CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Path ) Set-StrictMode -Version 'Latest' function ConvertTo-Expression { [CmdletBinding()] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string] $InputObject ) process ...
0
New-XVM_13.ps1
#EXAMPLES <# New-XVM -ComputerName HYPERVSVR02 -Name "WS2012-TESTSVR01" -SwitchName "External(192.168.1.0/24)" -VhdType NoVHD New-XVM -ComputerName HYPERVSVR02 -Name "WS2012-TESTSVR02" -SwitchName "External(192.168.1.0/24)" -VhdType ExistingVHD -VhdPath D:\\vhds\\WS2012-TESTSVR02.vhdx New-XVM -ComputerName HYPERVSV...
0
sample_52_45.ps1
# # Script module for module 'Az.AnalysisServices' that is executed when 'Az.AnalysisServices' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 05/16/2024 06:33:06 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { t...
0
SnapReminder.ps1
# - SnapReminder V1.0 By Virtu-Al - http://virtu-al.net # # Please use the below variables to define your settings before use # $smtpServer = "mysmtpserver.mydomain.com" $MailFrom = "me@mydomain.com" $VISRV = "MYVISERVER" function Find-User ($username){ if ($username -ne $null) { $usr = (($username.spli...
0
new get-parameter script.ps1
param ( $Cmdlet, [switch]$ShowCommon, [switch]$Full ) $command = Get-Command $Cmdlet -ea silentlycontinue # resolve aliases (an alias can point to another alias) while ($command.CommandType -eq "Alias") { $command = Get-Command ($command.definition) } if (-not $command) { return } foreach ($...
0
sample_42_53.ps1
# # Module manifest for module 'OCI.PSModules.Streaming' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Streaming.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Co...
0
sample_58_65.ps1
@{ GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 " Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" ModuleToProcess="PSDiagnostics.psm1" Func...
0
sample_1_43.ps1
# Name tss_FindUserBadPwdAttempts.ps1 <# .SYNOPSIS Script to find sAMAccountName, pwdLastSet, lockoutTime, DC, lastLogon, logonCount, badPwdCount, badPasswordTime for a username. .DESCRIPTION Script to assist in troubleshooting accounts experiencing bad password attempts. It can also be used to investiga...
0
2405.ps1
function Deploy-Vnc { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [ValidateScript({ Test-Connection -ComputerName $_ -Quiet -Count 1 })] [string]$ComputerName, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [ValidateScript({ Test-Path -Path $_ -PathType Containe...
0
sample_11_17.ps1
# # Module manifest for module 'OCI.PSModules.Threatintelligence' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Threatintelligence.dll' # Version number of this module. ModuleVersion = '74.1.0' # Suppo...
0
Add-Namespace v1.1.ps1
trap [System.Management.Automation.RuntimeException] { $entryException = $_ if ($_.CategoryInfo.Category -eq [System.Management.Automation.ErrorCategory]::InvalidOperation) { if ($_.FullyQualifiedErrorId -eq "TypeNotFound") { $targetName = $_.CategoryInfo.TargetName ...
0
sample_67_99.ps1
# # Module manifest for module 'Microsoft.Online.SharePoint.PowerShell' # # Generated by: Microsoft Corportation # # Generated on: 8/29/2011 # @{ # Script module or binary module file associated with this manifest ModuleToProcess = 'Microsoft.Online.SharePoint.PowerShell.dll' # Version number of this modu...
0
sample_39_90.ps1
function New-AzDataProtectionBackupConfigurationClientObject{ [OutputType('PSObject')] [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates new backup configuration object')] param( [Parameter(Mandatory, HelpMessage='Datasource T...
0
Update-SysinternalsSuite.ps1
<# .Synopsis Update Sysinternals Suite. .DESCRIPTION Use PowerShell v3's Invoke-WebRequest do download the latest Sysinternals Tools from: http://live.sysinternals.com. Supports -AsJob .EXAMPLE Update-SysinternalsSuite -Path C:\\tools\\sysinterals This Example downloads all sysinternals tools to C:\\...
0
864.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests', '' . "$here\$sut" $httpUserPassword = $ENV:HttpPassword $location = $ENV:Location $securePassword = ConvertTo-SecureString $httpUserPassword -AsPlainText -Force $loginCreds = New-Object ...
0
sample_38_2.ps1
# # Module manifest for module 'OCI.PSModules.Usage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usage.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Compatible...
0
sample_6_40.ps1
#************************************************ # DC_TrustList.ps1 # Version 1.0 # Date: 1/14/2014 # Author: Tim Springston [MS] # Description: This script queries for the user and computer domain # and returns details about those domains. #************************************************ Import-Local...
0
4096.ps1
[CmdletBinding()] param () function Uninstall-MSIByName { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()][String]$ApplicationName, [ValidateNotNullOrEmpty()][String]$Switches ) $Executable = $Env:windir + "\system32\msiexec.exe" $Uninstall = Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\Curre...
0
sample_2_49.ps1
ConvertFrom-StringData @' id_klist=Kerberos tickets and TGT id_klistobtaining=Running KList utility to obtain Kerberos related information '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7...
0
sample_63_22.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 = '87.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_58_88.ps1
# # Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker' # # Generated by: Microsoft Corporation # # Generated on: 19/01/2022 # @{ # Script module or binary module file associated with this manifest. RootModule = '' # Version number of this module. ModuleVersion = '1.2100.26...
0
1193.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve) function Test-ShouldGetMsi { $msi = Get-Msi -Path (Join-Path -Path $PSScriptRoot -ChildPath 'CarbonTestInstaller.msi' -Resolve) } function Test-ShouldAcceptPipelineInput { $msi = Get-ChildItem -Path $PSScriptRoot ...
0
2473.ps1
Import-Module "$nanoFolderPath\NanoServerImageGenerator.psm1" New-NanoServerImage -MediaPath $winSrvDrivePath -BasePath $nanoFolderPath -TargetPath "$nanoFolderPath\Nano.vhd" -ComputerName NanoServer –GuestDrivers -AdministratorPassword p@$$w0rd1 Import-Module Azure Add-AzureAccount Selec...
0
sample_38_1.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
sample_27_3.ps1
# # Module manifest for module 'OCI.PSModules.Cloudguard' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudguard.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions ...
0
2434.ps1
[CmdletBinding()] [OutputType('System.Management.Automation.PSCustomObject')] param ( [Parameter(Mandatory)] [string]$DnsZone, [Parameter()] [string]$DnsServer = (Get-ADDomain).ReplicaDirectoryServers[0], [Parameter()] [int]$WarningDays = 1 ) begin { function Get-DnsHostname ($IPAddress)...
0
1044.ps1
[CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' $ErrorActionPreference = 'Stop' $base64Snk = $env:SNK if( -not $base64Snk ) { return } $snkPath = Join-Path -Path $PSScriptRoot -ChildPath 'Source\Carbon.snk' Write-Verbose -Message ('Saving signing key to "{0}".' -f $snkPath) [IO.File]:...
0
sample_41_39.ps1
# # Module manifest for module 'OCI.PSModules.Announcementsservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Announcementsservice.dll' # Version number of this module. ModuleVersion = '83.1.0' # S...
0
sample_0_55.ps1
#************************************************ # DC_TaskListSvc.ps1 # Version 1.1 # Date: 2014,2019 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about running services # Called from: Networking Diagnostics #******************************************************* Trap [E...
0
3259.ps1
class ScheduledMessage { [string]$Id = (New-Guid).Guid.Split('-')[0] [TimeInterval]$TimeInterval [int]$TimeValue [Message]$Message [bool]$Enabled = $true [bool]$Once = $false [double]$IntervalMS [int]$TimesExecuted = 0 [DateTime]$StartAfter = (Get-Date).ToUniversalTime()...
0
1557.ps1
Function New-DynamicParam { param( [string] $Name, [System.Type] $Type = [string], [string[]] $Alias = @(), [string[]] $ValidateSet, [switch] $Mandatory, [string] $ParameterSetName="__AllParameterSets", [int] $Position, [switch...
0
3549.ps1
$resourceGroupName = "RecoveryServicesBackupTestRg"; $resourceName = "PsTestRsVault"; $policyName = "PsTestPolicy"; $defaultPolicyName = "DefaultPolicy"; $DefaultSnapshotDays = 2; $UpdatedSnapShotDays = 5; $oldResourceGroupName = "shracrg" $oldVaultName = "shracsql" $oldPolicyName = "iaasvmretentionchec...
0
904.ps1
$fqdn="<Replace with your custom domain name>" $webappname="mywebapp$(Get-Random)" $location="West Europe" New-AzResourceGroup -Name $webappname -Location $location New-AzAppServicePlan -Name $webappname -Location $location ` -ResourceGroupName $webappname -Tier Free New-AzWebApp -Name $webappname -Location $loca...
0
Highlight-Syntax _2.0.ps1
#requires -version 2.0 # Highlight-Syntax.ps1 # version 2.0 # by Jeff Hillman # # this script uses the System.Management.Automation.PsParser class # to highlight PowerShell syntax with HTML. param( [string] $code, [switch] $LineNumbers ) if ( Test-Path $code -ErrorAction SilentlyContinue ) { $code =...
0
sample_19_37.ps1
function Disable-WACFWFirewallRule { <# .SYNOPSIS Disable Firewall Rule. .DESCRIPTION Disable Firewall Rule. .ROLE Administrators #> param ( [Parameter(Mandatory = $true)] [String] $instanceId, [Parameter(Mandatory = $true)] [String] $policyStore ) Import-Module net...
0
sample_55_9.ps1
# --------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------------------------...
0
sample_64_28.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
Convert-BounceToX500.ps1
# $Id: Convert-BounceToX500.ps1 608 2010-10-31 02:12:44Z jon $ # $Revision: 608 $ #.Synopsis # Convert Bounce to X500 #.Description # Convert URL Encoded address in a Bounce message to an X500 address # that can be added as an alias to the mail-enabled object #.Parameter bounceAddress # URL Encoded bounce...
0
sample_37_42.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 = '75.1.0' # Supported PSEditions CompatiblePS...
0
VM Performance Report_2.ps1
<# .SYNOPSIS The script creates an HTML report for given vSphere VM's, that contains VM performance data over a given period. The script then emails the report to a given address. .DESCRIPTION The script requires an input file, supplied as an argument to the script. The first line of this file contains an e...
0
sample_0_82.ps1
ConvertFrom-StringData @' id_windowsexplorerdatfiles_title=Windows Explorer DAT files id_windowsexplorerdatfiles_status=Collecting Windows Explorer DAT files '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7...
0
4378.ps1
function New-NugetPackage { [CmdletBinding()] Param( [Parameter(Mandatory = $true)] [string]$NuspecPath, [Parameter(Mandatory = $true)] [string]$NugetPackageRoot, [Parameter()] [string]$OutputPath = $NugetPackageRoot, [Parameter(Mandatory = $true, Param...
0
sample_60_78.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
0
sample_51_60.ps1
@{ # Use Severity when you want to limit the generated diagnostic records to a # subset of: Error, Warning and Information. # Uncomment the following line if you only want Errors and Warnings but # not Information diagnostic records. #Severity = @('Error','Warning') # Use IncludeRules when you ...
0
sample_28_68.ps1
# # Module manifest for module 'OCI.PSModules.Dashboardservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dashboardservice.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported...
0
sample_17_72.ps1
# # Module manifest for module 'OCI.PSModules.Jms' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jms.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_0_89.ps1
#************************************************ # DC_Repadmin.ps1 # Version 1.0.1 # Date: 03-6-2013 # Authors : Andre Teixeira/ David Fisher (CSS)/ Craig Landis # Description: Run Repadmin utility to obtain Kerberos tickets and TGT #************************************************ if($debug -eq $true){[vo...
0
sample_64_93.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", "G...
0
sample_12_25.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_63_31.ps1
$global:VerbosePreference = 'Continue' Function Write-Custom-Output { Param([string]$message) $date = Get-Date $newMessage = '[{0}] {1}' -f $date, $message Write-Output $newMessage } trap [Exception] { Write-Custom-Output "WARN: Terminating error encountered on line $($_.Invoc...
0
1786.ps1
Describe "Get-ItemProperty" -Tags "CI" { $currentDirectory = Split-Path $PSScriptRoot -Leaf $parentDirectory = Split-Path (Join-Path -Path $PSScriptRoot -ChildPath "..") -Leaf $tempDirectory = $TestDrive $testprovider = (Get-Item $tempDirectory).PSDrive.Name $testfile = Join-Path -Path $tempDire...
0
sample_13_79.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_65_91.ps1
########################################################### # # 'ExtensionService' module # ########################################################### $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest Import-Module "$PSScriptRoot\ServiceHelper.psm1" $script:GCInstallPath = "$PSScriptRoot\.....
0
MetroApps Module.ps1
<# Created by: Tome Tanasovski Version: 1.0 Date: 11/2/2012 This module provides two functions: Get-MetroApp - This cmdlet reads the registry for the keys that have the launcher id and the entry point (interesting for xaml apps, but not so much for html5 apps) Start-MetroApp - This cmdlet uses one of the id...
0
finddupe_17.ps1
# new version has more error handling, "-delete" and "-noprompt" options. function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvider]; $hashAlgorithm = new-object $cryp...
0
2836.ps1
function FormatErrorMessage { [CmdletBinding()] param( [Parameter(ValueFromPipeline=$true)] $ErrorRecord = $Error[0] ) $currentConfig = GetCurrentConfigurationOrDefault if ($currentConfig.verboseError) { $error_message = "{0}: An Error Occurred. See Error Details Below: $($s...
0
sample_56_58.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_32_85.ps1
trap { # If we except, lets report it visually. Can help with debugging if there IS a problem # in here. Write-Host "EXCEPTION: $($PSItem.ToString())" -ForegroundColor Red Write-Host "$($PSItem.ScriptStackTrace)" Start-Sleep 10 } # Get an environment variable with default value if not present func...
0
sample_54_62.ps1
# param ( # [string]$Workspace # ) # $CreateJson = $PSScriptRoot + "\Create-Json.ps1" # $AlcDir = Join-Path $ProjectDir "Compiler\" # $CacheDir = Join-Path $AlcDir ".alpackages" # Set-Location $ProjectDir\RequiredApps # $BuildApps = Get-Content .\InstallOrder.json | ConvertFrom-Json # # update Requi...
0
sample_25_27.ps1
Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility #Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
0
356.ps1
function Set-PSFLoggingProvider { [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Set-PSFLoggingProvider')] Param ( [Alias('Provider', 'ProviderName')] [string] $Name, ...
0
sample_66_7.ps1
# # This script handles common telemetry tasks for Install.ps1 and Add-AppDevPackage.ps1. # function IsVsTelemetryRegOptOutSet() { $VsTelemetryRegOptOutKeys = @( "HKLM:\SOFTWARE\Policies\Microsoft\VisualStudio\SQM", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM", "HKLM:\S...
0
sample_7_88.ps1
ConvertFrom-StringData @' id_ctsfirewallrunningcheck=Windows Firewall Running check id_ctsfirewallrunningcheckdescription=Verify the Windows Firewall service is running id_firewallrunningcheckdesc=The Windows Firewall service is not running id_firewallstartmodecheckdesc=The Windows Firewall start mode is not set to...
0
sample_40_35.ps1
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.Force = void 0; const switch_1 = require("../switch"); class Force extends switch_1.Switch { switch = 'force'; } exports.Force = Force; //# sourceMappingURL...
0