filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_39_30.ps1
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its paramet...
0
sample_4_6.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 = '93.0.0' # S...
0
4268.ps1
Function Get-RecentFiles { $obj = New-Object -ComObject WScript.Shell $Path = [System.Environment]::GetFolderPath('Recent') $files = Get-ChildItem -Path $Path | Sort-Object LastAccessTime | Select-Object -Last 50 echo "" echo "[+] Get-RecentFiles" echo "" foreach ($file in $files) { ...
0
sample_36_44.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
Get-HostsFile_2.ps1
Function Get-HostsFile { <# .SYNOPSIS Retrieves the contents of a hosts file on a specified system. .DESCRIPTION Retrieves the contents of a hosts file on a specified system. .PARAMETER ComputerName The computers to access. .NOTES Name: Get-HostsFile Author: Boe Prox DateCreated: 15Ma...
0
147.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 ($Aad...
0
sample_17_0.ps1
parameters: configuration: 'Debug' # Optional: condition for the job to run condition: '' # Optional: 'true' if future jobs should run even if this job fails continueOnError: false # Optional: dependencies of the job dependsOn: '' # Optional: Include PublishBuildArtifacts task enablePublishBuildAr...
0
sample_33_95.ps1
# # Module manifest for module 'OCI.PSModules.Disasterrecovery' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Disasterrecovery.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported...
0
PS FindFirstFileW.ps1
param( [string] $dirRoot = $pwd, [string] $Spec = "*.*", [bool] $longOnly = $false ) # Changes: # 23/05/2008, Wayne Martin, Added the option to only report +max_path entries, and report the short path of those directories (which makes it easier to access them) # # # Description: # Use the wide...
0
sample_60_14.ps1
param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $ChannelId, [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '...
0
sample_7_83.ps1
ConvertFrom-StringData @' id_ctssmbclient=SMB Client Component id_ctssmbclientdescription=Collects information about the SMB Client component. '@ # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG #...
0
sample_29_88.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEdition...
0
sample_53_33.ps1
# # Module manifest for module 'OCI.PSModules.Optimizer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Optimizer.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Co...
0
sample_60_59.ps1
# # Module manifest for module 'OCI.PSModules.Database' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Database.dll' # Version number of this module. ModuleVersion = '89.0.0' # Supported PSEditions Comp...
0
842.ps1
Param( [parameter(Mandatory=$true)] $CsvFilePath ) $ErrorActionPreference = "Stop" $scriptsPath = $PSScriptRoot if ($PSScriptRoot -eq "") { $scriptsPath = "." } . "$scriptsPath\asr_logger.ps1" . "$scriptsPath\asr_common.ps1" . "$scriptsPath\asr_csv_processor.ps1" Function ProcessItemImpl($processor, $cs...
0
sample_28_27.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ManagedServices.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Module]::Instance # Export nothing to clear imp...
0
sample_42_66.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Rozwiązywanie problemów Troubleshoot_DetectDVDDevice=Trwa sprawdzanie urządzenia DVD... Troubleshoot_DetectDVDvideoDecoder=Trwa sprawdzanie dekodera wideo służącego do odtwarzania dys...
0
sample_67_59.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 = '90.0.0' # Supported PSEditi...
0
sample_31_97.ps1
# # Module manifest for module 'OCI.PSModules.Aispeech' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aispeech.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Comp...
0
New-Password 1.1.ps1
#.Synopsis # Generate pseudo-random passwords based on templates # #.Parameter Template # The template for the password you want to generate. This defines which types of characters are generated for each character in the password. # IMPORTANT: the US English alphabet is hardcoded ... (we make no apologies, but...
0
sample_15_58.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PSGet.Resource.psd1 # ######################################################################################### ConvertFrom-StringData @' ###PSL...
0
Ping Alert Script.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_52_89.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 = '73.1.0' # Supported PSEditions Co...
0
Audit Script_1.ps1
##################################################### # # Audit script by Alan Renouf - Virtu-Al # # # Blog: http://teckinfo.blogspot.com/ # # # # # # Usage: Audit.ps1 'path' # # # ...
0
sample_19_27.ps1
ConvertFrom-StringData @' id_msinfo32=System Information id_msinfo32running=Running MSInfo32 utility to obtain system information (TXT and NFO) '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG ...
0
Queue Checker.ps1
foreach ($ExchangServer in (Get-ExchangeServer | Where { $_.isHubTransportServer -eq $True})) {Get-queue -Server $ExchangeServer}
0
sample_3_12.ps1
# You may use this code and information and create derivative works of it, # provided that the following conditions are met: # 1. This code and information and any derivative works may only be used for # troubleshooting a) Windows and b) products for Windows, in either case using # the Windows Troubleshooting Platf...
0
Compare Table & DataRow_2.ps1
function Compare-DataRow { param( $a, $b) # @bernd_k http://pauerschell.blogspot.com/ $diff = '' $a_columncount = $a.Table.columns.count $b_columncount = $b.Table.columns.count if ( $a_columncount -ne $b_columncount) { Write-host "Tables have different numbe...
0
sample_45_25.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
2083.ps1
Describe 'Misc Test' -Tags "CI" { Context 'Where' { class C1 { [int[]] $Wheels = @(1,2,3); [string] Foo() { return (1..10).Where({ $PSItem -in $this.Wheels; }) -join ';' } [string] Bar() { return (1..10 | Where-Object { $PSItem -in $this....
0
888.ps1
Get-AzManagedApplication -ResourceGroupName "DemoApp" (Get-AzManagedApplication -ResourceGroupName "DemoApp").Properties.managedResourceGroupId Get-AzResource -ResourceGroupName DemoApp6zkevchqk7sfq -ResourceType Microsoft.Compute/virtualMachines Get-AzVM -ResourceGroupName DemoApp6zkevchqk7sfq | ForEach{ $_.Nam...
0
4402.ps1
function HttpClientApisAvailable { $HttpClientApisAvailable = $false try { [System.Net.Http.HttpClient] $HttpClientApisAvailable = $true } catch { } return $HttpClientApisAvailable }
0
sample_37_18.ps1
# # Module manifest for module 'OCI.PSModules.Accessgovernancecp' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Accessgovernancecp.dll' # Version number of this module. ModuleVersion = '82.0.0' # Suppo...
0
sample_40_18.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_45_38.ps1
# # Module manifest for module 'OCI.PSModules.Identity' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identity.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Comp...
0
Resizer of pictures_2.ps1
[reflection.assembly]::LoadWithPartialName("System.Drawing") $SizeLimit=1280 # required size of picture's long side $logfile="resizelog.txt" # log file for errors $toresize=$args[0] # list of directories to find and resize images. can be empty if ([string]$toresize -eq &#8220;&#8221;) { # if scr...
0
sample_1_38.ps1
<# ISM PowerShell Service Module This module contains a set of wrapper scripts that enable Administrator To invoke iDRAC hard reset operation from host server. #> function IsAdministrator { <# .SYNOPSIS IsAdministrator. .DESCRIPTION Use IsAdministrator to get whether the user has an...
0
867.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_11_72.ps1
param() if (Get-Module posh-vcpkg) { return } if ($PSVersionTable.PSVersion.Major -lt 5) { Write-Warning ("posh-vcpkg does not support PowerShell versions before 5.0.") return } if (Test-Path Function:\TabExpansion) { Rename-Item Function:\TabExpansion VcpkgTabExpansionBackup } function Tab...
0
491.ps1
function Get-ChildItemRecurse{ param( [parameter(Mandatory=$true)] [String] $Path, [parameter(Mandatory=$false)] [int] $Levels = 0, [switch] $OnlyDirectories ) $Metadata = @{ Title = "Get Child Item Recurse" Filename = "Get-ChildItemRecurse.ps1" ...
0
1862.ps1
Describe "Import-Module" -Tags "CI" { $moduleName = "Microsoft.PowerShell.Security" BeforeAll { $originalPSModulePath = $env:PSModulePath New-Item -ItemType Directory -Path "$testdrive\Modules\TestModule\1.1" -Force > $null New-Item -ItemType Directory -Path "$testdrive\Modules\TestMod...
0
usr mailbox in exch 07.ps1
#Generamos los usuarios por buzon y comprimimos el resultado #Autor: Pedro Genil #Fecha: 2012/11/21 #Version: 1.0 # Aþadimos modulo If ((Get-PSSnapin | where {$_.Name -match "Exchange.Management"}) -eq $null) { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin } # Creamos el alias para el 7zip if (...
0
77.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
3672.ps1
function Test-ManagedLiveDatabaseShortTermRetentionPolicy { $rg = Create-ResourceGroupForTest $vnetName = "cl_initial" $subnetName = "Cool" $virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location $subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq...
0
689.ps1
function Restore-RSEncryptionKey { [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( [Parameter(Mandatory = $True)] [string] $Password, [Parameter(Mandatory = $True)] [string] $KeyPath, [Alias('SqlServerInstanc...
0
sample_57_74.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> function Trace-Execution { [CmdletBinding()...
0
Connect-AccessDB_3.ps1
# Functions for connecting to and working with Access databases # Matt Wilson # May 2009 function Connect-AccessDB ($global:dbFilePath) { # Test to ensure valid path to database file was supplied if (-not (Test-Path $dbFilePath)) { Write-Error "Invalid Access database path specified. Please supply full a...
0
Export-PSCredential.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
Import-ExcelToSQL_2.ps1
#Change these settings as needed $filepath = 'C:\\Users\\u00\\Documents\\backupset.xlsx' #Comment/Uncomment connection string based on version #Connection String for Excel 2007: $connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=`"$filepath`";Extended Properties=`"Excel 12.0 Xml;HDR=YES`";" #Connection S...
0
3241.ps1
class CommandHistory { [string]$Id [string]$CommandId [string]$CallerId [CommandResult]$Result [ParsedCommand]$ParsedCommand [datetime]$Time CommandHistory([string]$CommandId, [string]$CallerId, [CommandResult]$Result, [ParsedCommand]$ParsedCommand) { $this...
0
sample_27_63.ps1
@{ ModuleVersion = '7.0.1' GUID = '3859ddf6-1713-4701-adf3-477aeaa06333' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Microsoft® Corporation. All rights reserved." NestedModules="Newtonsoft.Json.dll" } # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDz...
0
534.ps1
function Add-SPOPictureLibrary { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$listTitle ) Add-SPOList -listTitle $listTitle -templateType "PictureLibrary" }
0
sample_30_91.ps1
# # Module manifest for module 'Microsoft.SME.NetATC' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.NetATC.psm1' # Version number of this module. ModuleVersion = '3.6.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely ...
0
sample_48_66.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
3515.ps1
function Get-ResourceGroupName { return getAssetName } function Get-ResourceName { return getAssetName } function Get-VirtualNetworkName { return getAssetName } function TestSetup-CreateResourceGroup { $resourceGroupName = Get-ResourceGroupName $rglocation = "West US" $resource...
0
sample_3_28.ps1
// ================================================================== // DCIM_SPOwningCollectionElement // ================================================================== [dynamic, provider("dcismprovider"), Association, Description( "DCIM_SPOwningCollectionElement is a" "trivial de...
0
1142.ps1
$username = 'CarbonGrantPrivilege' $password = 'a1b2c3d4 function Start-TestFixture { & (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { Install-User -Username $username -Password $password -Description 'Account for testing Carbon Grant-Pr...
0
sample_60_91.ps1
# # Module manifest for module 'OCI.PSModules.Ailanguage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEditions ...
0
sample_9_8.ps1
#************************************************ # TS_Check_ZenographicsUI.ps1 # Version 1.0.1 # Date: 03/12/2012 13:34:20 # Author: jasonf # Description: Checks for the presence of Zenographics Device Manager User Interface version 6.1.524.0 #************************************************ Import-Localized...
0
1308.ps1
function Split-CIni { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true,ParameterSetName='ByPath')] [string] $Path, [Switch] $AsHashtable, [Switch] $CaseSensitive ) Set-Strict...
0
VM Performance Report.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
3188.ps1
function Out-DataTable { [CmdletBinding()] [OutputType([System.Data.DataTable])] param( [Parameter( Position=0, Mandatory=$true, ValueFromPipeline = $true)] [PSObject[]]$InputObject, [string[]]$NonNullable = @() ) Begin { ...
0
sample_31_72.ps1
// Copyright (c) Microsoft Corporation. All rights reserved. "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function exitIfHostProcessNotRunning(processName, pid) { try { process.kill(pid, 0); } catch (error) { console.error('Unable to find parent process ' + processName + ':' + pi...
0
Update-VmFromTemplate.ps.ps1
<# .SYNOPSIS Create a new VM from an imported template .DESCRIPTION This script will modify a VM on Hyper-V R2 that has been imported from an exported VM. The current release of the HyperV module does not support the proper Import method, so I don't implement that bit in t...
0
1290.ps1
function Remove-CEnvironmentVariable { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string]$Name, [Parameter(ParameterSetName='ForCurrentUser')] [Switch]$ForComputer, [Parameter(ParameterSetName='ForCu...
0
sample_32_27.ps1
# # Module manifest for module 'OCI.PSModules.Marketplacepublisher' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplacepublisher.dll' # Version number of this module. ModuleVersion = '77.0.0' # S...
0
Download DefragTools _2.ps1
#requires -version 2.0 <# .Synopsis Downloads Channel 9 Defrag Tool Episode Video .DESCRIPTION Downloads Channel 9 Defrag Tool Episode Video in the format selected and to a given path. .EXAMPLE Downloads all shows in WMV format to the default Downloads Folder for the user. Get-DefragToolsShow -All...
0
3743.ps1
$pfxpwd='123' $securepfxpwd=$pfxpwd | ConvertTo-SecureString -AsPlainText -Force $data=123 $securedata=$data | ConvertTo-SecureString -AsPlainText -Force $pfxPassword = "123" function CreateAKVCertificate( [string] $keyVault, [string] $certificateName) { $pfxPath = Get-FilePathFromCommonData 'importpfx0...
0
Yet another hex2dec.ps1
@set @script=0 /* @echo off set @script= if "%1" neq "" cscript //nologo //e:jscript "%~dpnx0" %1 && goto:eof if "%1" equ "?" cscript //nologo //e:jscript "%~dpnx0" %1 && goto:eof setlocal echo Hex2dec v3.07 - converts hex to decimal and vice versa echo Copyright (C) 2012-2013 greg...
0
698.ps1
function Grant-RsSystemRole { [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( [Alias('UserOrGroupName')] [Parameter(Mandatory = $True)] [string] $Identity, [Parameter(Mandatory = $True)] [string] $Rol...
0
sample_38_91.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEdition...
0
PS2WCF_2.ps1
# Call WCF Services With PowerShell V1.0 22.12.2008 # # by Christian Glessner # Blog: http://www.iLoveSharePoint.com # Twitter: http://twitter.com/cglessner # Codeplex: http://codeplex.com/iLoveSharePoint # # requires .NET 3.5 # load WCF assemblies [void][System.Reflection.Assembly]::LoadWithPartialName("Sy...
0
sample_53_65.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 = '82.0.0' # Supported PSEditions Comp...
0
sample_26_45.ps1
# # Module manifest for module 'OCI.PSModules.Apigateway' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apigateway.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions ...
0
sample_12_36.ps1
# Load Common Library # Load Reporting Utilities #_#$debug = $false . ./utils_cts.ps1 . ./TS_RemoteSetup.ps1 trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.S...
0
1578.ps1
function Test-MrURL { [CmdletBinding()] param ( [string]$Uri, [switch]$Detailed ) $CurrentErrorAction = $ErrorActionPreference $ErrorActionPreference = 'SilentlyContinue' $Result = Invoke-WebRequest -Uri $Uri -TimeoutSec 30 $ErrorActionPreference = $CurrentErrorAction ...
0
sample_41_46.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
868.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests', '' . "$here\$sut" $clusterName = $ENV:ClusterName $httpUserPassword = $ENV:HttpPassword $securePassword = ConvertTo-SecureString $httpUserPassword -AsPlainText -Force $creds = New-Object -...
0
2146.ps1
Describe "Type accelerators" -Tags "CI" { BeforeAll { $TypeAcceleratorsType = [psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators") $TypeAccelerators = $TypeAcceleratorsType::Get } Context 'BuiltIn Accelerators' { BeforeAll { $TypeAcceleratorTes...
0
2714.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$False,Position=1)] [String]$BasePath="C:\" ) if (Test-Path "$env:SystemRoot\du.exe") { & $env:SystemRoot\du.exe -q -c -l 3 $BasePath 2> $null | ConvertFrom-Csv } else { Write-Error "du.exe not found in $env:SystemRoot." }
0
sample_33_50.ps1
ConvertFrom-StringData @' id_sql_setup_collect_bootstrap_logs=Collecting SQL Setup Bootstrap Logs id_sql_setup_collect_2005_logs=Collecting SQL 2005 Bootstrap Logs id_sql_setup_collect_2008_2008r2_logs=Collecting SQL 2008 and 2008R2 Bootstrap Logs id_sql_setup_collect_2012_logs=Collecting SQL 2012 Bootstrap Logs i...
0
sample_45_20.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\cssesc@3.0.0\node_modules\cssesc\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\cssesc@3.0....
0
sample_50_92.ps1
# # Module manifest for module 'OCI.PSModules.Workrequests' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Workrequests.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditi...
0
3292.ps1
enum DiscordMsgSendType { WebRequest RestMethod } [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '', Scope='Class', Target='*')] class DiscordBackend : Backend { [string]$BaseUrl = 'https://discordapp.com/api' [string]$GuildId hidden [hashtab...
0
sample_30_48.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Переменная среды с этим именем и типом уже существует. EnvironmentErrorDoesNotExists=Переменной среды с этим именем и типом не существует. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGs...
0
Autoload (beta 8).ps1
#Requires -Version 2.0 ## Version History ## beta 8 - 2010.09.20 ## Finally fixed the problem with aliases that point at autoloaded functions! ## beta 7 - 2010.06.03 ## Added some help, and a function to force loading "now" ## Added a function to load AND show the help... ## beta 6 -...
0
3280.ps1
$platform = 'linux' Add-Type -Path "$ModulePath/lib/$platform/Microsoft.Azure.Amqp.dll" Add-Type -Path "$ModulePath/lib/$platform/Microsoft.Azure.ServiceBus.dll" $receiver = [Microsoft.Azure.ServiceBus.Core.MessageReceiver]::new( $connectionString, $QueueName, [Microsoft.Azure.ServiceBus.ReceiveMode]::Pe...
0
ConvertFrom-CliXml.ps1
function ConvertFrom-CliXml { param( [parameter(position=0,mandatory=$true,valuefrompipeline=$true)] [validatenotnull()] [string]$string ) begin { $inputstring = "" } process { $inputstring += $string } end { $type =...
0
sample_7_33.ps1
ConvertFrom-StringData @' id_dcdiag=Directory Server Diagnosis (DCDiag) id_dcdiagobtaining=Running DCDIAG.EXE tool to gather domain controller status information. id_dcdiagdnsobtaining=Running DCDIAG.EXE tool to gather domain controller DNS health information. id_dcdiagtopologyobtaining=Running DCDIAG.EXE tool to g...
0
b8e330a7-320a-4ae1-8797-9fb1195bfce3.ps1
param($sqlserver, $filepath) #Note: Uses Changeset 59378 or higher of SQLPSX SQLServer module http://sqlpsx.codeplex.com/SourceControl/changeset/view/58378#564810 #Added FileListOnly option to Invoke-SqlRestore. The option will be included in releases after 2.3.1 import-module sqlserver -force $server = get...
0
Change-ServicePassword_1.ps1
Param([string]$server,[string]$service,[string]$user,[string]$password) Begin{ function ChangeServicePassword{ Param([string]$srv,[string]$ms,[string]$usr,[string]$pwd) # Setup for WMI $class = "Win32_Service" $method = "change" $computer = $srv $fil...
0
3541.ps1
function Test-AzureSqlPolicy { $vault = Get-AzRecoveryServicesVault -ResourceGroupName "sqlpaasrg" -Name "sqlpaasrn"; $retPolicy = Get-AzRecoveryServicesBackupRetentionPolicyObject -WorkloadType "AzureSQL" Assert-NotNull $retPolicy $policy = New-AzRecoveryServicesBackupProtectionPolicy ` -Vau...
0
3702.ps1
function Get-AzVMGuestPolicyStatusHistory-VmNameScope { $rgName = "aashishGoodPolicy" $vmName = "aashishvm1" $historicalStatuses = Get-AzVMGuestPolicyStatusHistory -ResourceGroupName $rgName -VMName $vmName Assert-NotNull $historicalStatuses Assert-True { $historicalStatuses.Count -gt 0 } } fu...
0
2800.ps1
if (Get-Command logparser.exe) { $lpquery = @" SELECT COUNT(CommandLine) as ct, CommandLine FROM *ProcsWMI.tsv GROUP BY CommandLine ORDER BY ct ASC "@ & logparser -stats:off -i:csv -dtlines:0 -fixedsep:on -rtp:-1 "$lpquery" } else { $ScriptName = [...
0
1216.ps1
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'CarbonDscTest' -Resolve) -Force Describe 'Carbon_IniFile' { $testConfigName = 'CarbonIniFileOption' $tempDir = $null $iniPath = $null $sectionName = $null $defaultValue = $null $defaultValue2 = $null function Assert...
0
sample_30_16.ps1
# Copyright (C) Microsoft Corporation. All rights reserved. # # File: LAPS.psm1 # Author: jsimmons@microsoft.com # Date: April 13, 2023 # # This file implements the Get-LapsDiagnostics and Get-LapsAADPasswordPowerShell cmdlets. function RunProcess() { Param ( [Parameter(Mandatory=$true)] ...
0
Get-ExchangeDBSizes.ps1
<# .SYNOPSIS Get-ExchangeDBSizes - Gather data on Exchange 2007 / 2010 Mailbox Databases. .DESCRIPTION Gathers data from Exchange mailbox servers. These data include: Server\\StorageGroup\\Database (2007) or Database (2010), Total Size (in GB) of the disk, Size of the .edb file (in GB), ...
0
sample_42_3.ps1
# # Module manifest for module 'OCI.PSModules.Waa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waa.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_34_99.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# .Synopsis Registers or unregisters the PowerShell ETW manifest .Parameter Path The fully qualified path to the PowerShell.Core.Instrumentation.man manifest file. The default value is the location of this script. .Paramet...
0
sample_46_21.ps1
# # Module manifest for module 'OCI.PSModules.Loggingsearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingsearch.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEdi...
0