filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
Join-Objects 3.0.ps1
<# .Synopsis Performs a join of all properties from two objects .Description Joins the properties of two or more objects together to produce a single custom object Support scriptblock evaluation, and joining objects from the pipeline .Example ls | Join-Object { $_ | Select BaseName } { $_.LastWrite...
0
sample_34_4.ps1
# # Module manifest for module 'OCI.PSModules.Limits' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Limits.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compatib...
0
sample_0_84.ps1
#************************************************ # TS_HyperVSCSIDiskEnum.ps1 # Version 1.0.1 # Date: 03-08-2011 # Author: Andre Teixeira - andret # Description: This checks the number of subkeys under HKLM\System\CurrentControlSet\Enum\SCSI\Disk&Ven_Msft&Prod_Virtual_Disk # If it is large (more th...
0
sample_53_56.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 = '77.0.0' # Sup...
0
Run-Defrag.ps1
# Run-Defrag # Defragments the targeted hard drives. # # Args: # $server: A target Server 2003 or 2008 system # $drive: An optional drive letter. If this is blank then all # drives are defragmented # $force: If this switch is set then a defrag will be forced # even if the drive is lo...
0
977.ps1
$subscriptionId = '<SubscriptionID>' $randomIdentifier = $(Get-Random) $resourceGroupName = "myResourceGroup-$randomIdentifier" $location = "West US 2" $adminLogin = "azureuser" $password = "PWD27!"+(New-Guid).Guid $serverName = "mysqlserver-$randomIdentifier" $databaseName = "mySampleDatabase" $drLocation = "East US ...
0
Start-Process.ps1
function Start($app,$param) { if($param) { [Diagnostics.Process]::Start( $app, $param ) } else { [Diagnostics.Process]::Start( $app ) } }
0
chkhash_10.ps1
# calculate SHA512 of file. function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider]; $hashAlgorithm = new-object $cryptoServiceProvider $stream = $file.Open...
0
sample_25_56.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
2023.ps1
if ($IsWindows) { $typeDef = @' using System; using System.Globalization; using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Management.Automation.Host; namespace TestRunner { public class DummyHost : PSHost, IHostSupportsInterac...
0
Export-PSCredential_3.ps1
# Author: Hal Rottenberg <hal@halr9000.com> # Url: http://halr9000.com/article/tag/lib-authentication.ps1 # Purpose: These functions allow one to easily save network credentials to disk in a relatively # secure manner. The resulting on-disk credential file can only [1] be decrypted # by the same user account...
0
2914.ps1
Framework "1.1.0" task default -depends MsBuild task MsBuild { if ( $IsMacOS -OR $IsLinux ) { $output = &dotnet build -version -nologo 2>&1 Assert ($output -NotLike "15.1") '$output should contain 15.1' } }
0
716.ps1
function New-RsRestFolder { [CmdletBinding()] param( [Parameter(Mandatory = $True)] [string] $RsFolder, [Parameter(Mandatory = $True)] [Alias('Name')] [string] $FolderName, [string] $ReportPortalUri, [Alias('ApiVersion')...
0
2860.ps1
function Properties { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [scriptblock]$properties ) $psake.context.Peek().properties.Push($properties) }
0
1293.ps1
function Assert-WindowsFeatureFunctionsSupported { [CmdletBinding()] param( ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState if( $null -eq $windowsFeaturesNotSupported ) { $script:useServerManager = $nul...
0
Bulk Storage vMotion .ps1
#======================================================================== # Created on: 5/31/2012 4:31 PM # Created by: Clint Jones # Organization: Virtually Genius! # Filename: StorageVMotion-BulkVMs #======================================================================== #Import Plugins and Connect t...
0
Get-WebFile 3.0.ps1
## Get-WebFile.ps1 (aka wget for PowerShell) ############################################################################################################## ## Downloads a file or page from the web ## History: ## v3 - rewritten completely using HttpWebRequest + HttpWebResponse to figure out the file name, if possibl...
0
Get Twitter RSS Feed.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
VMWare Quick Migration_3.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
sample_36_1.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
1034.ps1
Set-StrictMode -Version Latest & (Join-Path $PSScriptRoot Carbon\Import-Carbon.ps1 -Resolve) $websitePath = Join-Path $PSScriptRoot Website -Resolve Install-IisWebsite -Name 'get-carbon.org' -Path $websitePath -Bindings 'http/*:80:' Grant-Permission -Identity Everyone -Permission ReadAndExecute -Path $...
0
3951.ps1
function Test-GetAvailableAliasList { $location = Get-ProviderLocation ResourceManagement try { $results = Get-AzAvailableServiceAlias -Location $location; Assert-NotNull $results; } finally { Clean-ResourceGroup $rgname } }
0
2194.ps1
[CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, ParameterSetName="Recurse", HelpMessage="Site server where the SMS Provider is installed")] [parameter(Mandatory=$true, ParameterSetName="CSV")] [parameter(Mandatory=$true, ParameterSetName="Static")] [ValidateNotNullOrEmpt...
0
sample_1_48.ps1
[dynamic, provider("dcismprovider"), Association] class DCIM_LocalRBAServiceAffectsElementRole : CIM_ServiceAffectsElement { [ Description ("The Managed Element that is affected by the Service."), Key, Override ("AffectedElement") ] CIM_ManagedElement REF AffectedElement;...
0
sample_18_93.ps1
#Volumetric soil moisture content '260185' = { discipline = 2 ; parameterCategory = 0 ; parameterNumber = 9 ; } #Upper layer soil temperature '260201' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 1 ; } #Upper layer soil moisture '260202' = { discipline = 2 ; parameterCategory = 3 ; ...
0
2765.ps1
if (Test-Path "$env:SystemRoot\Autorunsc.exe") { & $env:SystemRoot\Autorunsc.exe /accepteula -a * -c -h -s '*' 2> $null | ConvertFrom-Csv | ForEach-Object { $_ } } else { Write-Error "Autorunsc.exe not found in $env:SystemRoot." }
0
sample_55_93.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 = '85.2.0' # Supported PSEditions ...
0
1974.ps1
function Test-UnblockFile { { Get-Content -Path $testfilepath -Stream Zone.Identifier -ErrorAction Stop | Out-Null } | Should -Throw -ErrorId "GetContentReaderFileNotFoundError,Microsoft.PowerShell.Commands.GetContentCommand" } Describe "Unblock-File" -Tags "CI" { BeforeAll { if ( ! $IsWindo...
0
sample_36_48.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
ScheduleGPOBackups_1.ps1
Import-Module grouppolicy #region ConfigBlock # What domain are we going to backup GPOs for? $domain = "mydomain.com" # Where are we going to store the backups? $gpoBackupRootDir = "c:\\gpoBackups" # As I plan to do a new backup set each month I'll setup the directory names to reflect # the year and month in a n...
0
Get-Scope_4.ps1
#function Get-Scope { #.Synopsis # Determine the scope of execution (are you in a module? how many scope layers deep are you?) #.Parameter Invocation # In order to correctly determine the scope, this function requires that you pass in the $MyInvocation variable when you call it. #.Parameter ToHost # If you ju...
0
sample_50_51.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_17_35.ps1
ConvertFrom-StringData @' id_filesnottobackup2k3check_st=There are too many HKLM\\SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\FilesNotToBackup entries and this may cause problems with ntbackup '@ # SIG # Begin signature block # MIIoUwYJKoZIhvcNAQcCoIIoRDCCKEACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgE...
0
Vim25-less Crazy Magic.ps1
cls $ws = New-WebServiceProxy -Uri "http://192.168.1.1/sdk/vimService?wsdl" ; $ws.Url = "http://192.168.1.1/sdk/vimService"; $ws.UserAgent = "VMware VI Client/4.0.0"; $ws.CookieContainer = New-Object system.net.CookieContainer; # set up some default MoRefs (see SDK docs) # if anyone knows how to work arou...
0
Get-App 1.1.ps1
## Get-App ## Attempt to resolve the path to an executable using Get-Command and the AppPaths registry key ################################################################################################## ## Example Usage: ## Get-App Notepad ## Finds notepad.exe using Get-Command ## Get-App pbrush #...
0
sample_10_82.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 = '74.1.0' # Supported PSEditions Compat...
0
3185.ps1
function New-IPRange { [cmdletbinding()] param ( [parameter( Mandatory = $true, Position = 0 )] [System.Net.IPAddress]$Start, [parameter( Mandatory = $true, Position = 1)] [System.Net.IPAddress]$End, [int[]]$Exclude = @( 0, 1, 255 ) ) Write-Verbo...
0
2142.ps1
Describe "Using assembly" -Tags "CI" { try { Push-Location $PSScriptRoot $guid = [Guid]::NewGuid() Add-Type -OutputAssembly $PSScriptRoot\UsingAssemblyTest$guid.dll -TypeDefinition @" public class ABC {} "@ It 'parse reports error on non-existing assembly by relative path' ...
0
2579.ps1
[CmdletBinding()] param ( [xml]$config = (Get-Content E:\Dexma\support\Sync-DBBackups-config.ps1) ) cls foreach ( $Client in $config.clients.client ) { Write-Host "Begin $($Client.Name)." -ForegroundColor DarkGray $BAKSourcePath = '\\' + $Client.SourceDBServer + '\e$\MSSQL10.MSSQLSERVER\MSSQL\BAK\' $BAKDestP...
0
1386.ps1
function Invoke-ConsoleCommand { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $Target, [Parameter(Mandatory=$true)] [string] $Action, [Parameter(Mandatory=$true)] [scriptblock] ...
0
Get default AppPath.ps1
Function Get-ApplicationPath { Param ([string[]]$extension) Write-Verbose "Saving current location" Push-Location $extension | % { try { Set-Location "HKLM:\\Software\\Classes\\$($_)" -ErrorAction Stop $default = (Get-ItemProperty -Path $pwd.Path -Name '(Defa...
0
sample_61_3.ps1
<# # .DESCRIPTION # Download and install MMAAgent & Microsoft Dependency agent # #> $ErrorActionPreference = "Stop" $isMmaRunning = (Get-Service -Name HealthService -ErrorAction SilentlyContinue).Status -eq 'Running' $isServiceMapRunning = (Get-Service -Name MicrosoftDependencyAgent -ErrorAction Silentl...
0
sample_27_70.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 = '73.1.0' # Supported PSEditions Comp...
0
The PowerShell Talk Xen2.ps1
#The PowerShell Talk #Demo 2 - VM Easy Bake Oven #XenServer #Connect to XenServer Get-Credential | connect-Xenserver -Url http://XenServer_URL/sdk #Create the new VM Create-XenServer:VM -NameLabel "Dave" -VCPUsAtStartup 1 -MemoryDynamicMax 536870912 -MemoryStaticMax 536870912 -MemoryDynamicMin 536870912 -Memo...
0
Invoke-SqlCmd_4.ps1
####################### <# .SYNOPSIS Runs a T-SQL script. .DESCRIPTION Runs a T-SQL script. Invoke-Sqlcmd2 only returns message output, such as the output of PRINT statements when -verbose parameter is specified .INPUTS None You cannot pipe objects to Invoke-Sqlcmd2 .OUTPUTS System.Data.DataTable .EXA...
0
1554.ps1
function Set-MrInternetConnectionSharing { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateScript({ If ((Get-NetAdapter -Name $_ -ErrorAction SilentlyContinue -OutVariable INetNIC)...
0
sample_36_74.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 = '75.1.0' # Supported PSEdi...
0
sample_40_75.ps1
# # Module manifest for module 'OCI.PSModules.Identitydataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identitydataplane.dll' # Version number of this module. ModuleVersion = '73.1.0' # Support...
0
sample_62_94.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_31_61.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 = '81.0.0' # Sup...
0
SqlProxy.psm1.ps1
# --------------------------------------------------------------------------- ### <Author> ### Chad Miller ### </Author> ### <Description> ### Based on functions in SQLPSX. SqlProxy.psm1 module is used for administering ### SQL Server logins, users, and roles. Designed to be used with PS Remoting. ### All actio...
0
1362.ps1
function Uninstall-CPerformanceCounterCategory { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $CategoryName ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.S...
0
2828.ps1
$projectRoot = "$PSScriptRoot/.." $moduleName = 'psake' $manifestPath = "$PSScriptRoot/../src/psake.psd1" $manifest = Import-PowerShellDataFile -Path $manifestPath $changelogPath = Join-Path -Path $projectRoot -Child 'CHANGELOG.md' Describe 'Module manifest' { Context 'Validation' { $script:manifest = $...
0
Get-InstalledApps.ps1
Param([string]$server) Begin{ function CheckRegKey{ param([string]$srv) $key = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall" $type = [Microsoft.Win32.RegistryHive]::LocalMachine $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($type, $Srv) $regKey...
0
2020.ps1
Describe "SSHTransport switch parameter value" -Tags 'Feature' { BeforeAll { $TestCasesSSHTransport = @( @{scriptBlock = {New-PSSession -HostName localhost -UserName UserA -SSHTransport:$false}; testName = 'New-PSSession SSHTransport parameter cannot have false value'} @{scri...
0
sample_4_10.ps1
// Class: clpsvc1 => DCIM_CLPProvidesEndpoint => DCIM_CLPProtocolEndpoint [dynamic, provider("dcismprovider")] class DCIM_CLPProvidesEndpoint : CIM_ProvidesEndpoint { }; /* SIG # Begin signature block */ /* MIItDQYJKoZIhvcNAQcCoIIs/jCCLPoCAQExDzANBglghkgBZQMEAgEFADB5Bgor */ /* BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEe...
0
sample_10_49.ps1
# Array of file names to pass to checksym [array]$arrFileNames = @("Pwrshplugin.dll", "Microsoft.backgroundintelligenttransfer.Management.Interop.dll", "Wsmpty.xsl", "Wsmtxt.xsl", "Wwsmpty.xsl", "Wwsmtxt.xsl", "Wevtfwd.dll", "Winrm.cmd", "Winrm.vbs", "Win...
0
sample_28_9.ps1
# # Module manifest for module 'OCI.PSModules.Osubsubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osubsubscription.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported...
0
sample_45_97.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=Modul PowerShell yang diperlukan (FailoverClusters) tidak ditemukan. Gunakan Alat Peran & Fitur untuk menginstal: Alat Administrasi Server Jarak Jauh | | Alat Administrasi Fitur | Alat Pengklusteran Failover Modul Kluster Failover untuk Windows PowerShell. Hype...
0
ESX host NTP Settings_1.ps1
<#====================================================================================== File Name : ESX-NTP.ps1 Original Author : Kenneth C. Mazie : Description : This is a VMware PowerCLI script for synchronizing NTP settings across : all ESX hosts in a Vi...
0
Sort IE Favorites.ps1
$Results = gci $env:userprofile\\favorites -rec -inc *.url | ? {select-string -inp $_ -quiet "^URL=http"} | select @{Name="Name"; Expression={[IO.Path]::GetFileNameWithoutExtension($_.FullName)}}, @{Name="URL"; Expression={get-content $_ | ? {$_ -match "^URL=http"} | % {$_.Substring(4)}}} New-Item $env:userprofil...
0
sample_23_91.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function get-AMTMPSStatus { <# .Synopsis Returns the status of the Intel Fast Call for Help Management Presence Server (MPS) interface settings .Description Returns the status of the Intel Fast Call for Help Management Presence Se...
0
1634.ps1
function Get-ComputerShares { param ( [string]$comp = $env:COMPUTERNAME ) if (!$comp) { throw 'No comps.' } $ping = New-Object System.Net.NetworkInformation.Ping try { $result = $ping.Send($comp) } catch { $result = $null } $sharename = $type =...
0
3693.ps1
function Test-ProviderShareSubscriptionGrantAndRevoke { $resourceGroup = getAssetName $AccountName = getAssetName $ShareName = getAssetName $ShareSubId = getAssetName $resourceId = getAssetName $revoked = Revoke-AzDataShareSubscriptionAccess -ResourceGroupName $resourceGroup -AccountNa...
0
sample_33_68.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_20_66.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditi...
0
sample_11_76.ps1
# # Module manifest for module 'OCI.PSModules.Databasetools' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Databasetools.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEdi...
0
sample_59_82.ps1
# 驭码 CodeRider 驭码 CodeRider 是[极狐GitLab](https://gitlab.cn/) 推出的基于人工智能和生成式内容技术(AIGC)的新一代软件生产工具,与极狐GitLab 深度融合,提供开发者 AI 辅助编程和 DevOps 流程支持,包括代码补全、生成、解释、单元测试生成、议题处理和 MR 处理加速以及 AI 问答等功能。 ## 快速开始 Quick Start ### 用户登录 CodeRider 支持极狐GitLab 注册用户通过 SaaS 平台账号免费试用,请注册[极狐GitLab 账号](https://jihulab.com/users/sign_in)体验吧!注册成功后请在插...
0
1687.ps1
function Get-User { param ( [string]$comp = $env:COMPUTERNAME, [ValidateSet('computersystem', 'process', 'dir')] $method = 'computersystem' ) switch ($method) { 'dir' { Get-ChildItem \\$comp\c$\users -Directory -Exclude '*$*' | % {Get-Chi...
0
1610.ps1
$a1 = New-Object System.Collections.ArrayList $a2 = New-Object System.Collections.ArrayList $a3 = New-Object System.Collections.ArrayList 1..10 | % { [void]$a1.add((Measure-Command { @(dir C:\temp -Recurse).where{$_.basename} }).ticks) [void]$a2.add((Measure-Command { dir C:\temp -Re...
0
3974.ps1
function Test-AzureFirewallCRUD { $rgname = Get-ResourceGroupName $azureFirewallName = Get-ResourceName $resourceTypeParent = "Microsoft.Network/AzureFirewalls" $location = Get-ProviderLocation $resourceTypeParent "eastus2euap" $vnetName = Get-ResourceName $subnetName = "Azu...
0
Binary Clock_1.ps1
function get-binary($number,$words=1+(1*[int]($number -gt 255))) { # Takes the passed numerical value and converts to a Binary word. # Pads 0 to the left to make it a proper set of 8 or 16 # # If you use this function outside of the clock, it is automatically # designed to generate a 16 bit output padded if t...
0
sample_39_66.ps1
# # Module manifest for module 'OCI.PSModules.Cloudbridge' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEdition...
0
PowerShell CMatrix_1.ps1
Set-StrictMode -off # # Module: PowerShell Console ScreenSaver Version 0.1 # Author: Oisin Grehan ( http://www.nivot.org ) # # A PowerShell CMatrix-style screen saver for true-console hosts. # # This will not work in Micrisoft's ISE, Quest's PowerGUI or other graphical hosts. # It should work fine in PowerShe...
0
3169.ps1
function Invoke-AzureRmVmScript { [cmdletbinding()] param( [Parameter(Mandatory = $True, Position = 0, ValueFromPipelineByPropertyName = $True)] [string[]]$ResourceGroupName, [Parameter(Mandatory = $True, Posit...
0
3353.ps1
param( [Parameter(Mandatory = $false, Position = 0)] [string] $buildConfig ) $VerbosePreference = 'Continue' if ([string]::IsNullOrEmpty($buildConfig)) { Write-Verbose "Setting build configuration to 'Release'" $buildConfig = 'Release' } if($env:AzurePSRoot -eq $null) { $env:AzurePSRoot="...
0
2306.ps1
param ( [string]$DirectoryName, [int]$MaxFileCount ) $API = New-Object -ComObject 'MOM.ScriptAPI' $PropertyBag = $API.CreatePropertyBag() try { $FileCount = (Get-ChildItem -Path $DirectoryName | Where-Object { !$_.PsIsContainer }).Count if ($FileCount -ge $MaxFileCount) { $PropertyBag.AddValue('State', 'Critica...
0
sample_9_99.ps1
#************************************************ # TS_DetectLowPathMTU.ps1 # Version 1.0 # Date: 02/06/2014 # Author: BBenson # Description: # Rule number: 262755 # Rule ID: d2aaab92-c906-4b3e-a4e5-67244c49c422 # Rule URL: https://kse.microsoft.com/Contribute/Idea/de6654f5-8b05-4f97-b67b-f9ad51bc78ab # P...
0
sample_65_90.ps1
@{ GUID="{Fb6cc51d-c096-4b38-b78d-0fed6277096a}" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" RootModule="Microsoft.Management.Infrastructure.CimCmdlets" RequiredAssembli...
0
sample_51_29.ps1
<# .DESCRIPTION Support Enter-SmePSSession to specified computer as specified username. Password will be promoted. - Enabled by adding "%ProgramFiles%\Windows Admin Center\PowerShell\Modules" to $env:PSModulePath #> Function Enter-SmePSSession { <# .SYNOPSIS Remote logon to PowerShell sessio...
0
target.local.ps1
#alias,addnewemailaddress import-csv .\\source.csv | foreach { $user = Get-Mailbox $_.alias $user.emailAddresses+= $_.addnewemailaddress $user.primarysmtpaddress = $_.addnewemailaddress Set-Mailbox $user -emailAddresses $user.emailAddresses set-Mailbox $user -PrimarySmtpAddress $user.primarysmtpaddress }
0
Get_Set Signature 2.3.ps1
#Requires -version 2.0 ## Authenticode.psm1 updated for PowerShell 2.0 (with time stamping) #################################################################################################### ## Wrappers for the Get-AuthenticodeSignature and Set-AuthenticodeSignature cmdlets ## These properly parse paths, so th...
0
sample_1_94.ps1
<Viewbox Width="16" Height="16" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <Rectangle Width="16" Height="16"> <Rectangle.Fill> <DrawingBrush> <DrawingBrush.Drawing> <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z"> <DrawingGroup Opacity="1"> ...
0
Grant-RegistryAccessFull.ps1
##############################################################################\n##\n## Grant-RegistryAccessFullControl\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNO...
0
sample_37_1.ps1
Function Test-Empty { [CmdletBinding()] [OutputType([boolean])] param ( [Parameter(Mandatory=$true)] [AllowNull()] [AllowEmptyString()] [string]$content ) return [string]::IsNullOrEmpty($content) -or [string]::IsNullOrWhiteSpace($content) } functi...
0
sample_35_10.ps1
function Edit-AzDataProtectionPolicyRetentionRuleClientObject { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20240401.IBackupPolicy')] [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Adds or removes Retention Rule to e...
0
278.ps1
function Get-NetworkLevelAuthentication { [CmdletBinding()] PARAM ( [Parameter(ValueFromPipeline)] [String[]]$ComputerName = $env:ComputerName, [Alias("RunAs")] [System.Management.Automation.Credential()] $Credential = [System.Management.Automation.PSCredential]::Empty ) BEGIN { TRY { IF (-not...
0
sample_49_19.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_66_33.ps1
# # Module manifest for module 'OCI.PSModules.Appmgmtcontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Appmgmtcontrol.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSE...
0
398.ps1
[PSFramework.TabExpansion.TabExpansionHost]::InputCompletionTypeData['System.IO.FileInfo'] = @( [PSCustomObject]@{ Name = 'PSChildName' Type = ([type]'System.String') TypeKnown = $true }, [PSCustomObject]@{ Name = 'PSDrive' Type = ([type]'System.Management.Automation.PSDriveInfo') TypeKnown = $tr...
0
Create SP2010 Farm V_4.ps1
############################################################################ ## Create-SPFarm ## V 0.3 ## Jos.Verlinde ############################################################################ Param ( [String] $Farm = "SP2010", [String] $SQLServer = $env:COMPUTERNAME, [String] $Passphrase = "pass@word1"...
0
1.ps1
$ConsoleColorToAnsi = @( 30 34 32 36 31 35 33 37 90 94 92 96 91 95 93 97 ) $AnsiDefaultColor = 39 $AnsiEscape = [char]27 + "[" [Reflection.Assembly]::LoadWithPartialName('System.Drawing') > $null $ColorTranslatorType = 'System.Drawing.Col...
0
Find-String.ps1
## Find-String.ps1\n########################################################################################################################\n## Find-String is basically a PowerShell 1.0 wrapper around { select-string } which will append the "Matches" to it\n## Highlight-Matches takes a collections of MatchInfo objects...
0
585.ps1
function Connect-VM{ param ( [parameter(Mandatory=$true)] [string[]]$Name ) if((Get-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $Null){Add-PSSnapin VMware.VimAutomation.Core} if((Get-PSSnapin VMware.VimAutomation.Vds -ErrorAction SilentlyConti...
0
sample_57_70.ps1
import{m as s}from"./index-C8Scyk8z.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-edit...
0
sample_41_91.ps1
# # Module manifest for module 'OCI.PSModules.Datascience' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datascience.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEdition...
0
sample_31_65.ps1
# Localized 12/03/2020 06:20 PM (GMT) 303:4.80.0411 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Ano PromptNoString=&Ne BundleFound=Nalezený svazek: {0} PackageFound=Nalezený balíček: {0} EncryptedBundleFound=Nalezena zašifrovaná sada prostředků: {0} Encrypted...
0
92.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ($Aad...
0
Password Gen Form V2.ps1
$rs=[RunspaceFactory]::CreateRunspace() $rs.ApartmentState = "STA" $rs.ThreadOptions = "ReuseThread" $rs.Open() $ps = [PowerShell]::Create() $ps.Runspace = $rs $ps.Runspace.SessionStateProxy.SetVariable("pwd",$pwd) [void]$ps.AddScript({ #Load Required Assemblies Add-Type –assemblyName Presentation...
0
New-XVM_3.ps1
#Examples <# New-XVM -Name "WS2012-TestServer01" -SwitchName "Switch(192.168.2.0/24)" -VhdType NoVHD New-XVM -Name "WS2012-TestServer02" -SwitchName "Switch(192.168.2.0/24)" -VhdType ExistingVHD -VhdPath 'D:\\vhds\\WS2012-TestServer02.vhdx' New-XVM -Name "WS2012-TestServer03" -SwitchName "Switch(192.168.2.0/24)" ...
0