filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
Get-RemoteRegistry_3.ps1
#.SYNOPSIS # Query the registry on a remote machine #.NOTE # You have to have access, and the remote registry service has to be running # # Version History: # 3.0 # + updated to PowerShell 2 # + support pipeline parameter for path # 2.1 # + Fixed a pasting bug # + I added the ...
0
3975.ps1
function DeleteIfExistsNetworkWatcher($location) { $nwlist = Get-AzNetworkWatcher foreach ($i in $nwlist) { if($i.Location -eq "$location") { $nw=$i } } if ($nw) { $job = Remove-AzNetworkWatcher -NetworkWatcher $nw -AsJob $job | Wait-Job } } function Test-NetworkWatcherCRUD {...
0
sample_4_43.ps1
<# .SYNOPSIS Simplify data collection and diagnostics for troubleshooting Microsoft Remote Desktop (RDP/RDS/AVD/W365) related issues and a convenient method for submitting and following quick & easy action plans. .DESCRIPTION This script is designed to gather information to assist Microsoft Customer Suppo...
0
sample_4_60.ps1
ZНевозможно выполнить метод, если хранилище с несколькими моментальными снимками отключено.’Запрос был ограничен из-за слишком большого числа инициированных пользователем запросов на обновление источника данных за короткий период времени.gНедостаточно разрешений для обновления таблицы Direct Lake. Обратитесь к создател...
0
sample_5_5.ps1
ConvertFrom-StringData @' id_sccm_activity_wuainfo=Gathering Windows Update Agent Information id_sccm_wuainfo_wua=Obtaining Windows Update Agent Configuration id_sccm_wuainfo_softdist=Obtaining Directory Listing of SoftwareDistribution Directory id_sccm_wuainfo_filever=Obtaining Versions of WUA Related DLLs id_scc...
0
sample_27_92.ps1
# # Module manifest for module 'OCI.PSModules.Vbsinst' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Compat...
0
3903.ps1
function Start-TestSleep($milliseconds) { if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) { Start-Sleep -Milliseconds $milliseconds } } function Compute-TestTimeout($seconds) { if ([Microsoft.Azure.T...
0
sample_13_85.ps1
#************************************************ # TS_HyperVSCSIDiskEnum.ps1 # Version 1.0.1 # Date: 03-08-2011 # Author: Andre Teixeira - andret # Description: This checks the number of subkeys under HKLM\System\CurrentControlSet\Enum\SCSI\Disk&Ven_Msft&Prod_Virtual_Disk # If it is large (more th...
0
sample_24_86.ps1
# # Module manifest for module 'OCI.PSModules.Apmconfig' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmconfig.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Co...
0
309.ps1
function Set-PSFTeppResult { [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low', HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Set-PSFTeppResult')] param ( [Parameter(Mandatory = $true)] [PSFramework.Validation.PsfValidateSetAttribute(ScriptBlock = { [PSFramework.TabExpan...
0
sample_61_76.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> <# .Synopsis Gets a free drive letter fo...
0
sample_2_44.ps1
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object...
0
Enable_Configure SNMP_1.ps1
#Powershell Script To Install SNMP Services (SNMP Service, SNMP WMI Provider) #Variables :) $pmanagers = "ADD YOUR MANAGER(s)" $commstring = "ADD YOUR COMM STRING" #Import ServerManger Module Import-Module ServerManager #Check If SNMP Services Are Already Installed $check = Get-WindowsFeature | Where-Objec...
0
sample_64_62.ps1
# # Module manifest for module 'OCI.PSModules.Functions' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Functions.dll' # Version number of this module. ModuleVersion = '89.0.0' # Supported PSEditions Co...
0
2484.ps1
function Get-MyCimInstance { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline)] [string[]]$Computername, [Parameter(Mandatory)] [Alias('ClassName')] [string]$Class, [Parameter()] [string]$Namespace, [Parameter()] [string]$Filter, [Parameter()] [string]$Property ) process { ...
0
3641.ps1
function Test-GetVirtualCluster { $location = Get-ProviderLocation "Microsoft.Sql/virtualclusters" $rg = Create-ResourceGroupForTest $location $rgName = $rg.ResourceGroupName $vnetName = "cl_initial" $subnetName = "Cool" $virtualNetwork = CreateAndGetVirtualNetworkForManagedInstance $vnetName...
0
2064.ps1
Describe "Language Primitive Tests" -Tags "CI" { It "Equality comparison with string and non-numeric type should not be culture sensitive" { $date = [datetime]'2005,3,10' $val = [System.Management.Automation.LanguagePrimitives]::Equals($date, "3/10/2005") $val | Should -BeTrue } I...
0
LibrarySqlBackup.ps1
# --------------------------------------------------------------------------- ### <Script> ### <Author> ### Chad Miller ### </Author> ### <Description> ### Excerpt from SQL Server Powershell Extensions (sqlpsx) ### http://sqlpsx.codeplex.com ### Defines backup and restore functions ### </Description> ### <Us...
0
Save-Credentials_3.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
3131.ps1
function Split-IPv4Subnet { [CmdletBinding(DefaultParameterSetName='CIDR')] param( [Parameter( Position=0, Mandatory=$true, HelpMessage='IPv4-Address which is in the subnet')] [IPAddress]$IPv4Address, [Parameter( ParameterSetName...
0
1068.ps1
function Start-TestFixture { & (Join-Path -Path $PSScriptRoot -ChildPath '..\Initialize-CarbonTest.ps1' -Resolve) } function Test-GetFullPath { $fullpath = Resolve-FullPath (Join-Path $TestDir '..\Tests' ) $expectedFullPath = [System.IO.Path]::GetFullPath( (Join-Path $TestDir '..\Tests') ) ...
0
ExceptionHandling.ps1
## ExceptionHandling.ps1 ############################################################################################################## ## .Net style exception handling ############################################################################################################## ## Usage: ## . .\\ExceptionHandl...
0
457.ps1
Set-PSFConfig -Module PSFramework -Name 'message.info.minimum' -Value 1 -Initialize -Validation "integer0to9" -Handler { [PSFramework.Message.MessageHost]::MinimumInformation = $args[0] } -Description "The minimum required message level for messages that will be shown to the user." Set-PSFConfig -Module PSFramework -N...
0
POC csharp expressions_2.ps1
function run-csharpexpression([string] $expression ) { $global:ccounter = [int]$ccounter + 1 $local:name = [system.guid]::NewGuid().tostring().replace('-','_').insert(0,"csharpexpr") $local:ns = "ShellTools.DynamicCSharpExpression.N${ccounter}" $local:template = @" using System; using System.IO; using Syste...
0
sample_18_36.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Register-EditorCommand ` -Name 'PowerShellEditorServices.OpenEditorProfile' ` -DisplayName 'Open Editor Profile' ` -SuppressOutput ` -ScriptBlock { param([Microsoft.PowerShell.EditorServices.Extensions.EditorContex...
0
sample_16_37.ps1
# # Module manifest for module 'OCI.PSModules.Budget' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Budget.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Compatib...
0
1524.ps1
function Assert-False { [CmdletBinding()] param( [Parameter(Position=0)] [object] $InputObject, [Parameter(Position=1)] [string] $Message ) Set-StrictMode -Version 'Latest' if( $InputObject ) { ...
0
sample_65_2.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # RemoveMDS.ps1 # Kill all Monitoring processes and clean up tra...
0
3581.ps1
function Get-ResourceGroupName { return getAssetName } function Get-ApiManagementServiceName { return getAssetName } function Get-ResourceName { return getAssetName } function Get-ProviderLocation($provider) { $locations = Get-ProviderLocations $provider if ($locations -eq $null...
0
3006.ps1
Set-StrictMode -Version Latest Describe 'Testing Gherkin Step' -Tag Gherkin { It 'Generates a function named "GherkinStep" with mandatory name and test parameters' { $command = &(Get-Module Pester) { Get-Command GherkinStep -Module Pester } $command | Should -Not -Be $null $parameter = $co...
0
Set-PowerGUIWelcomePage.ps1
######################################################## # Modifies the default PowerGUI admin console # welcome screen to the mht file you supply # Details available at: # http://dmitrysotnikov.wordpress.com/2009/02/11/rebranding-powergui-consolerebranding-powergui-console/ ######################################...
0
sample_35_3.ps1
# # Module manifest for module 'OCI.PSModules.Vulnerabilityscanning' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vulnerabilityscanning.dll' # Version number of this module. ModuleVersion = '79.0.0' #...
0
4f560e57-408c-430b-a2c5-84a1d6d4c928.ps1
<# .SYNOPSIS Gets the bogon list. .DESCRIPTION The Get-BogonList script retrieves the bogon prefix list maintained by Team Cymru. A bogon prefix is a route that should never appear in the Internet routing table. A packet routed over the public Internet (not including over VPNs or other tunnels) s...
0
3865.ps1
function Test-GetLocationKindDirect { try { $asn = 65000 $asnPeerName = makePeerAsn $asn $location = Get-AzPeeringLocation -Kind Direct Assert-NotNull $location Assert-True { $location.Count -gt 30 } } finally { Remove-AzPeerAsn -Name $asnPeerNa...
0
568.ps1
function Add-SPOWebpart { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$pageUrl, [Parameter(Mandatory=$true, Position=2)] [string]$zone, [Parameter(Mandatory=$true, Position=3)] [int]$order, [Parameter(Mandatory=$true, Position=4)] [string]$webPart...
0
sample_2_64.ps1
# # Module manifest for module 'OCI.PSModules.Osubsubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubsubscription.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported...
0
1611.ps1
function Create-LocalUser { param ( [string]$computer = $env:computername, [string]$fullname, [string]$username, [string]$password, [switch]$passworddoesnotexpire, [string]$addtogroup = 'Administrators', [switch]$CheckFirst = $true ) if (!$username...
0
Compile-Help_2.ps1
# Compile-Help.ps1 # by Jeff Hillman # # this script uses the text and XML PowerShell help files to generate HTML help # for all PowerShell Cmdlets, PSProviders, and "about" topics. the help topics # are compiled into a .chm file using HTML Help Workshop. # # Minor tweak by John Robbins to work on x64 when lo...
0
2182.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [ValidateNotNullOrEmpty()] [string]$SiteServer, [parameter(Mandatory=$true, HelpMessag...
0
790.ps1
function ConvertFrom-ScriptExtent { [CmdletBinding()] [OutputType([Microsoft.PowerShell.EditorServices.BufferRange], ParameterSetName='BufferRange')] [OutputType([Microsoft.PowerShell.EditorServices.BufferPosition], ParameterSetName='BufferPosition')] param( [Parameter(Mandatory...
0
Quest Dynamic Group 001.ps1
<# 2012.07.06 Information will be uploaded shortly. #>
0
ConvertFrom-FahrenheitWi_1.ps1
## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n\nparam([double] $Fahrenheit)\n\nSet-StrictMode -Version Latest\n\n## Convert it to Celsius\n$celsius = $fahrenheit - 32\n$celsius = $celsius / 1.8\n\n## Output the answer\n"$fahrenheit degrees Fahrenheit is $celsius degr...
0
sample_28_92.ps1
# # Module manifest for module 'OCI.PSModules.Jms' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jms.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePSEd...
0
sample_62_70.ps1
# # Module manifest for module 'OCI.PSModules.Generativeai' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeai.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditi...
0
sample_22_19.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("manipulationWorldMode", "bool", true); } else { ...
0
Find sharable storage.ps1
# This function returns all datastores that can be shared amongst ESX hosts. function Get-ShareableDatastore { # Get all datastores. $datastores = Get-Datastore # Load the HostStorageSystems of all hosts. $hosts = Get-VMHost | Get-View -property ConfigManager $storageSystems = @() foreach ($h in $hosts) ...
0
sample_59_67.ps1
# # Module manifest for module 'OCI.PSModules.Opsi' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opsi.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions CompatiblePS...
0
sample_13_32.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
796.ps1
function My-Function ($myInput) { My-Function $myInput } $things = 4 $things My-Function $things Write-Output "Hi"; Write-Output "" . .\VariableDefinition.ps1 Write-Output $variableInOtherFile ${variable-with-weird-name} = "this variable has special characters" Write-Output ${variable-with-weird-name}
0
sample_14_86.ps1
ConvertFrom-StringData @' id_systemfiles_title=System Files id_systemfiles_status=Collecting System Files id_systemfilesdirectorylistings_title=System Files Directory Listings id_systemfilesdirectorylistings_status=Collecting System Files Directory Listings id_systemfilesacllistings_title=System Files ACL Listings...
0
4050.ps1
param([hashtable]$Theme) Set-StrictMode -Version Latest $Theme.HostBackgroundColor = if ($Pscx:IsAdmin) { 'DarkRed' } else { 'Black' } $Theme.HostForegroundColor = if ($Pscx:IsAdmin) { 'White' } else { 'Cyan' } $Theme.PromptForegroundColor = if ($Pscx:IsAdmin) { 'Gray' } else { 'White' } ...
0
889.ps1
New-AzResourceGroup -Name applicationGroup -Location westcentralus $appid=(Get-AzManagedApplicationDefinition -ResourceGroupName appDefinitionGroup -Name ManagedStorage).ManagedApplicationDefinitionId New-AzManagedApplication ` -Name storageApp ` -Location westcentralus ` -Kind ServiceCatalog ` -ResourceGr...
0
1045.ps1
Set-StrictMode -Version 'Latest' & (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve) $rootDir = $null $childDir = $null $grandchildFile = $null $childFile = $null function Assert-EverythingCompressed { Assert-Compressed -Path $rootDir Assert-Compressed -Path $childDi...
0
Set Active Sync DeviceID.ps1
# Requires a connection to Exchange Server, or Exchange Management Shell $s = New-PSSession -ConfigurationName Microsoft.Exchange -Name ExchMgmt -ConnectionUri http://ex14.domain.local/PowerShell/ -Authentication Kerberos Import-PSSession $s # Get all Client Access Server properties for all mailboxes with an Act...
0
group-byobject_4.ps1
function Group-ByObject { #.Synopsis # Groups by a set of properties, returning objects #.Description # A wrapper for the built-in Group-Object cmdlet which returns one of the original objects (with separate properties for each property used to group) rather than a simple string representation as the "name" of the ...
0
Test 2.ps1
\nTesting from PowerShell 2
0
sample_7_70.ps1
#************************************************ # TS_SysvolNetLogonShareCheck.ps1 # Version 1.0.1 # Date: 03-29-2011 # Author: Your Name - Your Email Address # Description: SYSVOL and/or NETLOGON shares are missing on domain controller #************************************************ Import-LocalizedData -...
0
2753.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$False,Position=0)] [Int]$ProcId=$pid ) $datestr = (Get-Date -Format "yyyyMMddHHmmss") $outfile = "${pwd}\" + ($env:COMPUTERNAME) + "_PId_" + ($pid) + "_${datestr}.dmp" $obj = "" | Select-Object Path,PId,Base64EncodedGzippedBytes $obj.PId = $ProcId $obj.Proc...
0
1777.ps1
function Wait-ForJobRunning { param ( $job ) $iteration = 10 Do { Start-Sleep -Milliseconds 100 } Until (($job.State -match "Running|Completed|Failed") -or (--$iteration -eq 0)) if ($job.State -notmatch "Running|Completed|Failed") { throw ("Cannot star...
0
sample_49_1.ps1
Import-LocalizedData -BindingVariable lhwTxt -FileName AzStackHci.Hardware.Strings.psd1 function Test-Processor { <# .SYNOPSIS Test CPU .DESCRIPTION Test CPU #> [CmdletBinding()] param ( [System.Management.Automation.Runspaces.PSSession[]] $PsSession...
0
318.ps1
function Get-PSFMessage { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Get-PSFMessage')] param ( [string] $FunctionName = "*", [string] $ModuleName = "*", [AllowNull()] $Target, [string[]] $Tag, [int] $Last, [int] $Skip = 0, [guid] ...
0
sample_40_81.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Clear-AMTSystemDefense { <# .Synopsis Clears all Intel Active Management Technology System Defense policies and filters .Description This CmdLet clears the Intel Active Management Technology (AMT) network access policy fro...
0
ADFS MSOL update.ps1
Add-PSSnapin Microsoft.Adfs.Powershell Import-Module MSOnline $cred = Get-Credential $AdfsServer = Read-Host "Please type the name of the ADFS server" Write-Host "Connecting to MSOnline..." Connect-MsolService -credential:$cred Write-Host "Setting the local ADFS server..." Set-MSOLADFSContext -Computer:$Ad...
0
sample_30_10.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
Tag-Alert (SCOM).ps1
# Tags alert with PrincipalName, Severity and MP name in Custom fields. # Use in OpsMgr Command Shell. # Original script from Marco Shaw. # Changed by Stefan Stranger # Date created 13-09-2008 $alerts = get-alert | where {$_.principalname -ne $null -and $_.resolutionstate -eq "0"} foreach($alert in $alerts) ...
0
sample_63_12.ps1
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},i.getTagRu...
0
sample_67_81.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
ASPX Mailbox (6 of 6).ps1
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Net.Mail; public partial class MailboxTaskResults : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e)...
0
Get-Entropy_2.ps1
function Get-Entropy { <# .SYNOPSIS Calculate the entropy of a byte array. Author: Matthew Graeber (@mattifestation) .PARAMETER ByteArray Specifies the byte array containing the data from which entropy will be calculated. .EXAMPLE C:\\PS> $RandArray = New-Object Byte[](10000) C...
0
sample_39_69.ps1
Import-LocalizedData -BindingVariable lanTxt -FileName AzStackHci.ArcIntegration.Strings.psd1 function Test-ExistingArcResources { [CmdletBinding()] param ( [string] $SubscriptionId, [string] $ArcResourceGroupName, [string[]] $NodeNames ) try ...
0
1927.ps1
Describe "Get-Variable DRT Unit Tests" -Tags "CI" { It "Get-Variable of not existing variable Name should throw ItemNotFoundException"{ { Get-Variable -ErrorAction Stop -Name nonexistingVariableName } | Should -Throw -ErrorId "VariableNotFound,Microsoft.PowerShell.Commands.GetVariableCommand" } It "Get-Vari...
0
check-disabledstatus.ps1
# check-disabledstatus.ps1 # by Ken Hoover <ken.hoover@yale.edu> - Yale University ITS Windows Systems Team - Spring 2009 # # reads a text file of usernames and outputs CSV showing the status of that user - OK, DISABLED or NOTFOUND if (!($args[0])) { Write-Host "`nPlease specify a file containing usernames to c...
0
1320.ps1
function Get-CRegistryKeyValue { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Path, [Parameter(Mandatory=$true)] [string] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $P...
0
sample_58_33.ps1
# # Module manifest for module 'DscInstall' # # Generated by: Zia Jalali # # Generated on: 07/31/2017 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'Heartbeat.psm1' # Version number of this module. ModuleVersion = '1.1' # ID used to uniquely identify thi...
0
sample_14_23.ps1
# # Module manifest for module 'Az.Websites' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.Websites.psm1' # Version number of this module. ModuleVersion = '3.2.1' # Supported PSEditions ...
0
sample_55_38.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PackageManagement.Resources.psd1 # ######################################################################################### ConvertFrom-StringDa...
0
sample_34_42.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
2465.ps1
function New-LogEntry { [CmdletBinding()] param ( [Parameter(ValueFromRemainingArguments = $true)] [string]$Message ) begin { $FilePath = 'C:\MyWorkLog.csv' function Convert-TimeStringToTimeSpan($TimeString) { $AllowedLabels = (New-TimeSpan).Psobject.Properties.Name $AllowedLabels += $Allowed...
0
14.ps1
param ($Remote = 'origin', [switch]$Force) Push-Location $PSScriptRoot $nuspec = [xml](Get-Content poshgit.nuspec) $version = $nuspec.package.metadata.version $tag = "v$version" if ($Force) { git tag -f $tag git push -f $Remote $tag } elseif (!$(git ls-remote $Remote $tag)) { Write-Warning "'$Remote/$tag'...
0
1363.ps1
function Test-CPowerShellIs64Bit { [CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState return ([Environment]::Is64BitProcess) }
0
2002.ps1
Describe "Validate start of console host" -Tag CI { BeforeAll { $allowedAssemblies = @( 'Microsoft.ApplicationInsights.dll' 'Microsoft.Management.Infrastructure.dll' 'Microsoft.PowerShell.ConsoleHost.dll' 'Microsoft.PowerShell.Security.dll' 'Mic...
0
26d9a40a-d77f-4500-a0b2-5d0d79606685.ps1
$screen = " You see here a virtual switch. ------------ ------ #...........| |....| --------------- ###------------ |...(| |..%...........|########## ###-@...| ...
0
sample_47_44.ps1
# # Module manifest for module 'OCI.PSModules.Filestorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Filestorage.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEdition...
0
Get-MemberBody v2.ps1
<# Requires ILSpy Tested with version 2.1.0.1603 http://ilspy.net/ You'll need to adjust this to your ILSpy path #> [void][System.Reflection.Assembly]::LoadFrom(".\\ILSpy.exe") function Get-MemberBody { [CmdletBinding()] param( [Parameter(ParameterSetName="MI")] [System....
0
Get-Netstat 0.9.ps1
$null, $null, $null, $null, $netstat = netstat -a -n -o [regex]$regex = '\\s+(?<Protocol>\\S+)\\s+(?<LocalAddress>\\S+)\\s+(?<RemoteAddress>\\S+)\\s+(?<State>\\S+)\\s+(?<PID>\\S+)' $netstat | ForEach-Object { if ( $_ -match $regex ) { $process = "" | Select-Object Protocol, LocalAddress, Remo...
0
10.ps1
$Global:GitTabSettings = New-Object PSObject -Property @{ AllCommands = $false KnownAliases = @{ '!f() { exec vsts code pr "$@"; }; f' = 'vsts.pr' } } $subcommands = @{ bisect = "start bad good skip reset visualize replay log run" notes = 'add append copy edit get-ref list merge prune re...
0
978.ps1
$subscriptionId = '<Subscription-ID>' $randomIdentifier = $(Get-Random) $resourceGroupName = "myResourceGroup-$randomIdentifier" $location = "East US" $adminLogin = "azureuser" $password = "PWD27!"+(New-Guid).Guid $serverName = "mysqlserver-$randomIdentifier" $poolName = "myElasticPool" $databaseName = "mySampleDatab...
0
4199.ps1
[CmdletBinding()] param ( [ValidateNotNullOrEmpty()][string]$CollectionName = 'TSTBLD Systems', [ValidateNotNullOrEmpty()][string]$SCCMServer = 'BNASCCM', [ValidateNotNullOrEmpty()][string]$SCCMDrive = 'BNA', [ValidateNotNullOrEmpty()][string]$ReportFile = 'PendingRebootReport.csv' ) function Import-SCCMModule { ...
0
3802.ps1
function Test-SetChefExtensionBasic { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation try { New-AzResourceGroup -Name $rgname -Location $loc -Force; $vmsize = 'Standard_A2'; $vmname = 'vm' + $rgname; $p =...
0
2810.ps1
if (Get-Command logparser.exe) { $lpquery = @" SELECT COUNT(ImagePath, LaunchString) as ct, ImagePath, LaunchString FROM *autorunsc.tsv WHERE Publisher not like '(Verified)%' and (ImagePath not like 'File not found%') GROUP BY ImagePath, ...
0
124.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ($Aa...
0
sample_67_24.ps1
# # Module manifest for module 'OCI.PSModules.Managementdashboard' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Managementdashboard.dll' # Version number of this module. ModuleVersion = '86.0.0' # Sup...
0
finddupe.ps1
param($dir = '.') $matches = 0 # initialize number of matches for summary. $files = (dir $dir -recurse | ? {$_.psiscontainer -ne $true}) for ($i=0;$i -ne $files.count; $i++) # Cycle thru all files { if ($files[$i] -eq $null) {continue} $md5 = $null $filecheck = $files[$i] $files[$i] = $null fo...
0
sample_67_16.ps1
# Localized 05/01/2024 11:12 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Ja PromptNoString=&Nein BundleFound=Bundle gefunden: {0} PackageFound=Paket gefunden: {0} EncryptedBundleFound=Verschlüsseltes Bundle gefunden: {0} EncryptedPackag...
0
Enable-MailboxJunkEmail_1..ps1
# Author: Jon Webster # Name: Enable-MailboxJunkEmail # Created: 1/27/2009 # # Version: 1.0 # History: 1.0 01/27/2009 Initial version param( $Identity, [string]$CasURL, [string]$User, [string]$Password, $DomainController, [switch]$help ) BEGIN { Function Usage { Write-Host @' Enable Se...
0
1561.ps1
function Invoke-MrTDDWorkflow { [CmdletBinding()] param ( [ValidateScript({ If (Test-Path -Path $_ -PathType Container) { $true } else { Throw "'$_' is not a valid directory." } })] [string]$Path = (Get-Location), ...
0
sample_29_70.ps1
# # Module manifest for module 'OCI.PSModules.Servicecatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicecatalog.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSE...
0
sample_8_23.ps1
ConvertFrom-StringData @' id_telnetsystemaccount_sd=The Telnet service is running under Local System account and this may cause problems with Plug and Play device installation. '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3Ag...
0
718.ps1
function Set-RsDataSourceReference { [CmdletBinding()] param ( [Alias('ItemPath')] [Parameter(Mandatory = $true, ValueFromPipeline = $true)] [string[]] $Path, [Parameter(Mandatory = $true)] [string] $DataSourceName, [Parameter(Mandatory...
0
sample_25_48.ps1
# # Module manifest for module 'OCI.PSModules.Artifacts' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Artifacts.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Co...
0