filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
2268.ps1
function Load-Form { $Form.Controls.Add($TabControl) $TabControl.Controls.AddRange(@( $TabPageGeneral, $TabPageCAS, $TabPagePrimary, $TabPageSecondary, $TabPageSiteRoles, $TabPageOther )) $TabPageGeneral.Controls.AddRange(@( $OutputB...
0
sample_31_82.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function set-AMTMPSClient { <# .Synopsis Add and remove clients from the Intel Fast Call for Help Management Presence Server (MPS) interface .Description Add and remove clients from the Intel Fast Call for Help Management Presence...
0
HEX string to SID string_1.ps1
Function EndianReverse ($strHex) { $intCounter=$strHex.length-1 do { $reverse=$reverse+$strHex.substring($intCounter-1, 2) $intCounter=$intCounter-2 } until ($intCounter -eq -1) return $reverse } Function hex2sid ($strHex) { $intSidVersionLength = 2 $intSubAuthorityCountLength = 2 $in...
0
Set vSphere CDP LinkDisc_1.ps1
function set-vSwitchLinkDiscovery { Param ( #Switch to enable vSwitch Discovery On [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string] $vSwitchName = "vSwitch0", #Host on which the vSwitch Resides [Parameter(Mandatory=$true,HelpMessage="Need Host Name to connect with")...
0
sample_36_96.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 = '75.1.0' # Sup...
0
sample_48_27.ps1
[CmdletBinding()] param ( [string]$OutFile, [string]$AltDownload, [string]$Proxy, [string]$AltHisEndpoint ) $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $refVersion = [version] '4.5' $provider = 'Microsoft.HybridCompute' # Error codes used by azcmagent are in r...
0
2734.ps1
[CmdletBinding()] Param ( [Parameter(Mandatory=$false)] [int32]$BackMins=180 ) $BackTime=(Get-Date) - (New-TimeSpan -Minutes $BackMins) $RawEvents = Get-WinEvent -LogName "Microsoft-Windows-Sysmon/Operational" | Where-Object {$_.TimeCreated -ge $BackTime} | Where-Object { $_.Id -eq 1} $RawEvents | ForEach-Obje...
0
Get-User_6.ps1
function Get-User($user) { # this function should be passed the CN of the user to be returned $dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() $root = [ADSI] "LDAP://$($dom.Name)" $searcher = New-Object System.DirectoryServices.DirectorySearcher $root $searcher.filter = "(&(objec...
0
sample_26_9.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function set-AMTMPS { <# .Synopsis Set proxy information for the Intel Fast Call for Help Management Presence Server (MPS) interface .Description Set proxy information for the Intel Fast Call for Help Management Presence Server (M...
0
225.ps1
function Get-ScriptAlias { [CmdletBinding()] PARAM ( [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateScript({ Test-Path -Path $_ })] [Alias("FullName")] [System.String[]]$Path ) PROCESS { FOREACH ($File in $Path) { TRY { $ScriptContent = (Get-Content $File -Del...
0
sample_42_71.ps1
let resizeObserver; let observerAddRemove; export function FluentOverflowInitialize(dotNetHelper, id, isHorizontal, querySelector) { var localSelector = querySelector; if (!localSelector) { // cannot use :scope for node.matches() further down localSelector = ".fluent-overflow-item"; ...
0
sample_26_38.ps1
# # Module manifest for module 'OCI.PSModules.Loggingingestion' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingingestion.dll' # Version number of this module. ModuleVersion = '79.0.0' # Supported...
0
1625.ps1
function OnApplicationLoad { if([Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms.DataVisualization") -eq $null) { [void][reflection.assembly]::Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") [void][System.Windows.Forms.MessageBox]::Show("...
0
sample_64_96.ps1
this.webpackChunk([207],{214:function(e,t){Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pa...
0
sample_36_45.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_48.ps1
##------------------------------------------------------------------ ## <copyright file="ScenarioHelper.psm1" company="Microsoft"> ## Copyright (C) Microsoft. All rights reserved. ## </copyright> ##------------------------------------------------------------------ #region Imports Import-Module (Join-Path -...
0
Bulk Change AD Passwords.ps1
#------------------------------------------------------------- # install http://www.quest.com/powershell/activeroles-server.aspx Add-PSSnapin Quest.ActiveRoles.ADManagement # CSV Format : NTAccountName,oldpassword,newpassword $UserList = Import-Csv c:\\temp\\users.csv # | select-object -first 2 $userli...
0
Compare-SQLResultSet.ps1
<# .SYNOPSIS Compares two result sets from SQL queries for differences. .DESCRIPTION Compares the result sets from two SQL queries and outputs the differences. Currently the function only handles similarly shaped result sets. That is, result sets with the same number and names of columns. Functiona...
0
Windows Startup Script_4.ps1
<#====================================================================================== File Name : Startup.ps1 Original Author : Kenneth C. Mazie : Description : This is a Windows start-up script with pop-up notification and checks to : assure things are n...
0
Delete Files per folder.ps1
<# .SYNOPSIS Deletes files in directory based on age measured in days .DESCRIPTION Delete files in folder with use of regular filter, either recursive or not. .PARAMETER DelFilter Provide a filter like "*.txt" or "mylogs*" .PARAMETER DelPath The directory where files are to be deleted from, use the Rec...
0
sample_41_14.ps1
. $PSScriptRoot\PathProcessingNonExistingPaths.ps1 . $PSScriptRoot\PathProcessingNoWildcards.ps1 . $PSScriptRoot\PathProcessingWildcards.ps1 # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7...
0
sample_2_60.ps1
#This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER #EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABI...
0
3022.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe 'Get-ShouldOperator' { Context 'Overview' { $OpCount = $AssertionOperators.Count $get1 = Get-ShouldOperator Add-AssertionOperator -Name 'test' -Test {'test'} $get2 = Get-ShouldOperat...
0
4307.ps1
function SuiteSetup { Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue $script:ProgramFilesModulesPath = Get-AllUsersModulesPath $script:MyDocumentsModulesPath = Get-CurrentUserModulesPath ...
0
sample_6_25.ps1
ConvertFrom-StringData @' id_ctsdirectaccessclient=DirectAccess Client id_ctsdirectaccessclientdescription=Collects information about DirectAccess client. id_ctstcpip=TCPIP '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEe...
0
sample_38_23.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_28_15.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
2426.ps1
function Get-MoreCowbell { [CmdletBinding()] param ( [Parameter()] [ValidateNotNullOrEmpty()] [switch]$Introduction, [Parameter()] [ValidateNotNullOrEmpty()] [int]$Repeat = 10, [Parameter()] [ValidateNotNullOrEmpty()] [string]$CowbellUrl = 'http://emmanuelprot.free.fr/Drums%20kit%20Manu/Cowbel...
0
178.ps1
function Update-O365UserUPNSuffix { [CmdletBinding()] [OutputType([pscustomobject])] param ( [Parameter(Mandatory = $true)] [String]$UserAlias, [Parameter(Mandatory = $true)] [String]$CurrentUPNSuffix, [Parameter(Mandatory = $true)] [String]$NewUPNSuff...
0
sample_29_89.ps1
@{ GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @( 'MSFT_MpComputerStatus.cdxml', 'MSFT_Mp...
0
sample_64_67.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_53_62.ps1
var state = command.getTrait("state"); var manipData = services.manipulators.getManipulatorData("CameraManipulator"); var mode = manipData.getTrait("CameraManipulationMode"); var tool = new Object(); tool.activate = function () { state.value = 2; mode.value = 2; // Orbit mode } tool.deactivate = fun...
0
Get-DiskUsage_3.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
315.ps1
function Register-PSFSessionObjectType { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [string] $DisplayName, [Parameter(Mandatory = $true)] [string] $TypeName ) process { [PSFramework.ComputerManagement.ComputerManagementHost]::KnownSessionTypes[$TypeName] = $DisplayName } }
0
sample_32_81.ps1
@{ GUID="766204A6-330E-4263-A7AB-46C87AFC366C" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Disable-WSManCredSSP", "Enable-WSManC...
0
sample_27_85.ps1
# # Module manifest for module 'OCI.PSModules.Waas' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waas.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions CompatiblePS...
0
sample_43_66.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 = '82.0.0' # Supported PSEditi...
0
3598.ps1
function Get-AzureRmDiscoveredSecuritySolution-SubscriptionScope { $discoveredSecuritySolutions = Get-AzDiscoveredSecuritySolution Validate-DiscoveredSecuritySolutions $discoveredSecuritySolutions } function Get-AzureRmDiscoveredSecuritySolution-ResourceGroupLevelResource { $discoveredSecuritySol...
0
1059.ps1
$TestCertPath = JOin-Path -Path $PSScriptRoot -ChildPath 'Certificates\CarbonTestCertificate.cer' -Resolve $TestCert = New-Object Security.Cryptography.X509Certificates.X509Certificate2 $TestCertPath $testCertificateThumbprint = '7D5CE4A8A5EC059B829ED135E9AD8607977691CC' $testCertFriendlyName = 'Pup Test Ce...
0
1001.ps1
$myEndpoint = "<your-endpoint-URL>" Set-AzContext -Subscription "<subscription-name-or-ID>" New-AzEventGridSubscription -Endpoint $myEndpoint -EventSubscriptionName demoSubscriptionToAzureSub
0
sample_41_99.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
917.ps1
$resourceGroup = "myResourceGroup" $location = "eastus" $vmName = "myVM" $cred = Get-Credential New-AzResourceGroup -ResourceGroupName myResourceGroup -Location eastus $subnetConfig = New-AzVirtualNetworkSubnetConfig ` -Name mySubnet ` -AddressPrefix 192.168.1.0/24 $vnet = New-AzVirtualNetwork ` -Resourc...
0
2047.ps1
Describe "Resolve types in additional referenced assemblies" -Tag CI { It "Will resolve DirectoryServices type <name>" -TestCases @( @{ typename = "[System.DirectoryServices.AccountManagement.AdvancedFilters]"; name = "AdvancedFilters" } ){ param ($typename, $name) pwsh -noprofile -co...
0
Out-Balloon_1.ps1
<# .Synopsis Makes a baloon tip in the notification area .Description With just a few arguments, it is easy to make some text appear in a little balloon. You can specify an icon file (*.ico) with the -icon argument, if you don't then the first icon of the host is used. out-balloo...
0
sample_50_74.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
1736.ps1
Describe "Failing test used to test CI Scripts" -Tags 'CI' { It "Should fail" { 1 | should be 2 } }
0
sample_18_68.ps1
#************************************************ # DC_DSMisc.ps1 # Version 1.0.1 # Date: 07-10-2009 # VBScript by Craig Landis (clandis@microsoft.com) # PS1 by Andret Teixeira #************************************************ Import-LocalizedData -BindingVariable DSMiscStrings -FileName DC_DSMisc -UICulture e...
0
3676.ps1
function Test-BlobAuditDatabaseUpdatePolicyWithStorage { $testSuffix = getAssetName Create-BlobAuditingTestEnvironment $testSuffix $params = Get-SqlBlobAuditingTestEnvironmentParameters $testSuffix try { Set-AzSqlDatabaseAudit -BlobStorageTargetState Enabled -ResourceGroupName $params.rgnam...
0
sample_19_26.ps1
# Localized 06/28/2023 07:56 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Problembehandlung Troubleshoot_DetectNetworkCache=Netzwerkcache von Windows Media Player wird überprüft... Resolution_Title=Auflösung Resolution_ResetConfiguration=Alle Konfiguration...
0
sample_45_46.ps1
param ( [Parameter(Mandatory = $true)] [PSObject] $Session, [Parameter(Mandatory = $true)] [string] $CertificateName, [Parameter(Mandatory = $true)] [string] $CertificateStoreLocation, [Parameter(Mandatory = $true)] [string] $CertificateExportPfxFullPath, [Parameter(Mandator...
0
sample_28_35.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Microsoft.PowerShell.Management\Get-Item function:Clear-Host | Microsoft.PowerShell.Management\Set-Item function:__clearhost function Clear-Host { [Alias('cls')] param() __clearhost if ($host.Runspace.LanguageMode -eq ...
0
3411.ps1
function Get-RandomLetters { return -join ((97..122) | Get-Random -Count 5 | % {[char]$_}) } function Get-WebsiteName { return "someuniqueWebsite$(Get-RandomLetters)" } function Get-TrafficManagerProfileName { return "someuniqueTrafficManager" } function Get-WebHostPlanName { return "ho...
0
Install-ISPackage.ps1
####################### <# .SYNOPSIS Installs an SSIS package to a SQL Server store. .DESCRIPTION The Install-ISPackage script installs an Dtsx file to a SQL Server store using the command-line utility dtutil. Works for 2005 and higher .EXAMPLE ./install-ispackage.ps1 -DtsxFullName "C:\\Users\\Public\\bin\\SSIS...
0
2214.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true,HelpMessage="Site server where the SMS Provider is installed")] [ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})] [string]$SiteServer, [parameter(Mandatory=$true,HelpMessage="Name of the Deployment Package...
0
198.ps1
function Get-SCSMWorkItemCreatedByUser { [CmdletBinding(DefaultParameterSetName = 'GUID')] param ( [Parameter(ParameterSetName = 'SMObject', Mandatory = $true, ValueFromPipeline = $true)] $SMObject, [Parameter(ParameterSetName = 'GUID', ...
0
sample_30_70.ps1
<# .SYNOPSIS Powershell script to collect data about Geneva Metrics (AKA MDM, AKA Geneva Hot Path) data publication. .DESCRIPTION This script performs several operations for troubleshooting issues related to MetricsExtension such as: - Collection of metric traffic. - Collectio of information about...
0
Get-APOD.ps1
<# .SYNOPSIS Gets the Astronomy Picture of the Day and sets it as your wallpaper. .DESCRIPTION Get-Apod parses the Astronomy Picture of the Day website and downloads the current day's image. It then sets the image as the desktop wallpaper for the system. .LINK http://antwrp.gsfc.nasa.gov/apod/astropix.html ....
0
reconfigure-ha.ps1
#ThePowerShellTalk #reconfigure-ha.ps1 #take a VMhost object from the pipeline and apply the 'Reconfigure HA host' task Process { if ( $_ -isnot [VMware.VimAutomation.Client20.VMHostImpl] ) { Write-Error "VMHost expected, skipping object in pipeline." continue } $vmhostView = $_ | Get...
0
sample_10_35.ps1
ConvertFrom-StringData @' id_tcpipsettingscheck=Checking for KB 967224 id_tcpipsettingscheckdesc=Checking for modified TcpIp Reg Parameters '@ # SIG # Begin signature block # MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX...
0
sample_1_95.ps1
ConvertFrom-StringData @' id_tsremoteconfiguringmachine=Configuring %Machine% id_tsremoteconfiguringmachinepspolicy=Configuring PowerShell Execution Policy id_tsremoteerrorsettingpspolicy=Error while setting execution policy on remote system: id_tsremoterestoringmachinepspolicy=Restoring PowerShell Execution Polic...
0
sample_24_85.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 License...
0
2264.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Specify a single or an array of either IP addresses, NetBIOS names or FQDNs")] [string[]]$Targets, [parameter(Mandatory=$true, HelpMessage="Specify a single or an array or ports to validate")] [string[]]$Ports, ...
0
sample_20_10.ps1
ConvertFrom-StringData @' id_templateregkeycheck=Check for Registry Key id_templateregkeycheckdesc=Checking if HKLM\\SOFTWARE\\Microsoft\\Test\\DetectRootCause exists '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwE...
0
sample_42_51.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_56_38.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_59_59.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_7_90.ps1
#************************************************ # utils_Exchange.ps1 # Version 1.0.1 # Date: 04-12-2013, 2022-07-27 # Author: Jerome COIFFIN - jcoiffin@microsoft.com # Description: Utility functions for use by Exchange SDP 3.0+ manifests #************************************************ #Import-LocalizedDa...
0
2099.ps1
Describe "Tests OutVariable only" -Tags "CI" { BeforeAll { function get-foo1 { [CmdletBinding()] param() "foo" } function get-foo2 { [CmdletBinding()] param() $pscmdlet.writeobject("foo") } ...
0
sample_1_61.ps1
// =========================================================================================================================== // class DCIM_RoleMapping // =========================================================================================================================== [ Description ("Contains mapping ru...
0
sample_44_93.ps1
<# .SYNOPSIS Dump information about installed certificates .DESCRIPTION - Dump certificates from Computer and Personal stores; - In debug mode, dump information about Certificate Authority .PARAMETER outFolder Folder where to save output .PARAMETER outFormat Output format. Can be "txt" (default), "csv" or "stdo...
0
3501.ps1
function Test-NewAzureRmSearchService { $rgname = getAssetName $loc = Get-Location -providerNamespace "Microsoft.Search" -resourceType "searchServices" -preferredLocation "West US" $svcName = $rgname + "-service" $sku = "Standard" $partitionCount = 1 $replicaCount = 1 $hostingMode = "Default" ...
0
4433.ps1
function Uninstall-Script { [CmdletBinding(DefaultParameterSetName='NameParameterSet', SupportsShouldProcess=$true, HelpUri='https://go.microsoft.com/fwlink/?LinkId=619789')] Param ( [Parameter(ValueFromPipelineByPropertyName=$true, Manda...
0
3163.ps1
function Get-GraphAPIToken { param ( [Parameter(Mandatory=$true)] $TenantName, [Parameter(Mandatory=$false)] $UserName, [Parameter(Mandatory=$false)] $Password, [Parameter(Mandatory=$false)] ...
0
sample_35_6.ps1
# # Module manifest for module 'OCI.PSModules.Email' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Email.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Compatible...
0
sample_27_64.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Microsoft.PowerShell.Management\Get-Item function:Clear-Host | Microsoft.PowerShell.Management\Set-Item function:__clearhost function Clear-Host { [Alias('cls')] param() __clearhost if ($host.Runspace.LanguageMode -eq ...
0
sample_56_59.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
1900.ps1
if(-not ("netDumbster.smtp.SimpleSmtpServer" -as [type])) { Register-PackageSource -Name nuget.org -Location https://api.nuget.org/v3/index.json -ProviderName NuGet -ErrorAction SilentlyContinue $nugetPackage = "netDumbster" Install-Package -Name $nugetPackage -ProviderName NuGet -Scope CurrentUser -For...
0
3395.ps1
function Test-SetChefExtensionBasic { $rgname = Get-ComputeTestResourceName $loc = Get-ComputeVMLocation $TestOutputRoot = [System.AppDomain]::CurrentDomain.BaseDirectory; try { New-AzureRmResourceGroup -Name $rgname -Location $loc -Force; $vmsize = 'S...
0
sample_38_95.ps1
# Get the version of the Torizon IDE Extension from package.json $env:TEST_EXTENSION_VERSION = ((Get-Content "package.json" -Raw) | ConvertFrom-Json).version $env:TEST_VSCODE_CLEANUP = $true # Start the tests from a clean environment, unless explictly setting to false # the env variable if ($env:TEST_VSCODE_CLEANUP -E...
0
sample_31_87.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
Get-NICSettings.ps1
# Get-NICSettings by Hugo Peeters of www.peetersonline.nl ######################################################### $serverName = Read-Host "Enter server name" $NicConfig = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $serverName $myCol = @() ForEach ($Nic in $NicConfig) { If ($Nic.IPAddr...
0
2539.ps1
$sessions = gc "E:\dexma\logs\computers.txt" | New-PSSession $block = { gwmi -query "select * from Win32_Volume where DriveType='3' AND DriveLetter='C:'" | Select ` @{Name="Server";Expression={$ENV:COMPUTERNAME}},` @{Name="Device";Expression={$_.DriveLetter}},` @{Name="MountPoint";Expression={$DI...
0
sample_25_78.ps1
param( [string]$Path ) $isFile = Test-Path -Path $Path -PathType Leaf $reportPath = Get-ChildItem -Path (Split-Path -Path $Path) -Filter *.html | Select-Object -First 1 -ExpandProperty FullName $command = Get-Command -Name New-BurntToastNotification -ErrorAction SilentlyContinue function ShowNotication ...
0
1309.ps1
function Get-CPathProvider { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $Path ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $pathQualifier = Split-Path -Qualifier $Pa...
0
2728.ps1
Get-WmiObject -namespace root\Microsoft\SecurityClient -Class AntimalwareHealthStatus
0
sample_32_90.ps1
[CmdletBinding()] param ( [string]$OutFile, [string]$AltDownload, [string]$Proxy, [string]$AltHisEndpoint ) $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' $refVersion = [version] '4.5' $provider = 'Microsoft.HybridCompute' # Error codes used by azcmagent are in r...
0
sample_66_6.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 = '89.0.0' # Supported PSEditions Compatib...
0
New-ScriptCmdlet.ps1
# http://blogs.msdn.com/powershell/archive/2008/05/09/fun-with-script-cmdlets.aspx ######################################################################################## # function New-ScriptCmdlet() { [CmdletBinding(DefaultParameterSetName="Type")] PARAM( [Parameter(ParameterSetName="Type",ValueFromPipeline=...
0
sample_9_63.ps1
ConvertFrom-StringData @' id_intersitemessagingstatecheck_st=Intersite Messaging service is stopped or disabled and this may cause problems related to (DFSN) site coverage calculations '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBg...
0
332.ps1
function Join-PSFPath { [CmdletBinding()] param ( [Parameter(Mandatory = $true, Position = 0)] [string] $Path, [Parameter(ValueFromRemainingArguments = $true)] [string[]] $Child, [switch] $Normalize ) $resultingPath = $Path foreach ($childItem in $Child) { $resultingPath = Join-Path -...
0
Get-WebSite_2.ps1
function Get-WebPage { <# .SYNOPSIS Downloads web page from site. .DESCRIPTION Downloads web page from site and displays source code or displays total bytes of webpage downloaded .PARAMETER Url URL of the website to test access to. .PARAMETER UseDefaultCredentials Use the currently authentica...
0
sample_49_32.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 = '81.0.0' # Supported PSEditions CompatiblePS...
0
Security group monitor_1.ps1
#Get group membership for a list of security #groups and export to an XML for comparison #against baseline. # $script:WorkingDirectory = split-path $myinvocation.Mycommand.Definition -parent Function Re-Baseline { #First, declare array and hashtable. $securitygroups = @() $table = @{} #Import Security...
0
2392.ps1
$ThisModule = "$($MyInvocation.MyCommand.Path -replace "\.Tests\.ps1$", '').psm1" $ThisModuleName = (($ThisModule | Split-Path -Leaf) -replace ".psm1") Get-Module -Name $ThisModuleName -All | Remove-Module -Force Import-Module -Name $ThisModule -Force -ErrorAction Stop @(Get-Module -Name $ThisModuleName).where({ $...
0
sample_66_47.ps1
# # Module manifest for module 'OCI.PSModules.Cloudguard' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudguard.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEditions ...
0
Make a phone call.ps1
<# .NOTES AUTHOR: Sunny Chakraborty(sunnyc7@gmail.com) WEBSITE: http://tekout.wordpress.com VERSION: 0.1 CREATED: 17th April, 2012 LASTEDIT: 17th April, 2012 Requires: PowerShell v2 or better .CHANGELOG 4/17/2012 Try passing powershell objects to PROTO API and pass the variables to .JS file P...
0
4311.ps1
function SuiteSetup { Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue $script:PSGetLocalAppDataPath = Get-PSGetLocalAppDataPath $script:DscTestScript = "DscTestScript" Install-NuGe...
0
2292.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Specify the user principal name to amend the password expire policy on")] [ValidateNotNullOrEmpty()] [ValidatePattern("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$")] [string]$UserPrincipalName, [parameter(Manda...
0
2300.ps1
$Csv = Import-Csv "C:\Dropbox\Powershell\scripts\PrinterModelAndIPs.csv" $server_printers = Get-WMIObject -Class "Win32_Printer" -NameSpace "root\cimv2" -computername ctxps foreach ($row in $Csv) { $model = $row.Model; $ip = $row.IP; $printer = $server_printers | ? {$_.comment -eq $ip } if ($printer)...
0
sample_11_60.ps1
#************************************************ # TS_VeritasVXIOBadConfigFlags.ps1 # Version 1.0.1 # Date: 5/16/2012 # Author: v-kaw # Description: [Idea ID 3919] [Windows] Create Shadow Copy fail only on VERTIAS storage foundation volume # Rule number: 3919 # Rule URL: //sharepoint/sites/rules/Rule%20Submi...
0