filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
4113.ps1
Function GetHKUBinaryKeyValue ($RegKey, $KeyVal) { Set-Variable -Name HKUsers -Scope Local -Force Set-Variable -Name i -Scope Local -Force Set-Variable -Name Key -Scope Local -Force Set-Variable -Name SubKey -Scope Local -Force Set-Variable -Name SubKeys -Scope Local -Force Set-Variable -Name Temp -Scope Loca...
0
Get Twitter RSS Feed_4.ps1
param ([String] $ScreenName) $client = New-Object System.Net.WebClient $idUrl = "https://api.twitter.com/1/users/show.json?screen_name=$ScreenName" $data = $client.DownloadString($idUrl) $start = 0 $findStr = '"id":' do { $start = $data.IndexOf($findStr, $start + 1) if ($start -gt 0) { $s...
0
List AD Computers CSV.ps1
$datetime = Get-Date -Format "yyMMdd-HHmm" $objDomain = New-Object System.DirectoryServices.DirectoryEntry [string]$DomainName = $objDomain.name $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = $objDomain $objSearcher.Filter = ("(objectCategory=computer)") $Results ...
0
1768.ps1
if($IsWindows) { Import-Module (Join-Path -Path $PSScriptRoot 'certificateCommon.psm1') -Force } $currentUserMyLocations = @( @{path = 'Cert:\CurrentUser\my'} @{path = 'cert:\currentuser\my'} @{path = 'Microsoft.PowerShell.Security\Certificate::CurrentUser\My'} @{path = 'Mic...
0
3260.ps1
class MiddlewareHook { [string]$Name [string]$Path MiddlewareHook([string]$Name, [string]$Path) { $this.Name = $Name $this.Path = $Path } [CommandExecutionContext] Execute([CommandExecutionContext]$Context, [Bot]$Bot) { try { $fileContent = Get-Content -Path $t...
0
4456.ps1
Save-PSResource 'TestModule' Save-PSResource -name 'TestModule' Save-PSResource 'TestModule' -Type 'Module' Save-PSResource 'TestModule' -Type 'Module', 'Script', 'Library' Save-PSResource 'TestModule1', 'TestModule2', 'TestModule3' Save-PSResource 'TestModule' -MinimumVersion '1.5.0' Save-PSResource '...
0
sample_31_17.ps1
# Copyright (c) Microsoft Corporation. # # This script will # 1. Examine Azcmagent configuration # 2. Check if automatic upgrade is enabled # 3. Check if desired version is greater than existing agent version # 4. Check if automatic upgrade has already been attempted before # 5. Get the download l...
0
2614.ps1
Import-Module C:\git-repositories\PowerShell\MSFVMLab\MSFVMLab.psm1 -Force $LabConfig = Get-Content C:\git-repositories\PowerShell\MSFVMLab\LabVMS.json | ConvertFrom-Json $WorkingDirectory = $LabConfig.WorkingDirectory $DomainCred = Import-Clixml "$WorkingDirectory\vmlab_domainadmin.xml" $sqlsvccred = Import-Clixml "...
0
sample_29_84.ps1
$url = $args[0] Write-Host "Downloading Microsoft Edge" $wc = New-Object net.webclient $msiInstaller = "$env:temp\microsoft-edge-stable.msi" $wc.Downloadfile($url, $msiInstaller) Write-Host "Installing Microsoft Edge" $arguments = "/i `"$msiInstaller`" /quiet" Start-Process msiexec.exe -ArgumentList $arguments -Wait ...
0
1052.ps1
param( $InputObject ) $InputObject $env:USERNAME
0
sample_62_82.ps1
# # Module manifest for module 'OCI.PSModules.Aidocument' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aidocument.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditions ...
0
2846.ps1
function LoadModules { $currentConfig = $psake.context.peek().config if ($currentConfig.modules) { $scope = $currentConfig.moduleScope $global = [string]::Equals($scope, "global", [StringComparison]::CurrentCultureIgnoreCase) $currentConfig.modules | ForEach-Object { resol...
0
Copy-MAGig_1.ps1
function Copy-MAGig { param( [string]$src, [string]$dest, $exclude, [int]$width = 100, # used with the -log switch to format the log, [int]$ident = 2, # dito [switch]$log, # if -verbose had a nice format and its output cou...
0
GPRS Online log_3.ps1
<# .SYNOPSIS Get-GprsTime (V3.0 Update for Windows 7) Check the total connect time of any GPRS devices from a specified date. Use Get-Help .\\Get-GprsTime -full to view Help for this file. .DESCRIPTION Display all the GPRS modem Event Log entries. While applications issued by the mobile phone manufacturers wi...
0
1947.ps1
Describe "Get-Unique DRT Unit Tests" -Tags "CI" { It "Command get-unique works with AsString switch" { $inputArray = "aa","aa","Aa","ba","BA","BA" $results = $inputArray | Get-Unique -AsString $results.Length | Should -Be 4 $results[0] | Should -BeExactly "aa" $results[1]...
0
Send-Growl 2.0.ps1
## This is the first version of a Growl module (just dot-source to use in PowerShell 1.0) ## Initially it only supports a very simple notice, and I haven't gotten callbacks working yet ## Coming soon: ## * Send notices to other PCs directly ## * Wrap the registration of new messages ## * Figure out the stupid ...
0
1519.ps1
function Assert-ContainsLike { [CmdletBinding()] param( [Parameter(Position=0)] [object] $Haystack, [Parameter(Position=1)] [object] $Needle, [Parameter(Position=2)] [string] $Message ) ...
0
sample_26_96.ps1
# # Module manifest for module 'OCI.PSModules.Adm' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Adm.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEd...
0
sample_49_33.ps1
######################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # Localized PackageManagement.Resources.psd1 # ######################################################################################### ConvertFrom-StringDa...
0
1702.ps1
[CmdletBinding()] Param( [Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [PSCredential]$Credential ) $ProjectRoot = Resolve-Path "$PSScriptRoot\.." $ModuleRoot = Split-Path (Resolve-Path "$ProjectRoot\*\*.psd1") $ModuleName = Split-Path $ModuleRoot -Leaf $ModulePsd = (Resolve-Path "$ProjectRoot\*...
0
1504.ps1
function Assert-Null { [CmdletBinding()] param( [Parameter(Position=0)] [object] $Value, [Parameter(Position=1)] [string] $Message ) Set-StrictMode -Version 'Latest' if( $Value -ne $null ) { Fail "Va...
0
3290.ps1
enum DiscordPremiumType { NitroClassic = 1 Nitro = 2 } enum DiscordVisibilityType { None = 0 Everyone = 1 } class DiscordUser : Person { [string]$Discriminator [string]$Avatar [bool]$IsBot [bool]$IsMfaEnabled [string]$Locale ...
0
4008.ps1
$resourceGroupName = "PSCmdletTest-RG" $automationAccountName = "PSCmdletTestAccount01" function AssertContains { param([string] $str, [string] $substr, [string] $message) if (!$message) { $message = "Assertion failed because '$str' does not contain '$substr'" } if (!$st...
0
sample_52_99.ps1
# # Module manifest for module 'Microsoft.SME.RegistryEditor' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.RegistryEditor.psm1' # Version number of this module. ModuleVersion = '4.10.0' # Supported PSEditions # CompatiblePSEditions = @() # ID ...
0
sample_58_7.ps1
$global:VerbosePreference = 'Continue' Function Write-Custom-Output { Param([string]$message) $date = Get-Date $newMessage = '[{0}] {1}' -f $date, $message Write-Output $newMessage } trap [Exception] { Write-Custom-Output "WARN: Terminating error encountered on line $($_.Invoc...
0
sample_11_24.ps1
##---------------------------------------------------------------------------- ## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved. ##---------------------------------------------------------------------------- # Import string constants . ./StringConstants.ps1 Stop-Service -Name $ServiceConsta...
0
sample_31_83.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagementhub' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagementhub.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported P...
0
sample_42_86.ps1
# # Module manifest for module 'OCI.PSModules.Containerinstances' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Containerinstances.dll' # Version number of this module. ModuleVersion = '73.1.0' # Suppo...
0
3748.ps1
$tagName = "testtag" $tagValue = "testvalue" $KeyVaultResourceType = "Microsoft.KeyVault/vaults" $KeyVaultApiVersion = "2015-06-01" function Test_CreateNewVault { Test-CreateNewVault $global:resourceGroupName $global:location $tagName $tagValue } function Test_CreateNewPremiumVaultEnabledForDeployment { Test...
0
sample_6_56.ps1
# # Module manifest for module 'OCI.PSModules.Delegateaccesscontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Delegateaccesscontrol.dll' # Version number of this module. ModuleVersion = '93.0.0' #...
0
sample_0_62.ps1
<# .SYNOPSIS Scenario module for collecting Microsoft Remote Desktop Smart Card related data .DESCRIPTION Collect Smart Card related troubleshooting data .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version Feedback : https://aka.ms...
0
3987.ps1
function ServiceBusPaginationTests { $location = Get-Location $resourceGroupName = getAssetName "RGName-" $namespaceName = getAssetName "Namespace1-" $nameQueue = getAssetName "Queue-" $nameTopic = getAssetName "Topic-" $subName = getAssetName "Subscription-" $ruleName = ...
0
Report movie lib. stats.ps1
function getmoviestat ($drives) { $drives=$drives | %{if ($_.systemname -eq $env:computername) {add-member -inputobject $_ -name BRs -membertype noteproperty -value ( gci -ea 0 "$($_.name)\\media\\BR movies\\*" -include *.mkv,*.m2ts ) -passthru } else {add-member -inputobject $_ -name BRs -membertype noteproperty ...
0
sample_52_41.ps1
@{ GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" NestedModules="Microsoft.PowerShell.Commands.Management.dll" HelpInfoURI = 'ht...
0
sample_59_6.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
Remove-DownloadFlag.ps1
function Set-DownloadFlag { <# .Synopsis Sets the ZoneTransfer flag which marks a file as being downloaded from the internet. .Description Creates a Zone.Identifier alternate data stream (on NTFS file systems) and writes the ZoneTransfer marker .Parameter Path The file you wish to block .Parameter Passthru ...
0
sample_2_26.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
sample_7_93.ps1
# # Module manifest for module 'OCI.PSModules.Common' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Common.dll' # Version number of this module. ModuleVersion = '93.0.0' # Supported PSEditions Compatib...
0
sample_16_81.ps1
ConvertFrom-StringData @' progressbar_id_crmassembliesdetectedingac=Searching Global Assembly Cache For Microsoft Dynamics CRM Assemblies progressbar_id_crmassembliesdetectedingacdesc=Searching Global Assembly Cache For Microsoft Dynamics CRM Assemblies '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIo...
0
2100.ps1
Describe "Error position Tests" -Tags "CI" { BeforeAll { $switch_condition_script = @' $test = 1 switch ($null[0]) { "a" {}; } '@ $for_expression_initializer_script = @' $test = 1 for ($null[0]; $test -gt 1;) { } '@ $for_pipeline_initializer_script = @' $test = 1 for (Test-Path ...
0
4124.ps1
cls Set-Variable -Name a -Scope Global -Force Set-Variable -Name Output -Scope Global -Force Function AddRemovePrograms($KeyName, $DisplayName, $Version){ New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT Set-Variable -Name AddRemKey -Scope Local -Forc...
0
1279.ps1
if( -not (Get-Command -Name 'Get-WindowsFeature*' | Where-Object { $_.ModuleName -ne 'Carbon' }) ) { function Uninstall-CWindowsFeature { [CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName='ByName')] param( [Parameter(Mandatory=$true,ParameterSetName='ByNam...
0
sample_45_43.ps1
# # Module manifest for module 'OCI.PSModules.Waa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waa.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_33_7.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
6a35f0a2-b19c-4518-8c2b-56793070490d.ps1
[sourcecode language="css"] ## # ----------------------------------------------------- function Release-Ref ($ref) { ([System.Runtime.InteropServices.Marshal]::ReleaseComObject( [System.__ComObject]$ref) -gt 0) [System.GC]::Collect() [System.GC]::WaitForPendingFinalizers() } # --------------------------...
0
1681.ps1
$dnsservers = "192.168.1.100","192.168.1.1" $computers = Get-Content ComputerList.txt foreach ($comp in $computers) { $adapters = gwmi -q "select * from win32_networkadapterconfiguration where ipenabled='true'" -ComputerName $comp foreach ($adapter in $adapters) { $adapter.setDNSServerSearchOrder($dnsservers) } ...
0
Get-PSPVersion.ps1
$ServerInstance = "YourCMSServerInstance" $query = @" SELECT DISTINCT s.name FROM msdb.dbo.sysmanagement_shared_registered_servers s JOIN msdb.dbo.sysmanagement_shared_server_groups g ON s.server_group_id = g.server_group_id "@ $servers = sqlcmd -S "$ServerInstance" -d "master" -Q "SET NOCOUNT ON; $query" -h -...
0
VMWare Quick Migration_1.ps1
######################################### #Name: VMWare Quick Migration Function #Author: Justin Grote <jgrote NOSPAMAT enpointe DOT com> #Credit: Inspired by Mike DiPetrillo's Quick Migration Script: http://www.mikedipetrillo.com/mikedvirtualization/2008/10/quick-migration-for-vmware-the-power-of-powershell.html #...
0
4399.ps1
function Get-PackageManagementProviderName { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [Uri] $Location ) $PackageManagementProviderName = $null $loc = Get-LocationString -LocationUri $Location $providers = PackageManag...
0
sample_5_13.ps1
ConvertFrom-StringData @' id_ctsrpc=Remote Procedure Call (RPC) id_ctsrpcdescription=Collects information about Remote Procedure Call (RPC). '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # K...
0
2432.ps1
[CmdletBinding()] [OutputType('System.DirectoryServices.ActiveDirectorySecurity')] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [string[]]$Hostname, [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [string]$DomainName = (Get-ADDomain).Forest,...
0
sample_15_30.ps1
# # Module manifest for module 'OCI.PSModules.Dashboardservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dashboardservice.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported...
0
Audit Script_3.ps1
##################################################### # # # Audit script by Alan Renouf - Virtu-Al # # Blog: http://teckinfo.blogspot.com/ # # # # Usage: Audit.ps1 'pathtolistofservers' # # # # The file is optional and needs to be a # ...
0
Send-Growl _3.0.ps1
## This is the first version of a Growl module (just dot-source to use in PowerShell 1.0) ## v 1.0 supports a very simple notice, and no callbacks ## v 2.0 supports registering multiple message types ## supports callbacks ## v 2.1 redesigned to be a module used from apps, rather than it's own "PowerGrowler" a...
0
sample_27_82.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 = '83.2.0' # Supported PSE...
0
sample_45_28.ps1
function PSConsoleHostReadLine { [System.Diagnostics.DebuggerHidden()] param() ## Get the execution status of the last accepted user input. ## This needs to be done as the first thing because any script run will flush $?. $lastRunStatus = $? Microsoft.PowerShell.Core\Set-StrictMode -Off...
0
sample_39_22.ps1
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.Debug = void 0; const switch_1 = require("../switch"); class Debug extends switch_1.Switch { switch = 'debug'; } exports.Debug = Debug; //# sourceMappingURL...
0
sample_22_46.ps1
# region Generated # ---------------------------------------------------------------------------------- # 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 obt...
0
sample_27_36.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservice' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservice.dll' # Version number of this module. ModuleVersion = '83.1.0' # Sup...
0
2007.ps1
param([switch]$useModule, [string]$VHDPath) function CreateVHD ($VHDPath, $Size) { $drive = (New-VHD -path $vhdpath -SizeBytes $size -Dynamic | ` Mount-VHD -Passthru | ` get-disk -number {$_.DiskNumber} | ` Initialize-Disk -PartitionStyle MBR -PassThru | ` ...
0
sample_26_57.ps1
@{ GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 " Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" ModuleToProcess="PSDiagnostics.psm1" Func...
0
Get-LastReboot.ps1
Param ( [Parameter(Position=0,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$true)] [alias("Name","ComputerName")]$Computer=@($env:ComputerName), [switch] $Output ) process{ if (Test-Connection -ComputerName $Computer -Count 1 -Quiet){ write-host "Getting Uptime for $Computer" -foregroundcolor green...
0
1773.ps1
Describe "SecureString conversion tests" -Tags "CI" { BeforeAll { $string = "ABCD" $secureString = [System.Security.SecureString]::New() $string.ToCharArray() | foreach-object { $securestring.AppendChar($_) } } It "using null arguments to ConvertFrom-SecureString produces an excep...
0
sample_0_65.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
sample_46_34.ps1
##------------------------------------------------------------------ ## <copyright file="ObservabilityDeploymentHelper.psm1" company="Microsoft"> ## Copyright (C) Microsoft. All rights reserved. ## </copyright> ##------------------------------------------------------------------ #region Imports Import-Modu...
0
1259.ps1
function Format-CADSearchFilterValue { [CmdletBinding()] param( [Parameter(Mandatory=$true)] [string] $String ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $string = $string.Repl...
0
sample_54_98.ps1
# # Module manifest for module 'OCI.PSModules.Fusionapps' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Fusionapps.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEditions ...
0
sample_5_11.ps1
<# .SYNOPSIS Biztalk Integration module for collecting traces .DESCRIPTION Define ETW traces for Windows Biztalk Integration components Add any custom tracing functinaliy for tracing Biztalk components For Developers: 1. Component test: .\TSS.ps1 -Start -INT_TEST1 2. Scenario test: .\TSS.ps1 -start -Sc...
0
8.ps1
$global:GitMissing = $false $requiredVersion = [Version]'1.7.2' $script:GitVersion = $requiredVersion if (!(Get-Command git -TotalCount 1 -ErrorAction SilentlyContinue)) { Write-Warning "git command could not be found. Please create an alias or add it to your PATH." $Global:GitMissing = $true return } if...
0
2959.ps1
properties { $my_property = $p1 + $p2 } task default -depends TestParams task TestParams { Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}" }
0
sample_56_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
e0f06189-086f-4d62-a6c3-5a7e1f3ca246.ps1
$computers = gc "listofservers.txt" Get-WmiObject Win32_NetworkAdapterConfiguration -computer $computers -filter "IPEnabled ='true'" | select __Server,IPAddress
0
sample_57_44.ps1
#This script converts securestring to plaintext param( [Parameter(Mandatory, ValueFromPipeline)] [System.Security.SecureString] ${SecureString} ) $ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) try { $plaintext = [System.Runtime.InteropServices.Marshal]::...
0
1593.ps1
$DebugPreference = "SilentlyContinue" $UserName = (Get-Item Env:\USERNAME).Value $origComputerName = (Get-Item Env:\COMPUTERNAME).Value $ComputerName = Read-Host 'What is the computer name?' $FileName = (Join-Path -Path ((Get-ChildItem Env:\USERPROFILE).value) -ChildPath $ComputerName) + ".html" $style = @" ...
0
sample_30_85.ps1
########################################################### # # 'GCArcService' module # ########################################################### $ErrorActionPreference = 'Stop' Set-StrictMode -Version Latest Import-Module "$PSScriptRoot\ServiceHelper.psm1" $script:GCInstallPath = "$PSScriptRoot\..\..\...
0
sample_24_67.ps1
# Copyright (C) Intel Corporation, 2007 - 2021 All Rights Reserved. .$psScriptRoot\Invoke-AMTPowerManagement.ps1 .$psScriptRoot\Invoke-AMTForceBoot.ps1 .$psScriptRoot\Invoke-AMTForceBoot_OCR.ps1 .$psScriptRoot\Set-AMT3PDS.ps1 .$psScriptRoot\Get-AMT3PDS.ps1 .$psScriptRoot\Clear-AMT3PDS.ps1 .$psScriptRoot\set-AM...
0
Set-AttachedProperty.ps1
#function Set-AttachedProperty { [CmdletBinding()] PARAM( [Parameter(Position=0,Mandatory=$true) [System.Windows.DependencyProperty] $Property , [Parameter(Mandatory=$true,ValueFromPipeline=$true) $Element ) DYNAMICPARAM { $paramDictionary = new-object System.Management.Automation.RuntimeDe...
0
sample_58_8.ps1
@{ GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 " Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" ModuleToProcess="PSDiagnostics.psm1" Func...
0
sample_35_40.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_21_75.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ [CmdletBinding(DefaultParamet...
0
sample_37_70.ps1
# # Module manifest for module 'OCI.PSModules.Rover' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Rover.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Compatible...
0
sample_28_10.ps1
@{ ModuleVersion = '7.0.1' GUID = '3859ddf6-1713-4701-adf3-477aeaa06333' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Microsoft® Corporation. All rights reserved." NestedModules="Newtonsoft.Json.dll" } # SIG # Begin signature block # MIInzgYJKoZIhvcNAQcCoIInvzCCJ7sCAQExDz...
0
3670.ps1
function Test-AdvancedDataSecurityPolicyTest { $testSuffix = getAssetName Create-AdvancedDataSecurityTestEnvironment $testSuffix $params = Get-SqlAdvancedDataSecurityTestEnvironmentParameters $testSuffix try { $policy = Get-AzSqlServerAdvancedDataSecurityPolicy -ResourceGroupName $params.rgn...
0
sample_1_10.ps1
ConvertFrom-StringData @' id_powercfg=Obtaining Power Manager Information id_powercfgdesc=Running powercfg.exe to obtain power settings information '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JN...
0
TruncatePath_2.ps1
### # TruncatePath # Version 1.0.6 (05 Nov 2008) # Description: Replaces long provider paths in the prompt with ellipses # Notes: Place in your profile # # By Mike Hays, http://www.mike-hays.net ### $maxPathLength = 40 $showFullPath = $false Function Prompt { $currentPath = (Get-Location).Path ...
0
sample_59_44.ps1
window['excelUiSlice20Sprite'] = {"icons":[{"type":"svg","id":"TrashCan_16","children":[{"type":"path","className":"OfficeIconColors_HighContrast","d":"M 768 1664 h -128 v -1152 h 128 m 256 1152 h -128 v -1152 h 128 m 256 1152 h -128 v -1152 h 128 m 512 -256 h -128 v 1604 q 0 39 -15 73 q -15 35 -40 60 q -26 26 -60 40 q...
0
sample_12_46.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\typescript@5.3.3\node_modules\typescript\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\typ...
0
2729.ps1
$ErrorActionPreference = "SilentlyContinue" $o = "" | Select-Object IISInstalled if ((Get-ItemProperty HKLM:\Software\Microsoft\InetStp\Components\).W3SVC) { $o.IISInstalled = "True" } else { $o.IISInstalled = "False" } $o
0
sample_63_97.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_9_44.ps1
#************************************************ # DC_HyperVReplica.ps1 # Version 1.0 - 7/24/14 # Author: jasonf #******************************************************* Trap [Exception] { $Script:ExceptionMessage = $_ "[info]: Exception occurred." | WriteTo-StdOut "[info]: Exception.Message $E...
0
Unlock & Password Reset.ps1
<# Author: Matt Schmitt Date: 11/28/12 Version: 1.0 From: USA Email: ithink2020@gmail.com Website: http://about.me/schmittmatt Twitter: @MatthewASchmitt Description A script for forwarding and unforwarding email for users in Office 365. #> Import-Module ActiveD...
0
SyntaxHighlighter Brush_2.ps1
/** * PowerShell 2.0 Brush for highlighter 2.0 * * SyntaxHighlighter http://alexgorbatchev.com/wiki/SyntaxHighlighter * * @version * 2.1.0 (April 07 2009) * * @copyright * Copyright (C) 2008-2009 Joel Bennett http://HuddledMasses.org/ * * @license * This file is for SyntaxHighlighter. * ...
0
sample_54_25.ps1
# # Module manifest for module 'OCI.PSModules.Objectstorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Objectstorage.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEdi...
0
sample_44_28.ps1
@{ GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Start-Transcript", "Stop-Transcript" ...
0
sample_48_95.ps1
$url = $args[0] Write-Host "Downloading Microsoft Edge Beta" $wc = New-Object net.webclient $msiInstaller = "$env:temp\microsoft-edge-beta.msi" $wc.Downloadfile($url, $msiInstaller) Write-Host "Installing Microsoft Edge Beta" $arguments = "/i `"$msiInstaller`" /quiet" Start-Process msiexec.exe -ArgumentList $argument...
0
sample_14_74.ps1
# # Module manifest for module 'OCI.PSModules.Bds' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Bds.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions CompatiblePSEd...
0
Array-Randomizer.ps1
#====================================================================================== # File Name : Array-Randomizer.ps1 # Original Author : Kenneth C. Mazie (kcmjr at kcmjr.com) # : # Description : Originally written to regenerate the init.txt file for server # ...
0
Convert-CBZ2CBR.ps1
########################################################################### # # NAME: Convert-CBZ2CBR.ps1 # # AUTHOR: Neiljmorrow # EMAIL: Neiljmorrow@gmail.com # # NOTE: Written to use command line version of 7zip (http://7zip.com) # from the default install location. Please modify the path below # if necessa...
0
sample_19_40.ps1
ConvertFrom-StringData @' EditorCommandExists=Editor command '{0}' already exists, skipping. EditorCommandImporting=Importing editor command '{0}'. MissingEditorContext=Unable to obtain editor context. Make sure PowerShell Editor Services is running and then try the command again. '@ # SIG # Begin signature bloc...
0
220.ps1
[CmdletBinding()] PARAM ( [Parameter(Mandatory = $true, HelpMessage = "You must specify the Sender Email Address")] [ValidatePattern("[a-z0-9! [String]$EmailFrom, [Parameter(Mandatory = $true, HelpMessage = "You must specify the Destination Email Address")] [ValidatePattern("[a-z0-9! [Strin...
0