filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_47_72.ps1
#!/usr/bin/env pwsh <# .SYNOPSIS Stub around Invoke-Pester command used by VSCode PowerShell extension. .DESCRIPTION The stub checks the version of Pester and if >= 4.6.0, invokes Pester using the LineNumber parameter (if specified). Otherwise, it invokes using the TestName parameter (if specif...
0
Out-DataTable_2.ps1
####################### <# .SYNOPSIS Creates a DataTable for an object .DESCRIPTION Creates a DataTable based on an objects properties. .INPUTS Object Any object can be piped to Out-DataTable .OUTPUTS System.Data.DataTable .EXAMPLE $dt = Get-Alias | Out-DataTable This example creates a DataTable fro...
0
1331.ps1
function Get-IdentityPrincipalContext { [CmdletBinding()] [OutputType([DirectoryServices.AccountManagement.PrincipalContext])] param( [Parameter(Mandatory=$true)] [Carbon.Identity] $Identity ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $...
0
sample_34_49.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
3176.ps1
function Get-ScheduledTasks { [cmdletbinding( DefaultParameterSetName='COM' )] param( [parameter( ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, ValueFromRemainingArguments=$false, Position=0 )] [Alias(...
0
sample_54_96.ps1
# # Module manifest for module 'OCI.PSModules.Recovery' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Recovery.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions Comp...
0
Script permissions.ps1
<# .SYNOPSIS Applies permissions and roles to vSphere vApps .DESCRIPTION Applies permissions and roles to vSphere vApps -VIServer (Optional, defaults to Development) {FQDN of VCentre Server} -AppName (Required) {VApp Label} -ADGroup (Optional) {Domain\\Group_Object} -Role (Optional) {vSphere Role, ReadO...
0
sample_2_77.ps1
// Copyright (c) 2017 Dell Inc. or its subsidiaries. All Rights Reserved. // ================================================================== // DCIM_RollupStatusCollection // ================================================================== [dynamic, provider("dcismprovider"), Description ( "A cla...
0
sample_61_90.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 = '88.1.0' # Supported PSEditi...
0
Ping Alert Script_1.ps1
#Email Alert Parameters $to = "user@mydomain.com" $from = "unreachable@mydomain.com" $smtpserver = "my_exchange_server" #Array of computers to test $Computers = ("comp1" , "comp2" , "comp3" , "comp4") #Variable to hold INT value 0 $zero = 0 Foreach ($Computer in $Computers) { if...
0
sample_19_45.ps1
# # Module manifest for module 'OCI.PSModules.Keymanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Keymanagement.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEdi...
0
sample_29_28.ps1
$url = $args[0] Write-Host "Downloading Microsoft Edge" $wc = New-Object net.webclient $msiInstaller = "$env:temp\microsoft-edge-stable.msi" $wc.Downloadfile($url, $msiInstaller) Write-Host "Installing Microsoft Edge" $arguments = "/i `"$msiInstaller`" /quiet" Start-Process msiexec.exe -ArgumentList $arguments -Wait ...
0
3039.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "Should -BeTrue" { Context "Basic functionality" { It "given true it passes" { $true | Should -BeTrue } It "given truthy it passes" { 1 | Should -BeTrue } ...
0
982.ps1
$SubscriptionId = '' $primaryResourceGroupName = "myPrimaryResourceGroup-$(Get-Random)" $primaryLocation = "westus2" $secondaryResourceGroupName = "mySecondaryResourceGroup-$(Get-Random)" $secondaryLocation = "eastus" $adminSqlLogin = "SqlAdmin" $password = "ChangeYourAdminPassword1" $primaryServerName = "primary-...
0
sample_39_7.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 = '80.0.0' # Supported PSEdi...
0
sample_12_51.ps1
ConvertFrom-StringData @' id_kb2475761title=Checking Event Logs id_kb2475761description=Checking event logs for known issues. '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIB...
0
247.ps1
function Remove-StringSpecialCharacter { [CmdletBinding()] param ( [Parameter(ValueFromPipeline)] [ValidateNotNullOrEmpty()] [Alias('Text')] [System.String[]]$String, [Alias("Keep")] [String[]]$SpecialCharacterToKeep ) PROCESS { ...
0
sample_28_53.ps1
// workaround for https://github.com/microsoft/fast/issues/5675 export function updateProxy(id) { if (!id) { return; } const element = document.getElementById(id); if (element && element.form) { if (element.form.id !== '') { element.proxy.setAttribute("form", elemen...
0
2157.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter( Mandatory = $true, ParameterSetName = "Download", HelpMessage = "Generate a download configuration file for Office." )] [ValidateNotNullOrEmpty()] [switch]$DownloadFile, [parameter( Mandatory = $true, ...
0
sample_22_79.ps1
# # Module manifest for module 'OCI.PSModules.Secrets' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Secrets.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions Compat...
0
DekiWiki Module 1.5.ps1
## DekiWiki Module 1.5 #require -version 2.0 ## Depends on the HttpRest script-module: ## http :// huddledmasses.org/using-rest-apis-from-powershell-with-the-dream-sdk/ #################################################################################################### ## The first of many script cmd...
0
Balance-Datastores_1.ps1
<# TODO -Change number of DSTs to is selection of $DSTMostFree to be variable. Also add in logic to select DSTs with lower VMCounts. Total DSTs Select DSTs ---------- ----------- <5 1 5-20 3 >20 5 -For $DSTLeastFree add in logic to select DSTs with higher VMCounts...
0
1163.ps1
function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Test-NewTempDir { $tmpDir = New-TempDir try { Assert-DirectoryExists $tmpDir } finally { Uninstall-Directory -Path $tmpDir -Recurse } } functi...
0
1626.ps1
< ============================================================================= REBOOT REMOTE COMPUTER - ALT CREDENTIALS ================================...
0
sample_31_79.ps1
# # Module manifest for module 'OCI.PSModules.Dataflow' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dataflow.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions Comp...
0
CreateVDS.ps1
function CreateVDS( $dvsName, $datacenter, $vmHost, $physicalNic, $portGroupType = "earlyBinding", ` [array]$portGroupNameList = @(),[array]$uplinkList = @() ) { # ------- Create vDS ------- # $dvsCreateSpec = New-Object VMware.Vim.DVSCreateSpec $dvsCreateSpec.configSpec = New-Object VMware.V...
0
Get-RDPSettings.ps1
######################################################################################################################## # NAME # Get-RDPSetting # # SYNOPSIS # Gets some (with filter) or all properties from a RDP file. # # SYNTAX # Edit-RDP [-Path] <string> [-Name] <string> [[-Value] <object>] [-Pas...
0
Powershell iTunes_1.ps1
# #***************************************************************** # # Powershell iTunes v1 $Rev: 754 $ # (c) 2004-2010 Thomas Maurer. All rights reserved. # created by Thomas Maurer # # http://www.thomasmaurer.ch # http://www.thomasmaurer.ch/projects # # last Update by $Author: tmaurer $ on $Date: 2010-11...
0
sample_31_37.ps1
. $PSScriptRoot\PathProcessingNonExistingPaths.ps1 . $PSScriptRoot\PathProcessingNoWildcards.ps1 . $PSScriptRoot\PathProcessingWildcards.ps1 # SIG # Begin signature block # MIIreQYJKoZIhvcNAQcCoIIrajCCK2YCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7...
0
sample_64_33.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
sample_67_17.ps1
# Localized 06/28/2023 08:08 AM (GMT) 303:7.0.30723 msft_packagemanagementsource.strings.psd1 ######################################################################################### # # Copyright (c) Microsoft Corporation. # #######################################################################################...
0
sample_43_49.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> Import-Module $PSScriptRoot\Tracer.psm1 <# ...
0
2276.ps1
function Load-Form { $Form.Controls.Add($TBComputerName) $Form.Controls.Add($GBComputerName) $Form.Controls.Add($ButtonOK) $Form.Add_Shown({$Form.Activate()}) [void] $Form.ShowDialog() } function Set-OSDComputerName { $ErrorProvider.Clear() if ($TBComputerName.Text.Length -gt 15) { ...
0
sample_32_11.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
1248.ps1
function ConvertTo-CBase64 { [CmdletBinding()] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [AllowNull()] [AllowEmptyString()] [string[]] $Value, [Text.Encoding] $Encoding = ([Text.Encoding]::Unicode) ) ...
0
2196.ps1
[CmdletBinding()] param( [parameter(Mandatory=$true, HelpMessage="Specify Primary Site server")] [string]$SiteServer = "$($env:COMPUTERNAME)", [parameter(Mandatory=$true, HelpMessage="Path to text file")] [ValidateScript({Test-Path -Path $_ -Include *.txt})] [string]$FilePath, [parameter(Mandat...
0
751.ps1
param( [Parameter(Mandatory)] [semver] $Version, [Parameter(Mandatory)] [string] $GitHubToken, [Parameter(Mandatory)] [string] $Repository, [Parameter()] [string] $TargetFork = 'PowerShell', [Parameter()] [string] $ChangelogPath = "$PSScriptRoot/../.....
0
sample_64_18.ps1
Import-Module C:/Users/JakubVanak/Documents/Repos/NaviPartner/np-al-test-runner-fork/PowerShell/ALTestRunner.psm1 -Global Import-Module C:/Users/JakubVanak/Documents/Repos/NaviPartner/np-al-test-runner-fork/PowerShell/NPTestRunner/NPALTestRunner.psm1 -Global function Load-RequiredAssemblies { param ( ...
0
Find-String_1.ps1
<# .Synopsis Searches text files by pattern and displays the results. .Description Searches text files by pattern and displays the results. .Notes Based on versions from http://weblogs.asp.net/whaggard/archive/2007/03/23/powershell-script-to-find-strings-and-highlight-them-in-the-output.aspx and from http://pos...
0
sample_20_91.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Ya existe una variable de entorno con este nombre y tipo. EnvironmentErrorDoesNotExists=No existe una variable de entorno con este nombre y tipo. '@ # SIG # Begin signature block # MIIoOwYJKoZIhvcNAQcCoIIoLDCCKCgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3...
0
1390.ps1
function Enable-CIisSsl { [CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName='IgnoreClientCertificates')] param( [Parameter(Mandatory=$true)] [string] $SiteName, [Alias('Path')] [string] $VirtualPath = '', ...
0
1969.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path Describe "ConvertFrom-Csv" -Tags "CI" { BeforeAll { $testObject = "a", "1" $testcsv = Join-Path -Path (Join-Path -Path $here -ChildPath assets) -ChildPath TestCsv2.csv $testName = "Zaphod BeebleBrox" $testColumns = @" a,b,c ...
0
Start-Presentation_2.ps1
if(-not(get-command New-System.Windows.Window -EA 0)){ Import-Module PowerBoots } Add-BootsTemplate $PSScriptRoot\\PresentationFrame.xaml $name = [System.Windows.Navigation.JournalEntry]::NameProperty [double]$global:zoomLevel = 1 $SlideCount = 0 function Start-Zoom { PARAM( [Parameter(Position=0)] ...
0
Shift Operators_2.ps1
#requires -version 2.0 Add-Type @" public class Shift { public static int Right(int x, int count) { return x >> count; } public static uint Right(uint x, int count) { return x >> count; } public static long Right(long x, int count) { return x >> count; } public static ulong Right(ulong x, int ...
0
sample_61_37.ps1
# # Script module for module 'Az.DataLakeStore' that is executed when 'Az.DataLakeStore' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 07/04/2024 08:22:40 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { try ...
0
1323.ps1
function ConvertTo-CPropagationFlag { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [Carbon.Security.ContainerInheritanceFlags] [Alias('ContainerInheritanceFlags')] $ContainerInheritanceFlag ) Set-StrictMode -Version 'Latest' Use-CallerPreference -C...
0
ConvertTo-Hashtable.ps1
Param([Parameter(ValueFromPipeline=$true)]$object,[switch]$AsString,[switch]$jagged) BEGIN { $headers = @() } PROCESS { if(!$headers -or $jagged) { $headers = $object | get-member -type Properties | select -expand name } $output = @{} if($AsString) { foreach($col in $headers) { ...
0
sample_31_57.ps1
# # Script module for module 'Az.ConfidentialLedger' that is executed when 'Az.ConfidentialLedger' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 04/23/2024 13:01:40 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { ...
0
sample_22_92.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '75.1.0' # Sup...
0
New-ObjectRecursive_1.ps1
<# .Synopsis Creates new object based on hashtable definition .Description Function is wrapper for New-Object that allows user to create nested objects using nested hashtable as definition. If you want to take advantage of type use 'Type' key within hashtable that defines object. ...
0
get-ESXiHostConfigBackup.ps1
<# .SYNOPSIS Creates config bundle backup for ESXi hosts. Works where 80 is blocked to ESXi host Originally script by Alan Renouf (http://www.virtu-al.net/2011/02/23/backing-up-the-esxi-system-image) Heavily Modified by Jimmy Hester .DESCRIPTION Checks for connection to a vCenter or ESXi server If not connected...
0
sample_33_56.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 = '75.1.0' # S...
0
1150.ps1
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $rootKey = 'hklm:\Software\Carbon\Test\Test-SetRegistryKeyValue' function Remove-RootKey { if( (Test-Path -Path $rootKey) ) { Remove-Item -Path $rootKey -Recurse } } Describe 'Set-RegistryKeyV...
0
3543.ps1
function Test-MabGetContainers { $vault = Get-AzRecoveryServicesVault -ResourceGroupName "pstestrg" -Name "pstestrsvault"; $containers = Get-AzRecoveryServicesBackupContainer ` -VaultId $vault.ID ` -ContainerType "Windows" ` -BackupManagementType "MARS"; Assert-AreEqual $containers[0].FriendlyN...
0
2382.ps1
[CmdletBinding(DefaultParameterSetName = 'Neither')] param ( [Parameter(Mandatory)] [datetime]$StartTimestamp, [Parameter(Mandatory)] [datetime]$EndTimestamp, [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [string]$ComputerName = 'localhost', [Parameter()] [System.Mana...
0
sample_49_71.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '74.1.0' # Sup...
0
Search-Help.ps1
##############################################################################\n##\n## Search-Help\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\nSearch the P...
0
sample_0_53.ps1
#************************************************ # DC_DFSServer-Component.ps1 # Version x # Date: 20022 # Author: WalterE # Description: Collects information about DFS Server. # Called from: Networking Diags #******************************************************* Trap [Exception] { # Handle exception a...
0
Add _ Get-Help -Full_1.ps1
$executionContext.SessionState.InvokeCommand.PreCommandLookupAction = { param($CommandName, $CommandLookupEventArgs) if($CommandName.StartsWith("?")) { $RealCommandName = $CommandName.TrimStart("?") $CommandLookupEventArgs.CommandScriptBlock = { Get-Help $RealCommandName -Full...
0
sample_53_41.ps1
# # Module manifest for module 'OCI.PSModules.Containerinstances' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll' # Version number of this module. ModuleVersion = '83.2.0' # Suppo...
0
3521.ps1
function Get-Location { if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne ` [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { $namespace = "Microsoft.DevTestLab" $type = "sites" $location = Get-AzResourceProvider -ProviderNamespace $namespace ` | whe...
0
sample_14_30.ps1
ConvertFrom-StringData @' id_sandev=Computer Storage Information id_sanstorageinfooutput=SAN utility output id_sanstorageinfooutputdesc=Storage Information '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7Y...
0
4380.ps1
function Test-ScriptInstalled { [CmdletBinding(PositionalBinding=$false)] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Name, [Parameter()] [string] $RequiredVersion ) $scriptInfo = $null $scriptFileName = "$Na...
0
3592.ps1
function Get-AzureRmSecurityAutoProvisioningSetting-SubscriptionScope { $autoProvisioningSettings = Get-AzSecurityAutoProvisioningSetting Validate-AutoProvisioningSettings $autoProvisioningSettings } function Get-AzureRmSecurityAutoProvisioningSetting-SubscriptionLevelResource { $autoProvision...
0
sample_61_36.ps1
# # Module manifest for module 'OCI.PSModules.Analytics' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Analytics.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions Co...
0
3337.ps1
function Enable-ScheduledCommand { [PoshBot.BotCommand( Aliases = ('enableschedule', 'enable-schedule'), Permissions = 'manage-schedules' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [ValidateNotNullO...
0
sample_27_33.ps1
# # Module manifest for module 'Az.EventHub' # # Generated by: Microsoft Corporation # # Generated on: 5/16/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.EventHub.psm1' # Version number of this module. ModuleVersion = '5.0.0' # Supported PSEditions ...
0
PowerShell Template_4.ps1
Function New-Script { $strName = $env:username $date = get-date -format d $name = Read-Host "Filename" if ($name -eq "") { $name="NewTemplate" } $email = Read-Host "eMail Address" if ($email -eq "") { $email="email@mycompany.com" } $comment=@(); while($s = (Read-Host "Comment").Trim()){$comment+="$s`r`n#"} $f...
0
sample_8_80.ps1
#************************************************ # DC_DnsClient-Component.ps1 # Version 1.0 # Version 1.1: Altered the runPS function correctly a column width issue. # Date: 2009 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about the DNS Client. # Called from: Networking Dia...
0
1119.ps1
$siteName = 'CarbonSetIisMimeMap' function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { Install-IisWebsite -Name $siteName -Binding 'http/*:48284:*' -Path $TestDir } function Stop-Test { Remove-IisWebsite -Name $siteName...
0
2471.ps1
param( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$ApiManagementServiceName, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$ApiManagementServiceResourceGroup, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$ApiMatchPattern, [Parameter(Mandatory)] [ValidateNotNul...
0
2488.ps1
[CmdletBinding()] param () begin { Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' } process { try { $Netstat = (netstat -anb | where {$_ -and ($_ -ne 'Active Connections')}).Trim() | Select-Object -Skip 1 | foreach {$_ -replace '\s{2,}','|'} $i = ...
0
VM Performance Report_3.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_32_48.ps1
@{ GUID = "1DA87E53-152B-403E-98DC-74D7B4D63D59" Author = "PowerShell" CompanyName = "Microsoft Corporation" Copyright = "Copyright (c) Microsoft Corporation." ModuleVersion = "7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion = "3.0" CmdletsToExport = @( 'Export-Alias', 'Get-Alias', 'Import-Alias'...
0
Set-PowerGUIWelcomePage_1.ps1
######################################################## # Modifies the default PowerGUI admin console # welcome screen to the mht file you supply # Details available at: # http://dmitrysotnikov.wordpress.com/2009/02/11/rebranding-powergui-consolerebranding-powergui-console/ ######################################...
0
sample_40_92.ps1
#Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
0
684.ps1
function Set-RsUrlReservation { [cmdletbinding()] param ( [string] $ReportServerVirtualDirectory = "ReportServer", [string] $PortalVirtualDirectory="Reports", [Alias('SqlServerInstance')] [string] $ReportServerInstance, ...
0
sample_1_70.ps1
#************************************************ # DC_NfsServer-Component.ps1 # Version 1.0.06.26.14: Created script. # Version 1.1.08.13.14: Updated comments. Added data collection for NIS registry value: "HKLM\system\CurrentControlSet\services\NisSvc". TFS264084 # Date: 2014 # Author: Boyd Benson (bbenson@micr...
0
sample_48_25.ps1
/////////////////////////////////////////////////////////////////////////////// // Helper to set a designer prop /////////////////////////////////////////////////////////////////////////////// function setDesignerProp(tname, ttype, tvalue) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)...
0
sample_7_87.ps1
// ================================================================== // DCIM_LCLogEntry // ================================================================== [dynamic, provider("dcismprovider"), Description ( "A class derived from LogEntry " "to the entries in the LifeCycle Log." ) ] cla...
0
sample_56_48.ps1
. "$PSScriptRoot\..\project\api.ps1" . "$PSScriptRoot\helpers.ps1" function Put-Current-Parametrage-Under-Git-LFS { Set-Location (Get-Project-Root) & git lfs track "Custom/parametrage/current/*.*" } function Drop-Referential-Tables-Triggers { foreach ($tableName in Get-Referencial-Tables) { ...
0
sample_53_88.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=疑难解答 Troubleshoot_DetectDVDDevice=正在检查 DVD 设备... Troubleshoot_DetectDVDvideoDecoder=正在检查用于播放 DVD 的视频解码器... Troubleshoot_DetectDVDAudioDecoder=正在检查用于播放 DVD 的音频解码器... Resolution_Title...
0
Vim25 Crazy Magic_1.ps1
cls [void][Reflection.Assembly]::LoadWithPartialName("VMware.Vim"); # generate the proxy $ws = New-WebServiceProxy -Uri "http://172.16.0.33/sdk/vimService?wsdl" ; $ws.Url = "http://172.16.0.33/sdk/vimService"; $ws.UserAgent = "VMware VI Client/4.0.0"; # I modded the host to accept HTTP requests (too big o...
0
959.ps1
$apiVersion = "2015-04-08" $resourceGroupName = "myResourceGroup" $accountName = "mycosmosaccount" $databaseName = "database1" $databaseThroughputResourceName = $accountName + "/mongodb/" + $databaseName + "/throughput" $databaseThroughputResourceType = "Microsoft.DocumentDb/databaseAccounts/apis/databases/settings" $...
0
sample_63_1.ps1
# # Module manifest for module 'Az.StorageMover' # # Generated by: Microsoft Corporation # # Generated on: 7/4/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.StorageMover.psm1' # Version number of this module. ModuleVersion = '1.4.0' # Supported PSEdi...
0
Event Log SOX audit.ps1
$s = "Server01", "Server02", "Server03" foreach($server in $s) {$server #$computername = Get-Content env:computername $filter_Security = '<QueryList> <Query Id="0" Path="Security"> <Select Path="Security">(*[System[Provider[@Name="Microsoft-Windows-Security-Auditing"] and (Task = 13824 or Task = 13825 or Ta...
0
sample_50_14.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 = '75.1.0' # Supported PSEditions CompatiblePSEd...
0
sample_50_53.ps1
# # Module manifest for module 'OCI.PSModules.Osubbillingschedule' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll' # Version number of this module. ModuleVersion = '80.0.0' # Sup...
0
sample_14_76.ps1
let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl(); let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/web.eventHandlers.js"]; let currentScriptElement = document.querySelector("script[src='Scripts/web.plugin.js']"); if (currentScriptElement !== null) { scripts.for...
0
2718.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$True,Position=1)] [String[]]$FileHashes, [Parameter(Mandatory=$False,Position=2)] [ValidateSet("MD5","SHA1","SHA256","SHA384","SHA512","RIPEMD160")] [string]$HashType = "SHA256", [Parameter(Mandatory=$False,Position=3)] [String...
0
ResetOutlookLivePassword.ps1
function Reset-OutlookLivePassword { <# .SYNOPSIS Resets an Outlook Live account password. .DESCRIPTION The Reset-OutlookLivePassword function resets an Outlook Live (Live@edu) acccount password. A remote session is opened to the Outlook Live service. Connecting to the remote service requires administra...
0
2493.ps1
$ips = '192.168.1.5','192.1..4444' $t = $ips | foreach { (New-Object Net.NetworkInformation.Ping).SendPingAsync($_, 250) } [Threading.Tasks.Task]::WaitAll($t) $t.Result
0
4134.ps1
[CmdletBinding()] param ( [Parameter(Mandatory = $false)][string]$ConsoleTitle = 'NIC Power Management', [bool]$TurnOffDevice = $true, [bool]$WakeComputer = $true, [bool]$AllowMagicPacketsOnly = $true ) function Exit-PowerShell { [CmdletBinding()] param ( [bool]$Errors ) If ($Errors -eq $true) { ...
0
1513.ps1
function Assert-LastProcessFailed { [CmdletBinding()] param( [Parameter(Position=0)] [string] $Message ) Set-StrictMode -Version 'Latest' if( $LastExitCode -eq 0 ) { Fail "Expected process to fail, but it succeeded (exit code: $LastEx...
0
sample_13_95.ps1
:2+?Vb/0/+MQ+>>E%+>>E%+>,Mo>p)<p %+?ht35!C)O4<Q:2+BosH+>GPm>p(dT+?Vb/0/+M24<Q:2+BosB/heD%/heD#2'?0I5!C)Q4s3$Q+?Vb/0/+MQ+>t>s0d'aE0/4S3 %4<Q:2+?Vb/0/+MQ+>>E%+>>E%+>,Mo>p)<p+?ht35!C)O4<Q:2+BosH+>GVo>p(dT+?Vb/0/+M24<Q:2+BosB/heD%/heD#2'?0I %5!C)Q4s3$Q+?Vb/0/+MQ+>t>s1E]sG0/4S34<Q:2+?Vb/0/+MQ+>>E%+>>E%+>,Mo>p)<p+?ht35!C)...
0
sample_1_57.ps1
#************************************************ # DC_AuditPol.ps1 # Version 1.0.2 # Date: 09-22-2009 # Author : David Fisher - davfish@microsoft.com # Author (PS) : Andre Teixeira - andret@microsoft.com # Description: run auditpol subcommands and obtain output #********************************************...
0
3677.ps1
function Test-GetUpgradeDatabaseHint { $response = Get-AzSqlDatabaseUpgradeHint -ResourceGroupName TestRg -ServerName test-srv-v1 -DatabaseName * Assert-NotNull $response Assert-AreEqual 1 $response.Count Assert-AreEqual test-db-v1 $response[0].Name Assert-AreEqual Premium $response[0...
0
2367.ps1
$aOutput = @(); $aDisabledGpos = Get-GPO -All | Where-Object { $_.GpoStatus -eq 'AllSettingsDisabled' }; foreach ($oGpo in $aDisabledGpos) { $oOutput = New-Object System.Object; $oOutput | Add-Member -type NoteProperty -Name 'Status' -Value 'Disabled'; $oOutput | Add-Member -type NoteProperty -Name 'Name' -Value $oG...
0
427.ps1
Register-PSFTeppScriptblock -Name 'PSFramework-tepp-scriptblockname' -ScriptBlock { [PSFramework.TabExpansion.TabExpansionHost]::Scripts.Keys } Register-PSFTeppScriptblock -Name 'PSFramework-tepp-parametername' -ScriptBlock { if ($fakeBoundParameter.Command) { $common = 'Verbose', 'Debug', 'ErrorAction', 'Warning...
0
sample_22_26.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\rollup@4.9.6\node_modules\rollup\dist\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\rollup...
0