filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
3065.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "Should -HaveCount" { It "passes if collection has the expected amount of items" { @(1, 'a', 3) | Should -HaveCount 3 } It "passes given scalar value and expecting collection of count 1" { 'a' | Should -...
0
sample_38_15.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_26_2.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Fejlfinding Troubleshoot_DetectDVDDevice=Kontrollerer dvd-enhed... Troubleshoot_DetectDVDvideoDecoder=Kontrollerer videodekoder til afspilning af dvd... Troubleshoot_DetectDVDAudioDe...
0
sample_67_46.ps1
# diag_ads.psm1 # Created by tdimli # March 2020 # # Diagnostic functions for ADS area # version $ADS_version = "1.0.240717.0" # Area and Area/Component arrays $ADS = @("xray_ADS_Auth", "xray_ADS_gpo") #Component/Diagnostic Function arrays $xray_ADS_Auth = @("net_rpc_KB2506972") $xray_ADS_gpo = @("ads_...
0
sample_64_74.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 = '89.0.0' # Supported PSE...
0
sample_27_42.ps1
# Localized ArchiveResources.psd1 ConvertFrom-StringData @' ###PSLOC PathNotFoundError=The path '{0}' either does not exist or is not a valid file system path. ExpandArchiveInValidDestinationPath=The path '{0}' is not a valid file system directory path. InvalidZipFileExtensionError={0} is not a supported archive...
0
sample_52_74.ps1
# # Module manifest for module 'OCI.PSModules.Emaildataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Emaildataplane.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSE...
0
sample_67_68.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_49_78.ps1
# # Module manifest for module 'CloudCommon' # # Generated by: Microsoft Corporation # # Generated on: 2/2/2017 # @{ # Script module or binary module file associated with this manifest. #RootModule = '' # Version number of this module. ModuleVersion = '1.2100.2531.331' # ID used to uniquely iden...
0
2199.ps1
[CmdletBinding()] param( [parameter(Mandatory=$true)] [string]$SiteServer, [parameter(Mandatory=$true)] [string]$SiteCode ) function Load-Form { $Form.Controls.AddRange(@($SBStatus, $CBAuto, $CBManual, $DGVAuto, $DGVManual, $ButtonStart, $ButtonClear, $ButtonAuto, $ButtonManual, $RTBInput, $OutputBox, $GBOutputBox...
0
522.ps1
function Connect-SPOContext{ param( [string]$Url ) [Reflection.Assembly]::LoadFile((Get-ChildItem -Path $PSlib.Path -Filter "ClaimsAuth.dll" -Recurse).Fullname) $Global:SPOContext = New-Object SPOContext((Get-SPUrl $Url).Url) $Global:SPOContext } function Get-SPOWeb{ $SPOWe...
0
sample_11_57.ps1
# 2023-02-24 WalterE mod Trap #we# $startTime_AutoAdd = Get-Date trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" } Write-Host -Background...
0
3073.ps1
function Get-Planet ([string]$Name = '*') { $planets = @( @{ Name = 'Mercury' } @{ Name = 'Venus' } @{ Name = 'Earth' } @{ Name = 'Mars' } @{ Name = 'Jupiter' } @{ Name = 'Saturn' } @{ Name = 'Uranus' } @{ Name = 'Neptune' } ) | foreac...
0
1666.ps1
$TargetApplication = "C:\Program Files\Pulseway\pcmontask.exe" $TargetArguments = " support" $ShortcutFile = "$env:Public\Desktop\Get Support.lnk" $WScriptShell = New-Object -ComObject WScript.Shell $Shortcut = $WScriptShell.CreateShortcut($ShortcutFile) $Shortcut.TargetPath = $TargetApplication $Shortcut.Arguments = ...
0
1437.ps1
filter Add-IisServerManagerMember { [CmdletBinding()] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] $InputObject, [Parameter(Mandatory=$true)] [Microsoft.Web.Administration.ServerManager] $ServerManager, [Switch] ...
0
sample_1_12.ps1
[dynamic, provider("dcismprovider"), Association, Description ( "DCIM_BMElementCapabilities is a derivation of CIM_ElementCapabilities " "and represents an association between ManagedElements and their " "Capabilites." ) ] class DCIM_BMElementCapabilities : CIM_ElementCapabilities { ...
0
sample_24_16.ps1
# # This script just calls the Add-AppDevPackage.ps1 script that lives next to it. # param( [switch]$Force = $false, [switch]$SkipLoggingTelemetry = $false ) $scriptArgs = "" if ($Force) { $scriptArgs = '-Force' } if ($SkipLoggingTelemetry) { if ($Force) { $scriptArgs +...
0
sample_46_33.ps1
param( [Parameter(Mandatory=$true)][int] $BuildId, [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, [Parameter(Mandatory=$true)][string] $AzdoToken, [Parameter(Mandatory=$true)][string] $MaestroToken, [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro.dot.net', [Parameter...
0
sample_9_83.ps1
#************************************************ # TS_DetectMTU1514.ps1 # Version 1.0 # Date: 02/06/2014 # Author: BBenson # Description: Detect if LinkMTU is set to 1514. # Rule number: 262751 # Rule ID: 7a316c95-272b-4207-983d-57acb91d0eea # Rule URL: https://kse.microsoft.com/Contribute/Idea/1456f71b-f3...
0
sample_17_9.ps1
ConvertFrom-StringData @' id_netframeworkngenfiles_title=.Net Framework nGen files id_netframeworkngenfiles_status=Collecting .Net Framework nGen files '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE...
0
sample_9_81.ps1
#************************************************ # TS_SBSL_DHCPRelayKB2459530.ps1 # Version 1.0.1 # Date: 5/14/2012 # Author: v-maam # Description: [Idea ID 2749] [Windows] SBSL Windows firewall delays acquisition of DHCP address from DHCP relay on domain-joined W7 client # Rule number: 2749 # Rule URL: //sh...
0
sample_58_48.ps1
# # Module manifest for Dell Command | PowerShell Provider 'DellBIOSProvider' # # Generated by: Dell BizClient Team # # Generated on: 4/30/2014 # @{ # Script module or binary module file associated with this manifest RootModule = 'DellBIOSProvider.dll' # Version number of this module. ModuleVersion = '...
0
New-SQLComputerLogin_1.ps1
# Depends on Invoke-SQLCmd2 http://poshcode.org/2950 # Depends on Get-ADComputer http://poshcode.org/3009 function New-SqlComputerLogin { #.Synopsis # Creates a Login on the specified SQL server for a computer account #.Example # New-SqlComputerLogin -SQL DevDB2 -Computer BuildBox2 -Force # # Specifying the F...
0
1648.ps1
function diskfree { Param ( [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [string[]]$ComputerName = $env:computername ) foreach ($Computer in $ComputerName) { Write-Host "Working on $Computer" if (Test-Connection -ComputerName $Computer -Coun...
0
4297.ps1
. "$PSScriptRoot\PSGetTests.Manifests.ps1" . "$PSScriptRoot\PSGetTests.Generators.ps1" function SuiteSetup { Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue $script:ProgramFilesModulesPath = Ge...
0
1670.ps1
function ConvertTo-Bytes { param ( [string]$file ) if (!$file -or !(Test-Path $file)) { throw "file not found: '$file'" } [convert]::ToBase64String((Get-Content $file -Encoding Byte)) } function ConvertFrom-Bytes { param ( [string]$bytes, [string]$savepath ...
0
1516.ps1
function Assert-FileContains { [CmdletBinding()] param( [Parameter(Position=0)] [string] $Path, [Parameter(Position=1)] [string] $Needle, [Parameter(Position=2)] $Message ) Set-StrictMode -Ve...
0
sample_17_13.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
sample_44_21.ps1
########################################################### # # 'GCArcService' module # ########################################################### $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest Import-Module "$PSScriptRoot\ServiceHelper.psm1" $script:GCInstallPath = "$PSScriptRoot\..\..\...
0
GPPreferencesPrinters.ps1
###########################################################################" # # NAME: GPPreferencesPrinters.psm1 # # AUTHOR: Jan Egil Ring # BLOG: http://blog.crayon.no/blogs/janegil # # COMMENT: Script module for working with shared printer connections in Group Policy Preferences. # Contains a functi...
0
sample_31_21.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\he@1.2.0\node_modules\he\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\he@1.2.0\node_modul...
0
sample_35_81.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 = '83.1.0' # Supported PSEditions CompatiblePSEd...
0
3954.ps1
function Test-ExpressRoutePortsLocationRead { $vExpressRoutePortsLocationList = Get-AzExpressRoutePortsLocation Assert-NotNull $vExpressRoutePortsLocationList Assert-True { $vExpressRoutePortsLocationList.Count -gt 0 } Assert-NotNull $vExpressRoutePortsLocationList[0].Address Assert-NotNull $v...
0
sample_14_62.ps1
# # Module manifest for module 'OCI.PSModules.Queue' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Queue.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported PSEditions Compatible...
0
sample_44_69.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
0
sample_53_59.ps1
'************************************************************* ' ' ADOBE SYSTEMS INCORPORATED ' Copyright 2005-2010 Adobe Systems Incorporated ' All Rights Reserved ' NOTICE: Adobe permits you to use, modify, and ' distribute this file in accordance with the terms ' of the Adobe license agreement accompa...
0
Get-RemoteRegistryChildI.ps1
##############################################################################\n##\n## Get-RemoteRegistryChildItem\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS...
0
Get-Parameter_1.ps1
function Get-Parameter ($Cmdlet) { foreach ($paramset in (Get-Command $Cmdlet).ParameterSets){ $Output = @() foreach ($param in $paramset.Parameters) { $process = "" | Select-Object Name, ParameterSet, Aliases, IsMandatory, CommonParameter $process.Name = $param.Name if ( $paramset.name -eq "__AllPa...
0
sample_53_16.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
1177.ps1
$chocolateyInstall = Join-Path -Path $PSScriptRoot -ChildPath '..\tools\chocolateyInstall.ps1' -Resolve & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $destinationDir = Join-Path -Path (Get-PowerShellModuleInstallPath) -ChildPath 'Carbon' $installCarbonJunction = $false $i...
0
sample_21_86.ps1
Get-Module | ForEach-Object { Remove-Module -Name $_.Name -Force } $PSModuleAutoloadingPreference = 'none' Import-Module Microsoft.PowerShell.Utility #Enforcing default PSModulePath to avoid getting unexpected modules to run instead of built-in modules $env:PSModulePath = "C:\Program Files\WindowsPowerShell\Modules...
0
Convert-MacAddress.ps1
function Convert-MacAddress { <# .SYNOPSIS Converts a MAC address from one valid format to another. .DESCRIPTION The Convert-MacAddress function takes a valid hex MAC address and converts it to another valid hex format. Valid formats include the colon, dash, and dot delimiters as well as a raw address w...
0
3376.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$False, Position=0)] [String]$Folder ) function SyncVersion([string]$FilePath) { $FolderPath = [System.IO.Path]::GetDirectoryName($FilePath) Write-Output "Folder Path: $FolderPath" $matches = ([regex]::matches((Get-Content $FilePath), "ModuleVersion = '([\d\....
0
2528.ps1
gwmi -query "SELECT SystemName ` ,Caption ` ,VolumeName ` ,Size ` ,Freespace ` FROM win32_logicaldisk ` WHERE DriveType=3" -computer (gc E:\Dexma\Servers.txt) ` | Select-Object SystemName ` ,Caption ` ,VolumeName ` ,@{Name="Size(GB)"; Expression={"{0:N2}" -f ($_...
0
2077.ps1
Describe 'Positive Parse Properties Tests' -Tags "CI" { It 'PositiveParsePropertiesTest' { class C1 {} class C2 { $x; } class C3 { [int] $x; } class C4 { $x; $y } class C5 { ...
0
List DHCP Clients .ps1
$DHCP_EnumSubnetClients = @' [DllImport("dhcpsapi.dll", SetLastError = true, CharSet = CharSet.Auto)] public static extern uint DhcpEnumSubnetClients( string ServerIpAddress, uint SubnetAddress, ref uint ResumeHandle, uint PreferredMaximum, out IntPtr ClientInfo, ref uint E...
0
Combine-CSV Function.ps1
function Combine-CSV{ <# .Synopsis Combines similar CSV files into a single CSV File .Description Function will combine common .CSV files into one large file. CSV files should have same header. This script is intended to aid when doing large reports across a large environment. .Parameter S...
0
3167.ps1
param( [switch]$Finalize, [switch]$Test, [string]$ProjectRoot = $ENV:APPVEYOR_BUILD_FOLDER ) $Timestamp = Get-date -uformat "%Y%m%d-%H%M%S" $PSVersion = $PSVersionTable.PSVersion.Major $TestFile = "TestResults_PS$PSVersion`_$TimeStamp.xml" $Address = "https://ci.appveyor.com/api/test...
0
sample_42_4.ps1
$ErrorActionPreference = 'Stop' <# .Synopsis Returns payload information from glcm. This info is required to send a heart beat request to AA #> function Get-HeartbeatInfo { [CmdletBinding()] param() $glcm = Get-DscLocalConfigurationManager $configurationName = "" $aaServerU...
0
sample_16_83.ps1
ConvertFrom-StringData @' id_filever=Collecting critical file versions '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC5Phm1j+58Cc4T # lUIb...
0
sample_67_39.ps1
########################################################################## # DELL PROPRIETARY INFORMATION # # This software is confidential. Dell Inc., or one of its subsidiaries, has supplied this # software to you under the terms of a license agreement,nondisclosure agreement or both. # You may not copy, disclose, o...
0
sample_38_28.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 = '79.0.0' # Supported PSEdition...
0
sample_5_67.ps1
# # Module manifest for module 'OCI.PSModules.Secrets' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Secrets.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported PSEditions Compat...
0
287.ps1
function Test-PSFTaskEngineCache { [OutputType([System.Boolean])] [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Test-PSFTaskEngineCache')] Param ( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string] $Module, [Parameter(Mandatory = $true)] [Valida...
0
sample_32_37.ps1
# # Module manifest for module 'OCI.PSModules.Devops' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Devops.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compatib...
0
2401.ps1
function ShowMenu { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Title, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$ChoiceMessage, [Parameter()] [ValidateNotNullOrEmpty()] [string]$NoMessage = 'No thanks' ) $yes = New-Object System.Manag...
0
969.ps1
$SubscriptionId = '' $resourceGroupName = "myResourceGroup-$(Get-Random)" $location = "westus2" $poolName = "MySamplePool" $adminSqlLogin = "SqlAdmin" $password = "ChangeYourAdminPassword1" $serverName = "server-$(Get-Random)" $firstDatabaseName = "myFirstSampleDatabase" $secondDatabaseName = "mySecondSampleDatab...
0
Read-HostMasked_1.ps1
function Read-HostMasked([string]$prompt="Password") { $password = Read-Host -AsSecureString $prompt; $BSTR = [System.Runtime.InteropServices.marshal]::SecureStringToBSTR($password); $password = [System.Runtime.InteropServices.marshal]::PtrToStringAuto($BSTR); [System.Runtime.InteropServices.Marshal]::Zero...
0
sample_32_32.ps1
# # Module manifest for module 'OCI.PSModules.Queue' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Queue.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Compatible...
0
Get-OnlineHelp_2.ps1
## An update using New-WebServiceProxy to the MSDN ContentService instead of HttpRest ## See: http: //services.msdn.microsoft.com/ContentServices/ContentService.asmx ## This is a VERY EARLY prototype of a function that could retrieve cmdlet help from TechNet ... ## and hypothetically, other online help sites which...
0
Home Directory Perms.ps1
$FolderPath = "\\\\site filer\\userdata$\\" $rootfolder = Get-ChildItem -Path $FolderPath -recurse foreach ($file in $rootfolder) { $file.FullName Get-Acl $file.FullName | Format-List $acl = Get-Acl $file.FullName $acl.Access | %{$acl.RemoveAccessRule($_)} #...
0
sample_16_20.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
3183.ps1
if( $env:BHPSModulePath -and $env:BHBuildSystem -ne 'Unknown' -and $env:BHBranchName -eq "master" -and $env:BHCommitMessage -match '!deploy' ) { Deploy Module { By PSGalleryModule { FromSource $ENV:BHPSModulePath To PSGallery WithOption...
0
Start-IRCJabberBridge.ps1
########################################################################################## ## Depends on the PsXmppHelper.dll from http://CodePlex.com/PowerXmpp ## CONTAINS Read-HostMasked http://powershellcentral.com/scripts/104 ## CONTAINS Out-Working http://powershellcentral.com/scripts/105 #####################...
0
4082.ps1
[CmdletBinding()] param () function Get-Architecture { [CmdletBinding()][OutputType([string])] param () $OSArchitecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture $OSArchitecture = $OSArchitecture.OSArchitecture Return $OSArchitecture } function Get-MSIInformation { [...
0
ESXiMgmt module sample _1.ps1
####################################################################################################################### # File: ESXiMgmt_machines_poweroff_sample.ps1 # # Author: Alexander Petrovskiy ...
0
sample_4_73.ps1
ConvertFrom-StringData @' id_ctskerberos=Kerberos id_ctskerberosdescription=Collects information about Kerberos using the KList utility. '@ # SIG # Begin signature block # MIIoQgYJKoZIhvcNAQcCoIIoMzCCKC8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zU...
0
sample_22_40.ps1
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'https://aka...
0
sample_38_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
Amazon AWS user data.ps1
<powershell> $ComputerName = $env:COMPUTERNAME $user = [adsi]"WinNT://$ComputerName/Administrator,user" $user.setpassword("Password") </powershell>
0
Find old snapshots.ps1
param ( $Age = 30 ) Connect-VIServer vcenter.domain.com $vm = Get-VM $snapshots = Get-Snapshot -VM $vm Write-Host -ForegroundColor Red "Old snapshots found:" foreach ( $snap in $snapshots ) { if ( $snap.Created -lt (Get-Date).AddDays( -$Age ) ) { Write-Host "Name: " $snap.Name " Size: " $snap.SizeMB " Cre...
0
3695.ps1
function Test-PolicyCrud { $Name = getAssetName $resourceGroup = TestSetup-CreateResourceGroup $resourceGroupName = $resourceGroup.ResourceGroupName $tags = @{"tag1" = "value1"; "tag2" = "value2"} $matchCondition1 = New-AzFrontDoorWafMatchConditionObject -MatchVariable RequestHeader -...
0
sample_62_3.ps1
# # Module manifest for module 'OCI.PSModules.Devops' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Devops.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions Compatib...
0
sample_0_57.ps1
ConvertFrom-StringData @' id_lockingkb296264check=Checking Opportunistic Locking id_lockingkb296264checkdesc=Checking if Opportunistic Locking is disabled '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFl...
0
Product key_5.ps1
from System import Array, Char, Console from System.Collections import ArrayList from Microsoft.Win32 import Registry def DecodeProductKey(digitalProductID): map = ("BCDFGHJKMPQRTVWXY2346789").ToCharArray() key = Array.CreateInstance(Char, 29) raw = ArrayList() i = 52 while i < 67: raw...
0
sample_33_48.ps1
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'ht...
0
sample_60_21.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_19_15.ps1
@{ RootModule = 'PSReadLine.psm1' NestedModules = @("Microsoft.PowerShell.PSReadLine2.dll") ModuleVersion = '2.4.0' GUID = '5714753b-2afd-4492-a5fd-01d9e2cff8b5' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' Description = 'Gr...
0
Shift Operators.ps1
#requires -version 2.0 ## for v1 you need to change Add-Type to "New-Type":http://poshcode.org/720 Add-Type @" public class Shift { public static int Left(int x, int count) { return x >> count; } public static uint Left(uint x, int count) { return x >> count; } public static long Left(long x, ...
0
1409.ps1
filter Unprotect-CString { [CmdletBinding(DefaultParameterSetName='DPAPI')] param( [Parameter(Mandatory = $true, Position=0, ValueFromPipeline = $true)] [string] $ProtectedString, [Parameter(Mandatory=$true,ParameterSetName='RSAByCertificate')] [Security.C...
0
sample_59_37.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
exclude properties_1.ps1
$server = "dcserver1.mafoberg.net" $session = new-pssession -computer $server -cred $creds icm -Session $session -ScriptBlock { import-module activedirectory (get-ADUser -filter "*" -properties GivenName, SurName, EmailAddress | select -ExcludeProperty PSComputerName, RunspaceId, PSShowComputerName ) ...
0
ESXiMgmt module sample 1.ps1
####################################################################################################################### # File: ESXiMgmt_machines_generation_sample.ps1 # # Author: Alexander Petrovskiy ...
0
Get-SqlWmi_1.ps1
try {add-type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" -EA Stop} catch {add-type -AssemblyName "Microsoft.SqlServer.SqlWmiManagement"} ####################### <# .SYNOPSIS Gets SQL Server WMI information. .DESCRIPTION The Get-SqlWm...
0
sample_46_77.ps1
None
0
682.ps1
function Initialize-Rs { [cmdletbinding()] param ( [Alias('SqlServerInstance')] [string] $ReportServerInstance, [Alias('SqlServerVersion')] [Microsoft.ReportingServicesTools.SqlServerVersion] $ReportServerVersion, ...
0
sample_9_7.ps1
#************************************************ # RC_HTTPRedirectionTSGateway.ps1 # Version 1.0 # Date: 5-1-2012 # Author: davidcop # Description: Checks for HTTP redirection on either the /rpc virtual directory or the web site that host the /rpc virtual directory #**********************************************...
0
sample_23_85.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
3272.ps1
class BotConfiguration { [string]$Name = 'PoshBot' [string]$ConfigurationDirectory = $script:defaultPoshBotDir [string]$LogDirectory = $script:defaultPoshBotDir [string]$PluginDirectory = $script:defaultPoshBotDir [string[]]$PluginRepository = @('PSGallery') [string[]]$ModuleManifestsToLo...
0
885.ps1
$resourceGroupName = "<Enter a name for the resource group>" $nhubnamespace = "<Enter a name for the notification hub namespace>" $location = "East US" New-AzResourceGroup -Name $resourceGroupName -Location $location New-AzNotificationHubsNamespace -ResourceGroup $resourceGroupName -Namespace $nhubnamespace -Locat...
0
1975.ps1
$Day = DATA { ConvertFrom-StringData @' messageDate = Today is d0 = Sunday d1 = Monday d2 = Tuesday d3 = Wednesday d4 = Thursday d5 = Friday d6 = Saturday '@ } Import-LocalizedData -BindingVariable Day $a = $Day.d0, $Day.d1, $Day.d2, $Day.d3, $Day.d4, $Day.d5, $Day.d6 ...
0
sample_4_64.ps1
# Collect-Commons 20230623 Function Write-Log { param( [string] $msg ) $msg = (get-date).ToString("yyyyMMdd HH:mm:ss.fff") + " " + $msg Write-Host $msg $msg | Out-File -FilePath $global:outfile -Append } Function ExecQuery { param( [string] $NameSpace, [string] $Query ) Write-Log...
0
PowerShell_ISE Profile.ps1
#-------------------------------------------------------------------------------------------------------------- #Convert Untitled1.ps1 to ASCII encoding $psise.CurrentPowerShellTab.Files | % { # set private field which holds default encoding to ASCII $_.gettype().getfield("encoding","nonpublic,instance")....
0
sample_48_37.ps1
# Localized 05/11/2024 04:06 AM (GMT) 303:7.2.30118 CL_LocalizationData.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Troubleshooting Troubleshoot_DetectDVDDevice=Checking DVD device ... Troubleshoot_DetectDVDvideoDecoder=Checking video decoder for DVD playback ... Troubleshoot_DetectDVDAudioDecoder...
0
4362.ps1
function Test-WildcardPattern { [CmdletBinding()] [OutputType([bool])] param( [Parameter(Mandatory=$true)] [ValidateNotNull()] $Name ) return [System.Management.Automation.WildcardPattern]::ContainsWildcardCharacters($Name) }
0
Get-MountPointData.ps1
# Convert from one device ID format to another. function Get-DeviceIDFromMP { param([Parameter(Mandatory=$true)][string] $VolumeString, [Parameter(Mandatory=$true)][string] $Directory) if ($VolumeString -imatch '^\\s*Win32_Volume\\.DeviceID="([^"]+)"\\s*$') { # Return it in th...
0
sample_4_81.ps1
#************************************************ # TS_UploadSingleFile # Version 1.2.1 # Date: 02-19-2012 # Author: Andre Teixeira - andret@microsoft.com # Description: This script ask customer a file name giving the option for them to upload the selected file #************************************************ ...
0
3742.ps1
param( [Parameter(Mandatory=$true, Position=0)] [string] $TestRunNameSpace, [Parameter(Mandatory=$false, Position=1)] [ValidateSet('ControlPlane','DataPlane', 'All')] [string] $TestMode = 'All', [Parameter(Mandatory=$false, Position=2)] [string] $Location = 'eastus2', [Parameter(Mandato...
0
sample_13_41.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
0
sample_21_82.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 = '75.1.0' # Supported PSEditions ...
0