filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
RDC RemoteApp PassMan.ps1
################################################## # ENV Setup ################################################## #------------------------------------------------- # Initialize-ENV #------------------------------------------------- # Usage: Used to build the execution ENV. # **Function is not for interactive ex...
0
Set-LocalPassword_2.ps1
param( [switch]$Help , [string] $User , [string] $Password , [string[]] $ComputerNames = @() ) $usage = @' Get-OUComputerNames usage : [computerName1,computerName2,... | ] ./Set-LocalPassword.ps1 [-user] <userName> [-password] <password> [[-computers] computerName1,computerName2,...] returns : Sets lo...
0
sample_45_72.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Set-ScriptExtent { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding(PositionalBinding = $false, DefaultParameterSetName = '__AllParameterSets')] param( [Parameter(Posit...
0
sample_24_4.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.EventHub.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.EventHub.internal.psm1' if(Test-Path $internalModulePath) { $n...
0
sample_59_40.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> f...
0
sample_17_75.ps1
#------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. #------------------------------------------------------------ @{ # Script module or binary module file associated with this manifest ModuleToProcess = 'Microsoft.IdentityManagement.PowerSh...
0
sample_31_1.ps1
#!powershell # Copyright: (c) 2015, Corwin Brown <corwin.brown@maxpoint.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) #Requires -Module Ansible.ModuleUtils.Legacy [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSCustomUseLiteralPath', '', Justificat...
0
653.ps1
$reportPortalUri = if ($env:PesterPortalUrl -eq $null) { 'http://localhost/reports' } else { $env:PesterPortalUrl } $reportServerUri = if ($env:PesterServerUrl -eq $null) { 'http://localhost/reportserver' } else { $env:PesterServerUrl } function New-TestCredentials { param( [string] $Username, ...
0
Get-SQLFileSize.ps1
Function Get-SQLFileSize { <# .SYNOPSIS Retrieves the file size of a MDF or LDF file for a SQL Server .DESCRIPTION Retrieves the file size of a MDF or LDF file for a SQL Server .PARAMETER Computer Computer hosting a SQL Server .NOTES Name: Get-SQLFileSize Author: Boe Prox ...
0
Get-ProcessCount.ps1
# Get-ProcessCount uses 2 main variables, server and process name. # Process name is typically the end exe, such as "svchost.exe" # Will accept unnamed args (Get-ProcessCount servername processname) # or named args (Get-ProcessCount -Computer servername -Process processname) Function Get-ProcessCount([string]$proce...
0
sample_66_90.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.apach...
0
4133.ps1
[CmdletBinding()] param ( [Switch]$SCCM, [switch]$TextFile, [string]$TextFileLocation ) function Find-RegistryKey { [CmdletBinding()][OutputType([string])] param ( [ValidateNotNullOrEmpty()][string]$Value, [ValidateNotNullOrEmpty()][string]$SID ) $Version = Get-OfficeVersion switch ($Version) { "O...
0
232.ps1
function Get-ADSITokenGroup { [CmdletBinding()] param ( [Parameter(ValueFromPipeline = $true)] [Alias('UserName', 'Identity')] [String]$SamAccountName, [Alias('RunAs')] [System.Management.Automation.Credential()] $Credential = [System.Management.Automati...
0
New-Task.ps1
<# .SYNOPSIS Creates a task in Outlook .DESCRIPTION Allows for the creation of tasks in Microsoft Outlook from Windows PowerShell. The majority of task options available can be configured with the function. .LINK http://www.leeholmes.com/blog/GettingThingsDoneOutlookTaskAutomationWithPowerShell.aspx .EXAMPLE C...
0
sample_28_85.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 = '75.1.0' # Supported PSEditions Compat...
0
Get-VariableType.ps1
function Get-VariableType { param([string]$Name) get-variable $name | select -expand attributes | ? { $_.gettype().name -eq "ArgumentTypeConverterAttribute" } | % { $_.gettype().invokemember("_convertTypes", "NonPublic,Instance,GetField", $null, $_, @()) } }
0
sample_64_37.ps1
# # Module manifest for module 'OCI.PSModules.Computecloudatcustomer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computecloudatcustomer.dll' # Version number of this module. ModuleVersion = '83.3.0' ...
0
2740.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$False,Position=0)] [String]$ScanPath="C:\Windows\System32" ) Function Expand-Zip ($zipfile, $destination) { [int32]$copyOption = 16 $shell = New-Object -ComObject shell.application $zip = $shell.Namespace($zipfile) foreach($item in $zip.items()...
0
sample_3_52.ps1
#************************************************ # TS_RemoteDesktopLServerKB2512845.ps1 # Version 1.0.1 # Date: 5/15/2012 # Author: v-kaw # Description: [Idea ID 2285] [Windows] Windows Server 2003 TS Licensing server does not renew new versions of TS Per Device CALs # Rule number: 2285 # Rule URL: //sharepo...
0
WPFDiskSpace_1.ps1
#.Example # Get-WmiObject -computername Z002 Win32_LogicalDisk -filter "DriveType=3" | New-DiskSpace #.Note # Requires ShowUI 1.1 and Visifire (You must use Add-UIModule on the Visifire dll and then import it) function New-DiskSpace { param([Parameter(ValueFromPipeline=$true)]$InputObject) begin { $cha...
0
sample_41_28.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 = '81.0.0' # Supported PSEdi...
0
sample_18_20.ps1
# # Module manifest for module 'OCI.PSModules.Core' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Core.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions CompatiblePS...
0
New-CommandWrapper.ps1
##############################################################################\n##\n## New-CommandWrapper\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nAdds ...
0
sample_24_37.ps1
# Compiling Piglit $ProgressPreference = "SilentlyContinue" $MyPath = $MyInvocation.MyCommand.Path | Split-Path -Parent . "$MyPath\mesa_init_msvc.ps1" $source_dir = Join-Path -Path "$PWD" -ChildPath "src" $waffle_source = Join-Path -Path "$source_dir" -ChildPath "waffle" $waffle_install = Join-Path -Path "$PWD" -Chil...
0
2253.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Specify the path containing the Flash64W.exe and BIOS executable.")] [ValidateNotNullOrEmpty()] [string]$Path, [parameter(Mandatory=$false, HelpMessage="Specify the BIOS password if necessary.")] [Validate...
0
sample_8_15.ps1
ConvertFrom-StringData @' id_sccm_activity_iisvdirinfo=Gathering IIS Virtual Directories Information id_sccm_iisvdirinfo_vdir=Obtaining a list of IIS Virtual Directories '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC...
0
Out-AnsiGraph.ps1
# # Out-AnsiGraph.psm1 # Author: xcud # History: # v0.1 September 21, 2009 initial version # # PS Example> ps | select -first 5 | sort -property VM | Out-AnsiGraph ProcessName, VM # AEADISRV &#9608;&#9608;&#9608; 14508032 # audiodg &#9608;&#9608;&#9608;&#9608;&#9608;...
0
3513.ps1
function Get-DataLakeStoreAccountName { return getAssetName } function Get-DataLakeAnalyticsAccountName { return getAssetName } function Get-ResourceGroupName { return getAssetName } function Invoke-HandledCmdlet { param ( [ScriptBlock] $Command, [switch] $IgnoreFailures ) try...
0
4324.ps1
function Validate-ModuleAuthenticodeSignature { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] $CurrentModuleInfo, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] $InstallLocation, [Parameter()] [Switch] $IsUp...
0
HP_Plink_ISO.ps1
$plink = plink -ssh Administrator@$ILOIP -pw $PSWD -auto_store_key_in_cache "set /map1/oemhp_vm1/cddr1 oemhp_image=http://IPADDRESS/ISO.iso" $plink = plink -ssh Administrator@$ILOIP -pw $PSWD -auto_store_key_in_cache "set /map1/oemhp_vm1/cddr1 oemhp_boot=connect" $plink = plink -ssh Administrator@$ILOIP -pw $PSWD -au...
0
783e4a84-4d47-4c57-a257-2298ce2b32ff.ps1
Function Get-DiskUsage { <# .SYNOPSIS A tribute to the excellent Unix command DU. .DESCRIPTION This command will output the full path and the size of any object and it's subobjects. Using just the Get-DiskUsage command without any parameters will result in an output of the directory you are currently p...
0
2137.ps1
$baseTypes = @{ [SByte] = 'sbyte'; [Byte] = 'byte' [Int16] = 'short'; [UInt16] = 'ushort' [Int32] = 'int'; [UInt32] = 'uint' [Int64] = 'long'; [UInt64] = 'ulong' } $ns = [Guid]::NewGuid() -replace '-','' $typeDefinition = "namespace ns_$ns`n{" $enumTypeNames = foreach ($baseType...
0
sample_57_39.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 = '85.1.0' # Supported PSEditions Compatible...
0
3175.ps1
function Open-ISEFunction { [cmdletbinding()] param( [ValidateScript({ Get-Command -commandtype function -name $_ })] [string[]]$function ) foreach($fn in $function){ $definition = (Get-Command -commandtype function -name $fn).definition ...
0
Twitter Module v0.2b.ps1
<# ------------------------------------------------------------------------------- Name: Social Media Scripting Framework Module: Twitter Version: 0.2 BETA Date: 2013/02/03 Author: Carlos Veira Lorenzo e-mail: cveira [at] thinkinbig [dot] org blog: thinkinbig.org twitte...
0
Findup_29.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : I...
0
Get-Cert.ps1
$UsingStatements = @" using System.Net.Security; using System.Net.Sockets; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; "@ $GetCert = @" RemoteCertificateValidationCallback callback = delegate( object sender, X509Certificate cert, X509Chain chain, SslPoli...
0
Get-WordOutline.ps1
function Get-WordOutline ( $Path, [int]$MaxDepth = 9 ) { if ( $Path -is [System.IO.FileInfo] ) { $Path = $_.FullName } $word = New-Object -comObject word.application $document = $wordd.documents.open( $path ) $outline = $document.paragraphs | Where-Object { $_.outlineLevel -le $MaxDepth } | ForEach-Object ...
0
Set-IPConfigv4.ps1
# script parameters param( [string[]] $Computers = $env:computername, [switch] $ChangeSettings, [switch] $EnableDHCP, [switch] $IpRelease ) # script variables $nl = [Environment]::NewLine $Domain = "domain.local" $DNSSuffix = @("domain.local,domain.com") $DNSServers = @("10.10.0.1", "10.10.0.2", "10.10.0.3...
0
sample_9_52.ps1
PARAM ( $ProcessToTerminate = $null, $ScriptBlockToExecute = $null, [string] $SessionName = "Session0", [switch] $EndMonitoring, [switch] $AllSessions ) # 2023-02-20 WalterE mod Trap #we# trap [Exception]{ WriteTo-ErrorDebugReport -ErrorRecord $_ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.I...
0
2675.ps1
param( [switch]$syncPermissions ) . $PSScriptRoot/shared.ps1 Write-Output -InputObject @" ___ ___ _____ | \/ | | __ \ | . . |_ __ | | \/ _____ _____ _ __ _ __ __ _ _ __ ___ ___ | |\/| | ...
0
sample_55_1.ps1
# # Module manifest for module 'OCI.PSModules.Databasemanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Databasemanagement.dll' # Version number of this module. ModuleVersion = '85.1.0' # Suppo...
0
Script permissions_2.ps1
<# .SYNOPSIS Applies permissions and roles to vSphere vApps .DESCRIPTION Applies permissions and roles to vSphere vApps -VIServer (Optional, defaults to Development) {FQDN of VCentre Server} -AppName (Required) {VApp Label} -ADGroup (Optional) {Domain\\Group_Object} -Role (Optional) {vSphere Role, ReadO...
0
3899.ps1
function Test-PoolCRUD { $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $poolId1 = "pool1" $poolId2 = "pool2" try { $osFamily = "4" $targetOSVersion = "*" $targetDedicated = 0 $vmSize = "small"...
0
sample_16_71.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 = '75.1.0' # Supported PSEditions Comp...
0
sample_7_91.ps1
ConvertFrom-StringData @' id_sccm_activity_iisvdirinfo=Gathering IIS Virtual Directories Information id_sccm_iisvdirinfo_vdir=Obtaining a list of IIS Virtual Directories '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC...
0
sample_29_62.ps1
# # Module manifest for module 'OCI.PSModules.Datasafe' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datasafe.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Comp...
0
sample_53_0.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 = '83.1.0' # Supported PSEditions CompatiblePSEd...
0
ISE-FileName.ps1
#requires -version 2.0 ## ISE-FileName module v 1.0 ############################################################################################################## ## Provides File and Path cmdlets for working with ISE ## Copy-ISEFullPath - Copy the full path of the current file to the clipboard ## Copy-ISEPath - C...
0
New-WebServiceProxy_2.ps1
# # New-WebServiceProxy.ps1 (v3.0 Sep 23, 2009) # # Oisin Grehan <oising@gmail.com> (x0n) # # Usage: # $proxy = .\\New-WebServiceProxy.ps1 [-Url] http://site/service.asmx [-Anonymous] [[-SoapProtocol] <Soap | Soap12>] [-Namespace <namespace>] # # to see available webmethods: # $proxy | gm # # $url = "h...
0
Function Run-Script_2.ps1
################################################################################# # This function should be included in the PowerShell ISE profile.ps1 and it will # display the start and end times of any scripts started by clicking 'Run Script' # in the Add-ons Menu, or F2; additionally they will be logged to the S...
0
sample_52_90.ps1
function New-AzWvdMsixPackage_PackageAlias { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Models.Api20230905.IMsixPackage')] [CmdletBinding( PositionalBinding = $false, ConfirmImpact = 'Medium')] param( [Parameter()] [Alias('AzureRMContext', 'AzureCredential')...
0
sample_21_2.ps1
<# # .DESCRIPTION # Run powershell scripts using scheduled task. # # .PARAMETER taskName # The task name. # # .PARAMETER script # The inlined script to execute on remote machine. # #> $ScriptFile = Join-Path -Path $env:LocalAppData -ChildPath "$taskName.ps1" $ResultFile = Join-Path -Path $env:...
0
6b9bb97b-5f9c-4504-af73-6d26a0372e0c.ps1
Function Get-Printers { <# .SYNOPSIS Get a list of printers from the specified print server .DESCRIPTION This function returns the Name of each printer installed on the specified print server. .PARAMETER ComputerName Name of the print server .EXAMPLE ...
0
1575.ps1
function Get-MrOSInfo { [CmdletBinding()] param ( [Microsoft.Management.Infrastructure.CimSession[]]$CimSession ) $Params = @{} if ($PSBoundParameters.CimSession) { $Params.CimSession = $CimSession } $OSInfo = Get-CimInstance @Params -ClassName Win32_OperatingSystem...
0
sample_60_40.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
PowerShellServer Cmdlet _1.ps1
\n#Global Hashtable to Control all Powershell Server Runspace\nSet-Variable -name '__PSRUNSPACES__' -scope 'global' -value @{} -force\n\nfunction global:New-PowerShellServerRunspace\n{\n param(\n $Credential,\n $ErrorAction='Stop',\n [switch]$Force,\n $Password,\n $Port=22,\n $Server='127.0.0.1',\n $SSHAccept,\n...
0
sample_67_66.ps1
# -*- coding: utf-8 -*- # # Copyright 2024 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
0
sample_56_53.ps1
# # Module manifest for module 'OCI.PSModules.Psql' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Psql.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions CompatiblePS...
0
sample_1_99.ps1
// ================================================================== // DCIM_SPConsolesConcreteCollection // ================================================================== [dynamic, provider("dcismprovider"), Description( "DCIM_SPConsolesConcreteCollection is a" "trivial derivatio...
0
sample_24_42.ps1
# # Module manifest for module 'OCI.PSModules.Healthchecks' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Healthchecks.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditi...
0
sample_13_72.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_2_22.ps1
#************************************************ # TS_DFSRRootCausesCheck.ps1 # Version 1.0.5 # Date: 08-21-2014 # Author: David Fisher # Description: DFSR Root causes troubleshooter #************************************************ Import-LocalizedData -BindingVariable DFSRCheck Write-DiagProgress -Activit...
0
3604.ps1
function Get-AzureRmSecurityCompliance-SubscriptionScope { $compliances = Get-AzSecurityCompliance Validate-Compliances $compliances } function Get-AzureRmSecurityCompliance-SubscriptionLevelResource { $compliance = Get-AzSecurityCompliance | Select -First 1 $fetchedCompliance = Get-AzSecurit...
0
3909.ps1
function Test-JobCRUD { $context = New-Object Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestContext $jobId1 = "job1" $jobId2 = "job2" try { $poolInfo1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation $poolInfo1.PoolId = "...
0
sample_29_41.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 = '82.0.0' # Supported PSE...
0
sample_59_80.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function Remove-ServiceFabric...
0
3258.ps1
class Bot : BaseLogger { [string]$Name [Backend]$Backend hidden [string]$_PoshBotDir [StorageProvider]$Storage [PluginManager]$PluginManager [RoleManager]$RoleManager [CommandExecutor]$Executor [Scheduler]$Scheduler [System.Collections.Queue]$MessageQueue = (...
0
sample_64_55.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ param ( [Parameter(Manda...
0
911.ps1
Add-WindowsFeature Web-Server Get-Disk | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "myDataDisk" -Confirm:$false
0
sample_32_87.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.DataCollectionRule.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Module]::Instance # Export nothing to...
0
sample_41_83.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
0
sample_6_47.ps1
// Copyright (c) 2009 DMTF. All rights reserved. [Version ( "2.22.0" ), UMLPackagePath ( "CIM::Network::Misc" ), Description ( "A subclass of EnabledLogicalElementCapabilities that defines " "the capabilities of a ProtocolService. An instance of " "CIM_ProtocolServiceCapabiliti...
0
2816.ps1
$data = $null foreach ($file in (ls *svcall.xml)) { $data += Import-Clixml $file } $data | ? { $_.StartMode -eq "Auto" -or $_.State -eq "Running" }
0
25a74c84-07ab-45d9-a031-0aaf972b8522.ps1
select * from sys.dm_db_index_physical_stats(db_id('vCenter'),null,null,null,null) order by avg_fragmentation_in_percent desc
0
sample_42_72.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
1867.ps1
Describe "Out-Host Tests" -tag CI { BeforeAll { $th = New-TestHost $rs = [runspacefactory]::Createrunspace($th) $rs.open() $ps = [powershell]::Create() $ps.Runspace = $rs $ps.Commands.Clear() } AfterEach { $ps.Commands.Clear() } AfterAll { ...
0
1287.ps1
function Get-CIisSecurityAuthentication { [CmdletBinding()] [OutputType([Microsoft.Web.Administration.ConfigurationSection])] param( [Parameter(Mandatory=$true)] [string] $SiteName, [Alias('Path')] [string] $VirtualPath = '', ...
0
sample_20_46.ps1
<RunRuleResults><Header reportDate="18.12.2023." reportTime="13:35" savedToDirectory="C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20231218_133524\SystemConfigurationCheck_Report.htm"><Machines><Machine value="ALT-SAMPLER-WIN" /></Machines></Header><group groupName="GlobalRules" groupDescription="SQL S...
0
sample_16_10.ps1
<############################################################## # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # ##############################################################>...
0
1328.ps1
function Resolve-WindowsFeatureName { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string[]] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState Write-Warning -Message (...
0
sample_66_79.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
0
sample_61_20.ps1
# # Module manifest for module 'OCI.PSModules.Computeinstanceagent' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Computeinstanceagent.dll' # Version number of this module. ModuleVersion = '85.1.0' # S...
0
Convert-BounceToX_4.ps1
# $Id: Convert-BounceToX500.ps1 610 2010-11-16 00:39:19Z jon $ # $Revision: 610 $ #.Synopsis # Convert Bounce to X500 #.Description # Convert URL Encoded address in a Bounce message to an X500 address # that can be added as an alias to the mail-enabled object #.Parameter bounceAddress # URL Encoded bounce...
0
2396.ps1
function Get-UserProfilePath { [OutputType([string])] [CmdletBinding(DefaultParameterSetName = 'None')] param ( [Parameter(ParameterSetName = 'SID')] [string]$Sid, [Parameter(ParameterSetName = 'Username')] [string]$Username ) process { try { if ($Sid) { $WhereBlock = { $_.PSChildName...
0
970.ps1
$SubscriptionId = '' $resourceGroupName = "myResourceGroup-$(Get-Random)" $location = "westus2" $adminSqlLogin = "SqlAdmin" $password = "ChangeYourAdminPassword1" $serverName = "server-$(Get-Random)" $databaseName = "mySampleDatabase" $startIp = "0.0.0.0" $endIp = "0.0.0.0" Set-AzContext -SubscriptionId $subsc...
0
sample_34_54.ps1
<# .SYNOPSIS Checks a set of repositories involved in "normal" flow for .NET 6 previews and servicing for their mirror states. Each repo is checked for having an up-to-date internal fork, as well as an internal/ merge branch, if applicable. .PARAMETER RepoRoot Directory containing repos. .PARAMETER RuntimeBranch Bran...
0
sample_12_91.ps1
#$debug = $false # Load Common Library: . ./utils_cts.ps1 # Load DSD Common Function Library . ./utils_DSD.ps1 trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo...
0
set-ipconfigv6.ps1
# script parameters param( [Parameter(Position=0,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$true)] [alias("Name","ComputerName")][string[]]$Computers = @($env:computername), $Domain = "domain.local", $DNSSuffix = @("domain.local,sub.domain.local,domain.com"), $DNSServers = @("10.10.0.1", "10.10.0.2"...
0
1079.ps1
$importCarbonPath = Join-Path -Path $PSScriptRoot -ChildPath '..\Carbon\Import-Carbon.ps1' -Resolve Describe 'Import-Carbon' { BeforeEach { $Global:Error.Clear() if( (Get-Module 'Carbon') ) { Remove-Module 'Carbon' -Force } } AfterEach { ...
0
197.ps1
Function Add-SRComment { [CmdletBinding()] PARAM ( [Alias("SRObject")] [parameter(Mandatory = $true)] [System.WorkItem.ServiceRequest]$ServiceRequestObject, [parameter(Mandatory = $True)] [String]$Comment, [ValidateSet("User", "Analyst")] [parameter(Ma...
0
Get-Uptime.ps1
Function Get-Uptime { <# .SYNOPSIS Displays Uptime since last reboot .PARAMETER Computername .EXAMPLE Get-Uptime Server1 .EXAMPLE "Server1", "Server2"|Get-Uptime .EXAMPLE (Get-Uptime Sever1)."Time Since Last Reboot" #> [CmdletBinding()] Param ( [Parameter(Mandatory=$True,ValueFromPipeline=$true,P...
0
3196.ps1
function Get-PropertyType { param ( [Parameter( Mandatory=$true, ValueFromPipeline=$true)] [psobject]$InputObject, [string[]]$property = $null ) Begin { Function Get-PropertyOrder { [cmdletbinding()] p...
0
898.ps1
$Random=(New-Guid).ToString().Substring(0,8) $ResourceGroupName="myResourceGroup$Random" $App1Name="AppServiceTM1$Random" $App2Name="AppServiceTM2$Random" $Location1="WestUS" $Location2="EastUS" New-AzResourceGroup -Name $ResourceGroupName -Location $Location1 New-AzTrafficManagerProfile -Name "$ResourceGroupNa...
0
sample_2_92.ps1
# <copyright> # INTEL CONFIDENTIAL # # Copyright 2021 Intel Corporation # # This software and the related documents are Intel copyrighted materials, and your use of # them is governed by the express license under which they were provided to you ("License"). # Unless the License provides otherwise, you may not us...
0
sample_13_80.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> function Start-SessionTranscript { [Cmdlet...
0
sample_41_57.ps1
@{ RootModule = 'PSReadLine.psm1' NestedModules = @("Microsoft.PowerShell.PSReadLine2.dll") ModuleVersion = '2.3.5' GUID = '5714753b-2afd-4492-a5fd-01d9e2cff8b5' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' Description = 'Gr...
0
3229.ps1
properties { $projectRoot = $ENV:BHProjectPath if(-not $projectRoot) { $projectRoot = $PSScriptRoot } $sut = $env:BHModulePath $tests = "$projectRoot\Tests" $outputDir = Join-Path -Path $projectRoot -ChildPath 'out' $outputModDir = Join-Path -Path $outputDir -ChildPath $env:BHProjec...
0
sample_27_43.ps1
# # Module manifest for module 'OCI.PSModules.Jmsjavadownloads' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jmsjavadownloads.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported...
0
3348.ps1
function About { [PoshBot.BotCommand( Permissions = 'view' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot ) $path = "$PSScriptRoot/../../../PoshBot.psd1" $manifest = Import-PowerShellDataFile -Path $path $ver = $manifest.ModuleVersion $msg = @...
0