filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
Set Single email .ps1
# Very simple script to use in Exchange 2007 with a dead simple task # Create an email enabled user with the local Email Address Policy Disabled with a SINGLE email address # Attached to it # # This can be used in an environment where you may have multiple email addresses but don't want an account picking # up mul...
0
sample_40_50.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 = '83.2.0' # Supported PSEditions Comp...
0
sample_5_84.ps1
import{a as t}from"./chunk-S2TTJTNL.js";import"./chunk-JW2F22G4.js";var e=Object.freeze({displayName:"Stata",fileTypes:["do","ado","mata"],foldingStartMarker:"\\{\\s*$",foldingStopMarker:"^\\s*\\}",name:"stata",patterns:[{include:"#ascii-regex-functions"},{include:"#unicode-regex-functions"},{include:"#constants"},{inc...
0
get-lockedtime.ps1
param ( [parameter(position=0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] $ComputerName ) Begin { $alreadybegan = $false; function WmiDateToDotnet { param($date); if($date.length -ne 25) { throw New-Object Argum...
0
sample_66_21.ps1
# # Module manifest for module 'OCI.PSModules.Ocicontrolcenter' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ocicontrolcenter.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported...
0
Expand-ZipFile.ps1
function Expand-ZipFile { param { $zipPath, $destination, [switch] $quiet } $shellApplication = new-object -com shell.application $zipPackage = $shellApplication.NameSpace($zipPath) $destinationFolder = $shellApplication.NameSpace($destination) # CopyHere vOpti...
0
sample_51_19.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
Get-GroupMembership_4.ps1
## Get-DistinguishedName -- look up a DN from a user's (login) name function Get-DistinguishedName { Param($UserName) $ads = New-Object System.DirectoryServices.DirectorySearcher([ADSI]'') $ads.filter = "(&(objectClass=Person)(samAccountName=$UserName))" $s = $ads.FindOne() return $s.GetDirectoryEnt...
0
Invoke-SqlCmd_7.ps1
####################### <# .SYNOPSIS Runs a T-SQL script. .DESCRIPTION Runs a T-SQL script. Invoke-Sqlcmd2 only returns message output, such as the output of PRINT statements when -verbose parameter is specified. Paramaterized queries are supported. .INPUTS None You cannot pipe objects to Invoke-Sq...
0
Set-IPAddress_9.ps1
function Set-IPAddress { param( [string]$networkinterface =$(read-host "Enter the name of the NIC (ie Local Area Connection)"), [string]$ip = $(read-host "Enter an IP Address (ie 10.10.10.10)"), [string]$mask = $(read-host "Enter the subnet mask (ie 255.255.255.0)"), [string]$gateway = $(read-host "Enter...
0
sample_39_18.ps1
# # Module manifest for module 'Az.ManagedServices' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.ManagedServices.psm1' # Version number of this module. ModuleVersion = '3.0.1' # Support...
0
3971.ps1
function Test-ExpressRouteServiceProviderList { $providers = Get-AzExpressRouteServiceProvider Assert-NotNull $providers Assert-AreNotEqual 0 @($providers).Count Assert-NotNull $providers[0].Name Assert-NotNull $providers[0].PeeringLocations Assert-NotNull $providers[0].BandwidthsOffered Ass...
0
sample_9_49.ps1
#************************************************ # TS_DCDiag.ps1 # Version 1.0.1 # Date: 09-23-2009 # Author : Andre Teixeira/ David Fisher (CSS)/ Craig Landis # Description: Obtain DCPromo and DCPromoUI logs #************************************************ if($debug -eq $true){[void]$shell.popup("Run DC...
0
Pause.ps1
## Pause (aka Pause-Script) ## Pause the script and wait for user action ################################################################################################### ## Parameters (are all OPTIONAL) ## Message - the message to use as the prompt to the user ## ReturnKey - when present, the scri...
0
Get-Parameter_5.ps1
function Get-Parameter ( $Cmdlet, [switch]$ShowCommon ) { foreach ($paramset in (Get-Command $Cmdlet).ParameterSets){ $Output = @() foreach ($param in $paramset.Parameters) { if ( !$ShowCommon ) { if ($param.aliases -match "vb|db|ea|wa|ev|wv|ov|ob") { continue } } $process = "" | Select-Object ...
0
2861.ps1
function Invoke-Task { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$taskName ) Assert $taskName ($msgs.error_invalid_task_name) $taskKey = $taskName.ToLower() $currentContext = $psake.context.Peek() if ($currentContext.aliases.Contains($taskKey)) ...
0
sample_58_90.ps1
mΔεν είναι δυνατή η εκτέλεση της μεθόδου όταν είναι απενεργοποιημένος ο χώρος αποθήκευσης πολλών στιγμιοτύπων.†Η αίτηση επιταχύνθηκε, πάρα πολλές αιτήσεις για ενημέρωση προέλευσης δεδομένων που ξεκίνησε από το χρήστη σε σύντομο χρονικό διάστημα.sΑνεπαρκές δικαίωμα για ανανέωση του πίνακα Direct Lake, επικοινωνήστε με τ...
0
WhoAmI.ps1
function whoami { [System.Security.Principal.WindowsIdentity]::GetCurrent().Name }
0
sample_67_60.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 = '86.2.0' # Supported PSEditi...
0
sample_32_12.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 = '77.0.0' # Supported P...
0
sample_52_15.ps1
# # Module manifest for module 'OCI.PSModules.Aivision' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aivision.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Comp...
0
3879.ps1
function Test-StorageInsightCreateUpdateDelete { $wsname = Get-ResourceName $siname = Get-ResourceName $saname = Get-ResourceName $rgname = Get-ResourceGroupName $said = Get-StorageResourceId $rgname $saname $wslocation = Get-ProviderLocation New-AzResourceGroup -Name $rg...
0
sample_29_18.ps1
var OfficeaicopilotStrings={ChatContainerKeepItActionButtonText:"Giữ lại",ChatContainerUndoActionButtonText:"Hoàn tác",ChatContainerInsertActionButtonText:"Chèn",ChatContainerFeedbackNudgeContent:"Vui lòng giúp chúng tôi tìm hiểu và đào tạo các mô hình của mình bằng cách cung cấp phản hồi thông qua các nút điều khiển t...
0
772.ps1
$releasePath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\release") $finalPackagePath = [System.IO.Path]::GetFullPath("$releasePath\FinalPackages") $nugetPath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\.nuget\NuGet.exe") $packages = Get-ChildItem $finalPackagePath -Filter "*.nupkg" foreach ($package in $...
0
sample_5_25.ps1
#************************************************ # TS_RegistrySizeLimitCheck.ps1 # Version 1.0 # Date: 12-21-2011 # Author: v-anecho # Description: The RegistrySizeLimit entry exists in the registry. This may cause the computer to stop responding as well as log Event ID 333's in the System Event Log. #**********...
0
Get-InstalledProgram_v2.ps1
function Get-InstalledProgram() { param ( [String[]]$Computer = "n2-ivanyuta", $User ) if ($User -is [String]) { $Connection = Get-Credential -Credential $User } if ($Connection -eq $null){ foreach ($Comp in $Computer){ $Install_soft = gwmi win32_product -ComputerName $Comp | where {$_....
0
sample_63_46.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 License...
0
1411.ps1
function Get-CGroup { [CmdletBinding()] [OutputType([DirectoryServices.AccountManagement.GroupPrincipal])] param( [string]$Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState Write-Timing ('Get-CGrou...
0
sample_65_55.ps1
# # Module manifest for module 'OCI.PSModules.Networkfirewall' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Networkfirewall.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported P...
0
68.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_56_52.ps1
# # Module manifest for module 'OCI.PSModules.Budget' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Budget.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions Compatib...
0
sample_21_46.ps1
@{ GUID="766204A6-330E-4263-A7AB-46C87AFC366C" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Disable-WSManCredSSP", "Enable-WSManC...
0
3780.ps1
function Test-RegisteredServer { $resourceGroupName = Get-ResourceGroupName Write-Verbose "RecordMode : $(Get-StorageTestMode)" try { $storageSyncServiceName = Get-ResourceName("sss") $resourceGroupLocation = Get-ResourceGroupLocation $resourceLocatio...
0
sample_55_34.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', 'New-Al...
0
4247.ps1
Function Get-CreditCardData { param ( [string]$path = $(throw "-path is required";) ) $Excel = New-Object -ComObject Excel.Application $REGEX = [regex]"(?im)(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d...
0
sample_6_4.ps1
##---------------------------------------------------------------------------- ## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved. ##---------------------------------------------------------------------------- # Import string constants . ./StringConstants.ps1 # Import shared functions and var...
0
3773.ps1
$subscriptionId ="302110e3-cd4e-4244-9874-07c91853c809" $reservationOrderId = "704aee8c-c906-47c7-bd22-781841fb48b5" $reservationId = "ac7f6b04-ff45-4da1-83f3-b0f2f6c8128e" function Test-GetCatalog { $catalog = Get-AzReservationCatalog -SubscriptionId $subscriptionId -ReservedResourceType Virtual...
0
sample_66_27.ps1
# # Module manifest for module 'OCI.PSModules.Lockbox' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Lockbox.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions Compat...
0
sample_10_8.ps1
ConvertFrom-StringData @' id_rsop=Resultant Set of Policy (RSoP) id_rsopobtaining=Obtaining Resultant Set of Policy (RSoP) via gpresult.exe utility '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JN...
0
LibrarySqlData.ps1
####################### function Get-SqlData { param([string]$serverName=$(throw 'serverName is required.'), [string]$databaseName=$(throw 'databaseName is required.'), [string]$query=$(throw 'query is required.')) Write-Verbose "Get-SqlData serverName:$serverName databaseName:$databaseName que...
0
sample_41_59.ps1
# # Module manifest for module 'OCI.PSModules.Desktops' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Desktops.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Comp...
0
VI Report.ps1
param( [string] $VIServer ) if ($VIServer -eq ""){ Write-Host Write-Host "Please specify a VI Server name eg...." Write-Host " powershell.exe Report.ps1 MYVISERVER" Write-Host Write-Host exit } function PreReq { if ((Test-Path REGISTRY::HKEY_CLASSES_ROOT\\Word.Application) -eq $False){ Wr...
0
sample_44_95.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
Atlassian Jira Interface.ps1
# jirafunctions.ps1 # # Note: Some functions are incomplete/untested. Be sure to TEST before placing in production!! # # Dot-source this script to connect to jira and initialize the functions. # Ex: PS C:\\scripts\\jira> . .\\jirafunctions.ps1 # Ex: PS C:\\scripts\\jira> get-JiraReport # # Connects to Jira and ...
0
335.ps1
function Resolve-PSFDefaultParameterValue { [OutputType([System.Collections.Hashtable])] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Resolve-PSFDefaultParameterValue')] param ( [Parameter(Mandatory = $true)] [System.Collections.Hashtable] $Reference, [Parameter(Ma...
0
Export-PSCredential_4.ps1
# Author: Hal Rottenberg <hal@halr9000.com> # Url: http://halr9000.com/article/tag/lib-authentication.ps1 # Purpose: These functions allow one to easily save network credentials to disk in a relatively # secure manner. The resulting on-disk credential file can only [1] be decrypted # by the same user account...
0
4338.ps1
function Get-ScriptSourceLocation { [CmdletBinding()] Param ( [Parameter()] [String] $Location, [Parameter()] $Credential, [Parameter()] $Proxy, [Parameter()] $ProxyCredential ) $scriptLocation = $null if($Location) ...
0
3804.ps1
param( [string]$first, [string]$second ) Write-Host This is a sample script with parameters $first $second Write-Host "Second line with escaped characters"
0
sample_65_32.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apa...
0
Set-WLWAutoLink.ps1
#requires -version 2 function Set-WLWAutoLink{ param( [Parameter( Position=0,Mandatory=$true,ValueFromPipelineByPropertyName=$true )] [String]$Name, [Parameter( Position=1,Mandatory=$true,ValueFromPipelineByPropertyName=$true )] ...
0
1497.ps1
function Assert-Error { [CmdletBinding(DefaultParameterSetName='Default')] param( [Parameter(Mandatory=$true,ParameterSetName='CheckLastError')] [Switch] $Last, [Parameter(Mandatory=$true,ParameterSetName='CheckFirstError')] [Switch] ...
0
sample_61_95.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
Xml Module 6.6.ps1
#requires -version 2.0 # Improves over the built-in Select-XML by leveraging Remove-XmlNamespace http`://poshcode.org/1492 # to provide a -RemoveNamespace parameter -- if it's supplied, all of the namespace declarations # and prefixes are removed from all XML nodes (by an XSL transform) before searching. # IMP...
0
sample_51_43.ps1
# # Module manifest for module 'OCI.PSModules.Osubusage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubusage.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Co...
0
Set-Domain_3.ps1
function Set-Domain { param( [switch]$help, [string]$domain=$(read-host "Please specify the domain to join"), [System.Management.Automation.PSCredential]$credential = $(Get-Crdential) ) $usage = "`$cred = get-credential `n" $usage += "Set-AvaDomain -domain corp.avanade.org -credential `$cred`n" ...
0
1615.ps1
$Dest = "C:\Support\SQLBac\"; $Daysback = "0"; $CurrentDate = Get-Date $DatetoDelete = $CurrentDate.AddDays($Daysback) Get-ChildItem $Dest | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item
0
sample_49_47.ps1
# # Module manifest for module 'OCI.PSModules.Datascience' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datascience.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEdition...
0
sample_10_13.ps1
########################################################################### # DC_Disk_Quota # Version 1.0 # Date: 09-26-2012 # Author: mifannin # Description: Collects Disk Quota Data ########################################################################### Import-LocalizedData -BindingVariable Quota -FileNa...
0
ConvertTo-Hex_7.ps1
# Ported from C# technique found here: http://forums.asp.net/p/1298956/2529558.aspx param ( [string]$SidString ) # Create SID .NET object using SID string provided $sid = New-Object system.Security.Principal.SecurityIdentifier $sidstring # Create a byte array of the proper length $sidBytes = New-Object byte[] ...
0
sample_39_1.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ResourceMover.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.ResourceMover.Module]::Instance # Export nothing to clear implici...
0
3783.ps1
function Test-StorageSyncService { $resourceGroupName = Get-ResourceGroupName Write-Verbose "RecordMode : $(Get-StorageTestMode)" try { $storageSyncServiceName = Get-ResourceName("sss") $resourceGroupLocation = Get-ResourceGroupLocation $resourceLocat...
0
Xml Module 3.1.ps1
#requires -version 2.0 # Improves over the built-in Select-XML by leveraging Remove-XmlNamespace http://poshcode.org/1492 # to provide a -RemoveNamespace parameter -- if it's supplied, all of the namespace declarations # and prefixes are removed from all XML nodes (by an XSL transform) before searching. # IMPO...
0
3977.ps1
function Check-CmdletReturnType { param($cmdletName, $cmdletReturn) $cmdletData = Get-Command $cmdletName; Assert-NotNull $cmdletData; [array]$cmdletReturnTypes = $cmdletData.OutputType.Name | Foreach-Object { return ($_ -replace "Microsoft.Azure.Commands.Network.Models.","") }; [arra...
0
sample_43_91.ps1
# # This script launches the VC redist executable and handles certain error scenarios. # param( [Parameter(Mandatory=$true)][String][ValidateNotNullOrEmpty()]$PayloadDirectory, [Parameter(Mandatory=$true)][String][ValidateSet("arm64","x64","x86")]$Architecture, [Parameter(Mandatory=$true)][String][Val...
0
sample_24_59.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 = '82.0.0' # Supported PSEdi...
0
sample_6_69.ps1
$OutputFile= $Computername + "_reg_Cluster.hiv" RegSave -RegistryKey "HKLM\Cluster" -OutputFile $OutputFile -fileDescription "Cluster Hive" $OutputFile= $Computername + "_reg_ClusSvc.txt" RegQuery -RegistryKeys "HKLM\SYSTEM\CurrentControlSet\services\ClusSvc" -OutputFile $OutputFile -fileDescription "ClusSvc" -R...
0
sample_61_68.ps1
# # Module manifest for module 'OCI.PSModules.Oda' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oda.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions CompatiblePSEd...
0
sample_36_70.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_58_80.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
Test-WebDAV_1.ps1
function Test-WebDav () { param ( $Url = "$( throw 'URL parameter is required.')" ) $xhttp = New-Object -ComObject msxml2.xmlhttp $xhttp.open("OPTIONS", $url, $false) $xhttp.send() if ( $xhttp.getResponseHeader("DAV") ) { $true } else { $false } }
0
sample_56_36.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apa...
0
TabExpansion_2.ps1
## Tab-Completion ################# ## 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<tab> ## $foo[0].<tab> ## $foo[0].n.b<tab> ## $function:a<tab> ##...
0
sample_34_51.ps1
ijSTF2QMV0d+rdP3fk8k55NqSe22KLviJ43jcC8g+lhXjnBHU1uXoAWlklY6bYYzRUUtrWoQ8A1TiG0u7Djhmy0XbTEPnnXkkBDGumbD7JknOEpkSST9OyWrHCdGtEDc6S9fjopA0ypkuh9Uoj75wm5e+UllN1fPf2g8Ku901eEK5Lc593lQIHGFVjmXxmQx5fJLI0ZwZ3sP6xC5HJ0wqDhEdxE2UIBAsxQZftHEOWXF2e1xAwoG9b2bPWyWt69gImrecud4+qsHGYbUz0b6NLRHc7WdUx16N6+jk7mtuBb6A6HW8ix4My9WVGEEjcmi...
0
sample_3_75.ps1
ConvertFrom-StringData @' id_collectactivity=Collecting Basic System Information TXT id_collectingdata=Collecting Basic Data id_formattingdata=Formatting Data id_uacadminmode=Admin Mode id_uacnoprompt=No Prompt id_uacpromptcredentials=Prompt for credentials id_uacpromptconsent=Prompt for consent id_uacpromptcon...
0
sample_34_20.ps1
## Install Rigel app ###################### # In the event that the app is already provisioned, DO NOT provision it again. if ((get-appxprovisionedpackage -online |? {$_.DisplayName -eq "Microsoft.SkypeRoomSystem"}) -eq $null) { # Check if we are using store or dev package $licensePath = Get-Item $Env:...
0
Set-ExcludeFromPeek.ps1
Add-Type -Type @" using System; using System.Runtime.InteropServices; namespace Huddled { public static class Dwm { [DllImport("dwmapi.dll", PreserveSig = false)] public static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int attrValue, int attrSize); [Flags] public...
0
sample_35_66.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
1882.ps1
Describe "Get-EventSubscriber" -Tags "CI" { AfterEach { Unregister-Event -SourceIdentifier PesterTestRegister -ErrorAction SilentlyContinue } Context "Check return type of Get-EventSubscriber" { It "Should return System.Management.Automation.PSEventSubscriber as return type of New-Event" { $pest...
0
2046.ps1
Describe "File encoding tests" -Tag CI { Context "ParameterType for parameter 'Encoding' should be 'Encoding'" { BeforeAll { $testCases = Get-Command -Module Microsoft.PowerShell.* | Where-Object { $_.Parameters -and $_.Parameters['Encoding'] } | ForEach-Object...
0
Enable PS Remoting.ps1
#Run winrm quickconfig defaults echo Y | winrm quickconfig #Run enable psremoting command with defaults enable-psremoting -force #Enabled Trusted Hosts for Universial Access cd wsman: cd localhost\\client Set-Item TrustedHosts * -force restart-Service winrm echo "Complete"
0
sample_59_20.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.3.0' # Supported P...
0
3154.ps1
function Test-IsVanillaWindow { $hasAnsiSupport = (Test-AnsiTerminal) -or ($Env:ConEmuANSI -eq "ON") -or ($env:PROMPT) -or ($env:TERM_PROGRAM -eq "Hyper") -or ($env:TERM_PROGRAM -eq "vscode") return !$hasAnsiSupport } function Test-AnsiTerminal { return $Host.UI.SupportsVirtualTerminal } function Test-Ps...
0
3896.ps1
function Test-VolumeCrud { $currentSub = (Get-AzureRmContext).Subscription $subsid = $currentSub.SubscriptionId $resourceGroup = Get-ResourceGroupName $accName = Get-ResourceName $poolName = Get-ResourceName $poolName2 = Get-ResourceName $volName1 = Get-ResourceName $vol...
0
2550.ps1
cls function Backup-SMCReplication { param ([string ] $sqlServer , [string] $outputDirectory ) Import-Module Repl [string] $path = "$outputDirectory\$((get-date).toString('yyyy-MMM-dd'))\" if ( -not (test-path $path)) { New-Item $path -ItemType Directory | Out-Null } foreach(...
0
2712.ps1
Param( [Parameter(Mandatory=$False,Position=0)] [string]$BasePath="C:\inetpub\wwwroot", [Parameter(Mandatory=$False,Position=1)] [string]$extRegex="\..*$", [Parameter(Mandatory=$False,Position=2)] [long]$MinB=0, [Parameter(Mandatory=$False,Position=3)] [long]$MaxB=28147...
0
sample_4_35.ps1
#************************************************ # TS_GPPDelolyPrinterFailureCheck.ps1 # Version 1.0.1 # Date: 3/14/2013 # Author: V-maam # Description: [Idea ID 6863] [Windows] GPP printer fails to be added since LocalEnumForms returns error 8007007a # Rule number: 6863 # Rule URL: http://sharepoint/sites/r...
0
2633.ps1
function Restore-SqlDbWithMove{ [cmdletbinding()] param([string]$ServerInstance = 'localhost' ,[string]$BackupFile ,[string]$NewDataPath ,[string]$NewLogPath = $NewDataPath ,[string]$OutputPath = 'NoPath' ) $relocate = @() $dbname = (Invoke-Sqlcmd -ServerInstance $ServerInstance -Da...
0
Get-ServiceAccounts.ps1
#requires -pssnapin PSCX #Author: Glenn Sizemore gesize@get-admin.com #Purpose: Scan a remote system for any services running under a non standard account. # Standard accounts would be considered, NT AUTHORITY\\NetworkService, # NT AUTHORITY\\LocalService, LocalSystem, or .\\ASPNET # ...
0
sample_0_64.ps1
[dynamic, provider("dcismprovider"), Association] class DCIM_IPMISOLRBAIdentityMemberOfCollection : CIM_MemberOfCollection { [ Description ("The aggregated member of the Collection."), Key, Override ("Member") ] CIM_ManagedElement REF Member; [ Aggregate, ...
0
8b29c3c3-9f8f-4a19-83de-cdc6f2129025.ps1
#========================================================================== # NAME: getunknownsids.ps1 # # AUTHOR: Stephen Wheet # Version: 4.0 # Date: 6/11/10 # # COMMENT: # This script was created to find unknown SIDs or old domain permissions # on folders. It ignores folders where inheirtance is turned ...
0
Compress-Bitmap.ps1
function Compress-Bitmap { PARAM( [Parameter(Mandatory=$true, ValueFromPipeline=$true)] [IO.FileInfo]$SourceFile , [Parameter(Mandatory=$true, Position=1)] [String]$DestinationFile , [Parameter(Mandatory=$false)] [Int]$Width , [Parameter(Mandatory=$false)] [Int]$Height , [Parame...
0
2118.ps1
Describe 'Test for conversion b/w script block and delegate' -Tags "CI" { BeforeAll { function lineno { $myInvocation.ScriptLineNumber } function Generate-ArgumentTypesAndParameters { param([int] $num, [ref] $parameters, [ref]$argumentTypes, [bool]$...
0
2745.ps1
я╗┐ function ConvertTo-Encoding ([string]$From, [string]$To){ Begin{ $encFrom = [System.Text.Encoding]::GetEncoding($from) $encTo = [System.Text.Encoding]::GetEncoding($to) } Process{ $bytes = $encTo.GetBytes($_) $bytes = [Sy...
0
sample_66_14.ps1
@{ GUID="eb74e8da-9ae2-482a-a648-e96550fb8733" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." Description='PowerShell module for working with ZIP archives.' ModuleVersion="1.2.5" PowerShellVersion="3.0" FunctionsToExport = @('Compress...
0
sample_35_54.ps1
# # Module manifest for module 'OCI.PSModules.Appmgmtcontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Appmgmtcontrol.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSE...
0
sample_27_37.ps1
# # Module manifest for module 'Microsoft.SME.PowershellConsole' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.PowershellConsole.psm1' # Version number of this module. ModuleVersion = '4.11.0' # Supported PSEditions # CompatiblePSEditions = @() ...
0
sample_59_14.ps1
# Import the helper functions Import-Module $PSScriptRoot\..\..\Misc\helper.psm1 -Verbose:$false function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [parameter(Mandatory = $true)] [System.String] $Category ) #Write-Verbose "Use this cmdlet t...
0
sample_30_95.ps1
# # Module manifest for module 'OCI.PSModules.Events' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Events.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compatib...
0
sample_47_40.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_43_95.ps1
# # Module manifest for module 'OCI.PSModules.Integration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Integration.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEdition...
0