filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
New-CodeSigningCert.ps1
## New-CodeSigningCert.ps1 ######################################################################################################################## ## Does the setup needed to self-sign PowerShell scripts ... ## Generates a "test" self-signed root Certificate Authority ## And then generates a code-signing certific...
0
DataStoreBalancer.ps1
#====================================================================================== # File Name : DataStoreBalancer.ps1 # Original Author : Kenneth C. Mazie # Description : Scans VM datastores and moves a single VM from the most heavily # : loaded to the...
0
7c573254-14a1-4559-9c68-e51bc0f502b2.ps1
[/HTML) [Http://]
0
1023.ps1
$rgName='MyResourceGroup' $location='eastus' $cred = Get-Credential -Message "Enter a username and password for the virtual machine." New-AzResourceGroup -Name $rgName -Location $location $as = New-AzAvailabilitySet -ResourceGroupName $rgName -Location $location ` -Name MyAvailabilitySet -Sku Aligned -Platform...
0
sample_64_12.ps1
# # Module manifest for module 'Az.DataFactory' # # Generated by: Microsoft Corporation # # Generated on: 7/31/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.DataFactory.psm1' # Version number of this module. ModuleVersion = '1.18.6' # Supported PSEdi...
0
Show-Sample1.ps1
Show -Width 300 -Height 150 { DockPanel { Menu -DockPanel-Dock Top -Height 20 { MenuItem -Header "_File" { ## Hook up the "New" menuitem to the New command ... MenuItem -Header "_New" -Command ([system.windows.input.applicationcommands]::new) MenuItem -Header ...
0
3066.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "Should -BeLessThan" { It "passes if value is less than expected" { 0 | Should BeLessThan 1 0 | Should -BeLessThan 1 0 | Should -LT 1 } It "fails if values equal" { { 3 | Should B...
0
sample_33_92.ps1
# powershell completion for azcmagent -*- shell-script -*- function __azcmagent_debug { if ($env:BASH_COMP_DEBUG_FILE) { "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" } } filter __azcmagent_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$...
0
sample_44_66.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=ėī ėīëĶ„ 및 ėœ í˜•ė˜ 환ęē― ëģ€ėˆ˜ę°€ ėīëŊļ ėĄīėžŽí•Đ니ë‹Ī. EnvironmentErrorDoesNotExists=ėī ėīëĶ„ 및 ėœ í˜•ė˜ 환ęē― ëģ€ėˆ˜ę°€ ėĄīėžŽí•˜ė§€ ė•ŠėŠĩ니ë‹Ī. '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFA...
0
sample_27_83.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_10_90.ps1
ConvertFrom-StringData @' id_pagedpoold2dsymevent_sd=This Windows Server 2003 may run out of paged pool due to a version of symevent.sys. id_kerneltagtokekb982010_sd=This machine have high usage of kernel memory pool tag Toke possibly caused by the DisableWindowsUpdateAccess user policy. id_kerneltagrxm4setikb264745...
0
3496.ps1
function Test-LocationCompleter { $resourceTypes = @("Microsoft.Batch/operations") $locations = [Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters.LocationCompleterAttribute]::FindLocations($resourceTypes, -1) $expectedResourceType = (Get-AzResourceProvider -ProviderNamespace "Microso...
0
sample_6_16.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 = '93.0.0' # Supported PSEditi...
0
874.ps1
function add-pythonfiles { $ErrorActionPreference = "Stop" $sub = Get-AzSubscription -ErrorAction SilentlyContinue if(-not($sub)) { Connect-AzAccount } $pathToStreamingFile = ".\hiveudf.py" $clusterName = Read-Host -Prompt "Enter the HDInsight cluster name...
0
2656.ps1
[CmdletBinding()] Param ( [Parameter(Mandatory=$false)] [ValidateSet('Install','Uninstall')] [string]$DeploymentType = 'Install', [Parameter(Mandatory=$false)] [ValidateSet('Interactive','Silent','NonInteractive')] [string]$DeployMode = 'Interactive', [Parameter(Mandatory=$false)] [switch]$AllowRebootPassThru...
0
sample_30_29.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 = '83.1.0' # Supported PSEdi...
0
sample_9_95.ps1
ConvertFrom-StringData @' id_fileacl=Determining file ACL's '@ # SIG # Begin signature block # MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA6VsPfmmzM00am # qvD0ITk80rX9ws5...
0
GPRS Online log_7.ps1
<# .SYNOPSIS Get-GprsTime (V4.0 Update for Windows 7 and allow time correction) Check the total connect time of any GPRS devices from a specified date. Use 'Get-Help .\\Get-GprsTime -full' to view Help for this script. .DESCRIPTION Display all the GPRS modem Event Log entries. While applications issued by the ...
0
Script permissions_1.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_50_26.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
542.ps1
function Open-SPORootsite { Open-SPOSite -relativeUrl "/" }
0
LibraryInputComparison.p.ps1
## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n\nSet-StrictMode -Version Latest\n\n## Process each element in the pipeline, using a\n## foreach statement to visit each element in $input\nfunction Get-InputWithForeach($identifier)\n{\n Write-Host "Beginning InputWit...
0
3947.ps1
function Test-VirtualNetworkAvailableEndpointServicesList { $resourceTypeParent = "Microsoft.Network/virtualNetworks" $location = Get-ProviderLocation $resourceTypeParent try { $results = Get-AzVirtualNetworkAvailableEndpointService -Location $location; Assert-NotNull $re...
0
3371.ps1
param( [ValidateNotNullOrEmpty()] [ValidateSet('Debug', 'Release')] [System.String]$BuildConfig ) $ProjectPaths = @( "$PSScriptRoot\..\artifacts\$BuildConfig" ) $DependencyMapPath = "$PSScriptRoot\..\artifacts\StaticAnalysisResults\DependencyMap.csv" $DependencyMap = Import-Csv -Path $Depende...
0
sample_56_95.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_41_50.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ElasticSan.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Module]::Instance # Export nothing to clear implicit expo...
0
sample_33_64.ps1
function Get-PerformanceProfile { Param( [Parameter(Mandatory = $false)] $LaunchConfig ) $ServiceUrl = Get-ServiceUrl -Method 'GetPerformanceProfile' -LaunchConfig $LaunchConfig $Credential = Get-ALTestRunnerCredential -LaunchConfig $LaunchConfig $PerformanceProfilePath = ...
0
9cae4b8c-e40a-43f0-8dea-dd78acab16c3.ps1
[reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint") | out-null [reflection.assembly]::LoadWithPartialName("Microsoft.Office.Server") | out-null [reflection.assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") | out-null @@#NOTE: I've set strict crawl freshness/crawl duration/success rati...
0
521.ps1
function Move-SPList{ param( [Parameter(Mandatory=$true)] [String] $ListUrl, [Parameter(Mandatory=$true)] [String] $WebUrl, [Switch] $NoFileCompression ) if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Mi...
0
sample_56_99.ps1
"use strict"; /* Copyright 2023 The Sigstore Authors. 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.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ...
0
3923.ps1
function Test-ListInvoices { $billingInvoices = Get-AzBillingInvoice Assert-True {$billingInvoices.Count -ge 1} Assert-NotNull $billingInvoices[0].Name Assert-NotNull $billingInvoices[0].Id Assert-NotNull $billingInvoices[0].Type Assert-NotNull $billingInvoices[0].InvoicePeriodStartDate Ass...
0
sample_47_80.ps1
# # Module manifest for module 'OCI.PSModules.Usageapi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usageapi.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions Comp...
0
sample_53_87.ps1
function Get-AllFixedDependenciesToInstall { param( $tempFolder, $dependencies ) . ".\FileLibrary.ps1" . ".\DevOpsLibrary.ps1" . ".\AzureBlobLibrary.ps1" if (!$dependencies) { return } $dependencies | Foreach-Object { $entry = $_ swi...
0
1403.ps1
function Test-CPerformanceCounterCategory { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $CategoryName ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState return [Diagnos...
0
Write-Log_3.ps1
function Write-Log { #region Parameters [cmdletbinding()] Param( [Parameter(ValueFromPipeline=$true,Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $Message, [Parameter()] [ValidateSet(“Error”, “Warn”, “Info”)] [string] $Level = “Info”, [Parameter()] [Switch] $NoConsole...
0
sample_53_34.ps1
# Copyright (c) 2019 Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) Function Get-AnsibleWebRequest { <# .SYNOPSIS Creates a System.Net.WebRequest object based on common URL module options in Ansible. .DESCRIPTION Will crea...
0
Get-NewPassword.ps1
#/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ # # Script Name: Get-NewPassword.ps1 # Title: Random Password Generator # Version: 1.0 # Author: johnwcannon at gmail dot com # Date: September 16th, 2010 # # Description: Password gerneration function based...
0
654.ps1
$reportPortalUri = if ($env:PesterPortalUrl -eq $null) { 'http://localhost/reports' } else { $env:PesterPortalUrl } $reportServerUri = if ($env:PesterServerUrl -eq $null) { 'http://localhost/reportserver' } else { $env:PesterServerUrl } Describe "Get-RsRestItemDataSource" { $session = $null $rsFolderPath = ...
0
2328.ps1
function Get-EC2InstanceMetadata { [CmdletBinding()] [OutputType('System.Management.Automation.PSCustomObject')] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Path, [Parameter()] [ValidateNotNullOrEmpty()] [string]$BaseUri = 'http://169.254.169.254/latest/meta-data' ) $Uri ...
0
sample_66_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
sample_20_34.ps1
# To check useKernelMode and useAppPoolCredentials For IIS 7 # support.microsoft.com/kb/2536453 # Kernel mode authentication within IIS is disabled for the Microsoft Dynamics CRM website in IIS 7.0 and 7.5 # # Created: 3/23/2012 # Author: Jonathan Randall #*********************************************************...
0
sample_64_11.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="$basedir\..\..\..\..\..\esbuild@0.20.2\node_modules" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Nod...
0
Invoke-Inline_1.ps1
#############################################################################\n##\n## Invoke-Inline\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\nDemonstrates...
0
sample_34_61.ps1
# Prepare windows environment for building and running containerd tests # Disable Windows Defender real time monitoring. Real time monitoring consumes a lot of # CPU and slows down tests as images are unarchived, and is not really needed in a short # lived test environment. Set-MpPreference -DisableRealtimeMonitoring:...
0
sample_44_55.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 = '83.1.0' # Supported PSEditions Compat...
0
sample_26_78.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
where-property_1.ps1
function where-property([string] $PropertyName,[string]$SubProperty , $is,$isnot,$contains,$in,$SelectProperty) { process { $useprop = $SelectProperty Function _outobj { if ($useprop ) { , $_.$useprop } else { , $_ } } if ($is) ...
0
Exchange Mailbox report.ps1
function Send-SMTPmail($to, $from, $subject, $smtpserver, $body) { $mailer = new-object Net.Mail.SMTPclient($smtpserver) $msg = new-object Net.Mail.MailMessage($from,$to,$subject,$body) $msg.IsBodyHTML = $true $mailer.send($msg) } Function Get-CustomHTML ($Header){ $Report = @" <!DOCTYPE HTML PUBLIC "-//W...
0
sample_49_24.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.a...
0
sample_6_44.ps1
#region ::::: Help ::::: <# .SYNOPSIS Script Name: GetLogs.ps1 Purpose: gather data from Windows Failover Cluster Nodes (default 3 Month back) Version: 1.4 Last Update: 2nd June 2020 Author: Josef Holzer Email-Alias: josefh .DESCRIPTION This script coll...
0
Get-ChildItemColor.ps1
function Get-ChildItemColor { <# .Synopsis Returns childitems with colors by type. .Description This function wraps Get-ChildItem and tries to output the results color-coded by type: Compressed - Yellow Directories - Dark Cyan Executables - Green Text Files - Cyan Others - Default See Also...
0
420.ps1
Register-PSFTeppScriptblock -Name "PSFramework-Unregister-PSFConfig-FullName" -ScriptBlock { switch ("$($fakeBoundParameter.Scope)") { "UserDefault" { $path = "HKCU:\SOFTWARE\Microsoft\WindowsPowerShell\PSFramework\Config\Default" } "UserMandatory" { $path = "HKCU:\SOFTWARE\Microsoft\WindowsPowerShell\PSFramework...
0
3399.ps1
function Test-VirtualMachine { param ($loc, [bool] $hasManagedDisks = $false) $rgname = Get-ComputeTestResourceName try { if ($loc -eq $null) { $loc = Get-ComputeVMLocation; } New-AzureRmResourceGroup -Name $rgname -Location $loc ...
0
Resize Console Window.ps1
## ## Author : Roman Kuzmin ## Synopsis : Resize console window/buffer using arrow keys ## function Size($w, $h) { New-Object System.Management.Automation.Host.Size($w, $h) } function resize() { Write-Host '[Arrows] resize [Esc] exit ...' $ErrorActionPreference = 'SilentlyContinue' for($ui = $Hos...
0
2635.ps1
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SqlWmiManagement')| Out-Null function Set-SqlServiceAccount{ param([string[]] $Instance ,[System.Management.Automation.PSCredential]$ServiceAccount ,[ValidateSet('SqlServer','SqlAgent')] $service = 'SqlServer' ) ...
0
sample_0_74.ps1
ConvertFrom-StringData @' id_clustercsvd=Cluster Shared Volume information id_clustercsvdesc=Obtaining information about Cluster Shared Volumes '@ # SIG # Begin signature block # MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG ...
0
sample_19_66.ps1
#************************************************ # TS_DetectLowPathMTU.ps1 # Version 1.0 # Date: 02/06/2014 # Author: BBenson # Description: # Rule number: 262755 # Rule ID: d2aaab92-c906-4b3e-a4e5-67244c49c422 # Rule URL: https://kse.microsoft.com/Contribute/Idea/de6654f5-8b05-4f97-b67b-f9ad51bc78ab # P...
0
Tac (reverse cat)_1.ps1
# From "Unix like command for tac?" thread on posh NG # solution by Keith Hill param([string]$path) $fs = New-Object System.IO.FileStream ((Resolve-Path $path), 'Open', 'Read') trap { $fs.Close(); break } $pos = $fs.Length $sb = New-Object System.Text.StringBuilder while (--$pos -ge 0) { [void]$fs.See...
0
3326.ps1
function New-Role { [PoshBot.BotCommand( Aliases = ('nr', 'newrole'), Permissions = 'manage-roles' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string[]]$Name, [parameter(Position = 1)] ...
0
sample_47_99.ps1
function Search-AzDataProtectionBackupInstanceInAzGraph { [OutputType('PSObject')] [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Searches for Backup instances in Azure Resource Graph and retrieves the expected entries')] param ( ...
0
sample_56_82.ps1
<# .SYNOPSIS Launch Developer PowerShell .DESCRIPTION Locates and imports a Developer PowerShell module and calls the Enter-VsDevShell cmdlet. The Developer PowerShell module is located in one of several ways: 1) From a path in a Visual Studio installation 2) From the latest installation of Visual Studio (hig...
0
sample_60_66.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function Copy-ToTemp { ...
0
sample_32_18.ps1
<# .SYNOPSIS UninstallSyncServiceIIS.ps1 script file This is a place-holder file only fofr agent patch build purposes #> Write-Host "This file functionality is deprecated and is place-holder only" # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # ...
0
sample_52_91.ps1
# <copyright> # INTEL CONFIDENTIAL # # Copyright 2022 Intel Corporation # # This software and the related documents are Intel copyrighted materials, and your use of # them is governed by the express license under which they were provided to you ("License"). # Unless the License provides otherwise, you may not us...
0
3310.ps1
function Install-Plugin { [PoshBot.BotCommand( Aliases = ('ip', 'installplugin'), Permissions = 'manage-plugins' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string]$Name, [parameter(Positio...
0
Send-Mapi.ps1
############################################################################## #.AUTHOR # Josh Einstein # Einstein Technologies, LLC ############################################################################## ############################################################################## #.SYNOPSIS # Opens a...
0
Split-Job.ps1
#requires -version 1.0 ################################################################################ ## Run commands in multiple concurrent pipelines ## by Arnoud Jansveld - www.jansveld.net/powershell ## ## Basic "drop in" usage examples: ## - Functions that accept pipelined input: ## Without Spli...
0
Get-Credential 2.6.ps1
## Get-Credential ## An improvement over the default cmdlet which has no options ... ################################################################################################### ## History ## v 2.6 Put back support for passing in the domain when getting credentials without prompting ## v 2.5 Added examples...
0
55.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
Set-ESXRemoteCLI.ps1
function Set-ESXRemoteCLI() { Param([parameter(Mandatory=$true,ValueFromPipeline=$true)]$VMHost, [parameter(Mandatory=$true)][Boolean]$enabled, [switch]$onboot ) Process { $VMHost | foreach { write-progress -id 1 -activity "Modifying Remote CLI on $VMHost" ...
0
HttpRest 1.0.1.ps1
## Http Rest #################################################################################################### ## The first implementation of the HttpRest module, as a bunch of script functions ## Based on the REST api from MindTouch's Dream SDK ## ## INSTALL: ## You need log4net.dll mindtouch.core.dll mindto...
0
sample_26_44.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_62_92.ps1
# # Module manifest for module 'OCI.PSModules.Opa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opa.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions CompatiblePSEd...
0
879.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_41_90.ps1
/////////////////////////////////////////////////////////////////////////////// // Helper to set a designer prop /////////////////////////////////////////////////////////////////////////////// function setDesignerProp(tname, ttype, tvalue) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)...
0
2537.ps1
$server = "XSQLUTIL18" $database = "master" $query = " SELECT [sys].[tables].[name] , [sys].[tables].[create_date] , [sys].[tables].[modify_date] FROM sys.tables SELECT [sys].[columns].[name] , [sys].[columns].[max_length] , [sys].[columns].[precision] , [sys].[columns].[scale] FROM sys.columns SELE...
0
sample_4_57.ps1
#************************************************ # TS_ModernAppsFailureForUserProfileDirCheck.ps1 # Version 1.0.1 # Date: 3/13/2013 # Author: v-kaw # Description: [Idea ID 7546] [Windows] WinStore - Modern Apps Fail to Start if the User Profile directory is Moved from default # Rule number: 7546 # Rule URL: ...
0
sample_6_57.ps1
# ********************************************************************************************************************************************************** # Version 1.0 # Date: 03/22/2012 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: # Base Script taken from DSI\Shared. Modified to exclude non-r...
0
sample_51_49.ps1
# # Module manifest for module 'OCI.PSModules.Dns' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dns.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEd...
0
sample_5_66.ps1
ConvertFrom-StringData @' id_dcpromologs=DCPromo id_dcpromologsobtaining=Obtaining DCPromo log files '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlA...
0
Set-Clipboard.ps1
#############################################################################\n##\n## Set-Clipboard\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\nSends the g...
0
4080.ps1
Import-Module $env:ProgramFiles"\Microsoft Security Client\MpProvider" Start-MProtScan -ScanType "FullScan" New-EventLog –LogName System –Source "Antimalware Full Scan" Write-EventLog -LogName System -Source "Antimalware Full Scan" -EntryType Information -EventId 1118 -Message "Antimalware full system scan was perfo...
0
2024.ps1
Import-Module HelpersRemoting Import-Module HelpersCommon Describe "Remote runspace pool should expose commands in endpoint configuration" -Tags 'Feature','RequireAdminOnWindows' { BeforeAll { if ($isWindows -and (Test-CanWriteToPsHome)) { $configName = "restrictedV" $c...
0
Save-Credentials_6.ps1
<# .SYNOPSIS The script saves a username and password, encrypted with a custom key to to a file. .DESCRIPTION The script saves a username and password, encrypted with a custom key to to a file. The key is coded into the script but should be changed before use. The key allows the password to be decrypted ...
0
4205.ps1
[CmdletBinding()] param ( [String]$ComputerName, [switch]$Rawdata, [ValidateNotNullOrEmpty()][string]$Username ) function Get-FilteredData { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()]$LogonType, [ValidateNotNullOrEmpty()][string]$Message, [ValidateNotNullOrEmpty()]$Logons ) $Errors = $fal...
0
sample_17_3.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
finddupe_18.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
3113.ps1
function Get-RandomPIN { [CmdletBinding(DefaultParameterSetName='NoClipboard')] param( [Parameter( Position=0, HelpMessage='Length of the PIN (Default=4)')] [ValidateScript({ if($_ -eq 0) { throw "Length of the PIN can not be 0!" } else { return $true } })] [Int32]$...
0
2417.ps1
[CmdletBinding(DefaultParameterSetName = 'name')] [OutputType('System.Management.Automation.PSCustomObject')] param ( [Parameter(ParameterSetName = 'name', Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateSet("Tom","Dick","Jane")] [ValidateRange(21,65)] [ValidateScript({Test-Path $_ -...
0
1110.ps1
$siteName = 'CarbonSetIisHttpHeader' $sitePort = 47938 function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { Install-IisWebsite -Name $siteName -Path $TestDir -Binding ('http/*:{0}:*' -f $sitePort) } function Stop-Test { ...
0
sample_11_32.ps1
ConvertFrom-StringData @' id_ex_exbpacmdact=Exchange Support Tool - ExBPA id_ex_exbpacmdstat=Running Exchange Best Practices Analyzer (ExBPA), please wait... id_ex_exbpacmdfiledescription=ExBPA Health Check id_ex_exbpacmdreportsection=Exchange Toolbox '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIo...
0
sample_19_6.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
3786.ps1
Param( [Parameter(Mandatory = $true, HelpMessage="Name of the resource group to which the KeyVault belongs to. A new resource group with this name will be created if one doesn't exist")] [ValidateNotNullOrEmpty()] [string]$resourceGroupName, [Parameter(Mandatory = $true)] [ValidateNotNullOrE...
0
sample_12_61.ps1
ConvertFrom-StringData @' id_ctssmb2serverdriverstatecheck=Check if the SMB2 Server driver has been disabled. id_ctssmb2serverdriverstatecheckdescription=Check if the SMB2 Server driver (srv2) has been disabled. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor ...
0
sample_3_79.ps1
#************************************************ # TS_ModernAppsFailureForWindDefenderCheck.ps1 # Version 1.0.1 # Date: 03/22/2013 # Author: v-alyao # Description: [Idea ID 7723] [Windows] WinStore - Modern applications fail to start if incompatible security - av software installed # Rule number: 7723 # Rule ...
0
sample_25_66.ps1
<policyDefinitionResources revision="1.0" schemaVersion="1.0"> <displayName> </displayName> <description> </description> <resources> <stringTable> <string id="LAPS">LAPS</string> <string id="LAPS_BackupDirectory">Настройка каталога резервного копирования паролей</string> <string...
0
sample_62_63.ps1
# # Module manifest for module 'OCI.PSModules.Licensemanager' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Licensemanager.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSE...
0
sample_33_84.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_Mp...
0
sample_16_13.ps1
# # Script module for module 'PackageManagement' # Set-StrictMode -Version Latest Microsoft.PowerShell.Utility\Import-LocalizedData LocalizedData -filename PackageManagement.Resources.psd1 # Summary: PackageManagement is supported on Windows PowerShell 3.0 or later, Nano Server and PowerShellCore $isCore = ($P...
0
sample_49_59.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PSGet.Resource.psd1 # ######################################################################################### ConvertFrom-StringData @' ###PSL...
0