filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
2726.ps1
[CmdletBinding()] Param( ) If (Get-Command Get-SmbShare -ErrorAction SilentlyContinue) { foreach ($share in (Get-SmbShare)) { $shareName = $share.Name Write-Verbose "Grabbing share rights for $shareName" $shareOwner = (Get-Acl -Path $share.Path).Owner $o = "" | Select-Obj...
0
sample_54_47.ps1
# # Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker' # # Generated by: Microsoft Corporation # # Generated on: 19/01/2022 # @{ # Script module or binary module file associated with this manifest. RootModule = '' # Version number of this module. ModuleVersion = '1.2100.26...
0
ActiveDirectoryFunctions_2.ps1
#.SYNOPSIS # Gets a directory entry from ActiveDirectory based on the login user name function Get-ADUser { [CmdletBinding()] param([string]$UserName=${Env:userName}) $ads = New-Object System.DirectoryServices.DirectorySearcher([ADSI]'') $ads.filter = "(&(objectClass=Person)(samAccountName=$UserName))" ...
0
Send mail to BCC using P.ps1
<# .SYNOPSIS Send mail to BCC using PowerShell .DESCRIPTION This script is a re-developed MSDN Sample using PowerShell. It creates an email message then sends it with a BCC. .NOTES File Name : Send-BCCMail.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell V2 CTP3 .LINK O...
0
2443.ps1
function Checkpoint-OnlineVM { [CmdletBinding(SupportsShouldProcess,ConfirmImpact = 'High')] param ( [Parameter(Mandatory, ValueFromPipeline)] [ValidateNotNullOrEmpty()] [Microsoft.HyperV.PowerShell.VirtualMachine[]]$VM ) process { foreach ($v in $VM) { if ($PSCmdlet.ShouldProcess($v.Name,'VM shu...
0
sample_24_29.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=此名稱和類型的環境變數已存在。 EnvironmentErrorDoesNotExists=此名稱和類型的環境變數不存在。 '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIB...
0
703.ps1
function New-RsWebServiceProxy { [cmdletbinding()] param ( [string] $ReportServerUri = ([Microsoft.ReportingServicesTools.ConnectionHost]::ReportServerUri), [Alias('Credentials')] [AllowNull()] [System.Management.Automation.PSCredential] $Cre...
0
4093.ps1
cls $Printers = Get-WmiObject Win32_Printer $EXE = $env:windir + "\system32\printui.exe" $PrintUI = "/dn /n " Foreach ($Printer in $Printers) { If ($Printer.ShareName -ne $null) { Write-Host "Uninstall"$Printer.ShareName"....." -NoNewline $Parameters = $PrintUI + [char]34+ $Printer.Name + [char]34 $ErrCode = (...
0
Install-Bginfo.ps1
#Install and run BGInfo at startup using registry method as described here: #http://forum.sysinternals.com/bginfo-at-startup_topic2081.html #Setup #1. Download BgInfo http://technet.microsoft.com/en-us/sysinternals/bb897557 #2. Create a bginfo folder and copy bginfo.exe #3. Create a bginfo.bgi file by running bgi...
0
Start-BootsTimer_1.ps1
function Start-BootsTimer { #.Syntax # Creates a stay-on-top countdown timer #.Description # A WPF borderless count-down timer, with audio/voice alarms and visual countdown + colored progress indication #.Parameter EndMessage # The message to be spoken by a voice when the time is up... #.Parameter StartMessag...
0
Out-Balloon.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 embedded ! icon is used. It's blue. out-b...
0
sample_18_33.ps1
#************************************************ # DC_ClusterResourcesProperties.ps1 # Version 1.1.1 # Date: 11-22-2011 # Author: Andre Teixeira - andret@microsoft.com # Description: This script writes cluster resources properties # on a text file called COMPUTERNAME_ClusterProperties.txt #*******...
0
sample_48_24.ps1
parameters: - name: PAT type: string - name: isPreRelease type: string - name: ghCreateRelease type: boolean - name: ghReleaseAddChangeLog type: boolean steps: - pwsh: | $vsixFileName = (Get-ChildItem -File | Select-Object -First 1).Name Write-Host "##vso[task.setvari...
0
sample_37_92.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
3701.ps1
function Get-AzVMGuestPolicyStatus-VmNameScope { $rgName = "vivga" $vmName = "Viv1809SDDC" $reports = Get-AzVMGuestPolicyStatus -ResourceGroupName $rgName -VMName $vmName Assert-NotNull $reports Assert-True { $reports.Count -gt 0 } } function Get-AzVMGuestPolicyStatus-VmNameScope_Custom { $rg...
0
sample_17_67.ps1
# # Module manifest for module 'OCI.PSModules.Logging' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Logging.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Compat...
0
sample_47_97.ps1
# # Module manifest for module 'ExtensionService' # # Generated by: Microsoft # # Generated on: 04/09/2020 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'ExtensionService.psm1' # Version number of this module. ModuleVersion = '1.0' # ID used to uniquely ...
0
sample_10_55.ps1
#************************************************ # DC_GetSQLSetupLogs.ps1 # Version 1.0.0 # Date: 8-19-2011 # Author: Shon Hauck - Shonh@Microsoft.com # Description: Used to Get SQL Setup Logs (Bootstrap Directory for SQL 9, 10 , 10.5, 11) # # Date: 4-15-2020 # Modified By: João Polisel - JPolisel@Microsoft.co...
0
Get-OLEDBData.ps1
########################################################################### # Get-OLEDBData # -------------------------------------------- # Description: This function is used to retrieve data via an OLEDB data # connection. # # Inputs: $connectstring - Connection String. # $sql ...
0
sample_6_81.ps1
#************************************************ # DC_Bluetooth-Component.ps1 # Version 1.0: Created # Date: 2020 # Author: Walter Eder (waltere@microsoft.com) # Description: Collects information about the Bluetooth Component. #******************************************************* Trap [Exception] { # ...
0
vSphere Resultant Privs_1.ps1
# Need the Quest ActiveRoles cmdlets for this one. Add-PSSnapin Quest.ActiveRoles* -ea SilentlyContinue function Get-Groups { param($principal) # Start with this principal's base set of groups. Write-Verbose "Checking principal $principal" $groups = Get-QADUser $principal | Get-QADMemberOf # Groups ca...
0
sample_61_28.ps1
@{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.ServiceFabric.Powershell' # Version number of this module. ModuleVersion = '3.1.0.0' # ID used to uniquely identify this module GUID = 'd2c42633-5254-4a82-a312-1dc0697a55cd' # Author of this module Author = '...
0
3004.ps1
Set-StrictMode -Version Latest $scriptRoot = Split-Path (Split-Path $MyInvocation.MyCommand.Path) $multiLanguageTestData = @{ 'en' = @{ namedScenario = 'When something uses MyValidator'; additionalSteps = 4; additionalScenarios = 2 } 'es' = @{ namedScenario = 'Algo usa MiValidator'; additionalSteps = 0; addit...
0
sample_13_26.ps1
ConvertFrom-StringData @' id_clusterdependencyreport=Cluster resource dependency report id_clusterdependencyreportdesc1=Obtaining cluster resource dependency report id_clusterdependencyreportdesc=Obtaining cluster resource dependency report from group %GroupName% '@ # SIG # Begin signature block # MIIoUgYJKoZIh...
0
sample_13_77.ps1
#************************************************ # TS_SkypeFailureForMissingKB2703761Check.ps1 # Version 1.0.1 # Date: 3/13/2013 # Author: v-blchen # Description: [Idea ID 7499] [Windows] Win8:APP - Skype fails to start # Rule number: 7499 # Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/Disp...
0
sample_20_76.ps1
'This script has been deprecated. Please use the PowerShell version TS_Virtualization.ps1 '' SIG '' Begin signature block '' SIG '' MIIoUAYJKoZIhvcNAQcCoIIoQTCCKD0CAQExDzANBglg '' SIG '' hkgBZQMEAgEFADB3BgorBgEEAYI3AgEEoGkwZzAyBgor '' SIG '' BgEEAYI3AgEeMCQCAQEEEE7wKRaZJ7VNj+Ws4Q8X66sC '' SIG '' AQACAQACAQACAQAC...
0
sample_64_25.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_45_70.ps1
# # Module manifest for module 'OCI.PSModules.Core' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Core.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions CompatiblePS...
0
sample_26_24.ps1
function trySetDesignerProp(tname, ttype, val) { var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0); trait.value = val; // services.debug.trace(tname + "=" + val); } if (command.getTrait("state").value == 0) { command.getTrait("state").value = 2; trySetDesignerProp("showEm...
0
3547.ps1
function Test-AzureVMGetContainers { $location = Get-ResourceGroupLocation $resourceGroupName = Create-ResourceGroup $location try { $vm = Create-VM $resourceGroupName $location $vault = Create-RecoveryServicesVault $resourceGroupName $location Enable-Protection $vault $vm $contain...
0
700.ps1
function Get-RsCatalogItemRole { [CmdletBinding()] param ( [string] $Identity, [string] $Path = "/", [switch] $Recurse, [string] $ReportServerUri, [System.Management.Automation.PSCredential] $Credential, $P...
0
2486.ps1
Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File encrypted_password.txt $vpn_profile = 'Profile name' $username = 'username' $enc_password = (gc .\encrypted_password.txt | ConvertTo-SecureString) $credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,...
0
sample_57_24.ps1
# # Module manifest for module 'OCI.PSModules.Globallydistributeddatabase' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Globallydistributeddatabase.dll' # Version number of this module. ModuleVersion =...
0
sample_50_46.ps1
# # Module manifest for module 'OCI.PSModules.Blockchain' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Blockchain.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions ...
0
sample_3_65.ps1
. ./utils_cts.ps1 SkipSecondExecution # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBpBM1pLw62hhop # ehOlxUIjRqhNjsumpSDgpF4eaEfLiKCCDXYwggX0M...
0
638.ps1
param( [string]$Version, [string]$Path, [switch]$Force, $Update, [switch]$Uninstall ) $Configs = @{ Url = "http://download.microsoft.com/download/F/4/4/F4461C3D-B378-473D-B15A-28BC0BD849E8/MessageAnalyzer64.msi" Path = "$(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)\" } $Configs | ForEac...
0
4232.ps1
function New-IPv4Range { param( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $StartIP, [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=2)] ...
0
31.ps1
function Get-AuthToken { [cmdletbinding()] param ( [Parameter(Mandatory=$true)] $User ) $userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User $tenant = $userUpn.Host Write-Host "Checking for AzureAD module..." $AadModule = Get-Module -Name "AzureAD" -ListAvailable if ($Aa...
0
Invoke-WMSettingsChange.ps1
#requires -version 2 if (-not ("win32.nativemethods" -as [type])) { # import sendmessagetimeout from win32 add-type -Namespace Win32 -Name NativeMethods -MemberDefinition @" [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] public static extern IntPtr SendMessageTimeout( IntPtr ...
0
sample_55_7.ps1
# # Module manifest for module 'OCI.PSModules.Oda' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oda.dll' # Version number of this module. ModuleVersion = '84.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_41_43.ps1
# # Module manifest for module 'OCI.PSModules.Streaming' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Streaming.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions Co...
0
sample_15_3.ps1
<############################################################## # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # ###########################################################...
0
sample_1_41.ps1
#************************************************ # TS_TelnetSystemAccount.ps1 # Version 1.0.1 # Date: 5/9/2012 # Author: v-blchen # Description: [Idea ID 2695] [Windows] Check the Log On account for the Telnet service to verify it's not using the Local System account # Rule number: 2695 # Rule URL: //sharepo...
0
Sort-ISE.ps1
function Sort-ISE () { <# .SYNOPSIS ISE Extension sort text starting at column $start comparing the next $length characters .DESCRIPTION ISE Extension sort text starting at column $start comparing the next $length characters Leftmost column is column 1 .NOTES File Name : Sort_IS...
0
HTML Parse Demo.ps1
$page = Invoke-WebRequest "http://www.apk.se" $html = $page.parsedHTML $products = $html.body.getElementsByTagName("TR") $headers = @() foreach($product in $products) { $colID = 0; $hRow = $false $returnObject = New-Object Object foreach($child in $product.children) { if ($child.tagName -eq "TH") ...
0
sample_0_77.ps1
<# .SYNOPSIS Scenario module for collecting Microsoft AVD App Attach related data .DESCRIPTION Collect App Attach related troubleshooting data .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version Feedback : https://aka.ms/MSRD-Colle...
0
sample_20_51.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 = '77.0.0' # Supported...
0
2316.ps1
param( [Parameter()] [ValidateNotNullOrEmpty()] [string]$CsvFilePath ) function New-CompanyAdUser { [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [pscustomobject]$EmployeeRecord ) $password = [System.Web.Security.Membership]::GeneratePassword((Get-Random -Minimum 20 -Maxi...
0
sample_60_71.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
1866.ps1
Describe "SSH Remoting Cmdlet Tests" -Tags "Feature" { It "Enter-PSSession HostName parameter set should throw error for invalid key path" { { Enter-PSSession -HostName localhost -UserName User -KeyFilePath NoKeyFile } | Should -Throw -ErrorId "PathNotFound,Microsoft.PowerShell.Commands.Enter...
0
4314.ps1
if($IsMacOS) { return } function SuiteSetup { Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue $script:ProgramFilesModulesPath = Get-AllUsersModulesPath $script:MyDocumentsModulesPath ...
0
Set-defaultBrowser.ps1
function Set-defaultBrowser { param($defaultBrowser) switch ($defaultBrowser) { 'IE' { Set-ItemProperty 'HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\ftp\\UserChoice' -name ProgId IE.FTP Set-ItemProperty 'HKCU:\\Software\\Microsoft\\Wind...
0
sample_65_84.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_44_44.ps1
# # Module manifest for module 'Microsoft.SME.StorageReplica' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.StorageReplica.psm1' # Version number of this module. ModuleVersion = '4.3.0' # Supported PSEditions # CompatiblePSEditions = @() # ID u...
0
sample_13_38.ps1
#************************************************ # TS_NetworkDTCEnabled.ps1 # Version 1.0.0 # Date: 03-23-2012 # Author: Jeremy LaBorde - jlaborde # Description: Checks to see if Network DTC # is enabled # #************************************************ . .\DistSvcs_Utils.ps1 Import-LocalizedData -B...
0
3858.ps1
function Test-NewDirectConnectionWithV4V6 { $asn = makePeerAsn 65000 $kind = isDirect $true; $loc = "Los Angeles" $peeringLocation = getPeeringLocation $kind $loc; $facilityId = $peeringLocation[0].PeeringDBFacilityId $bandwidth = getBandwidth Write-Debug "Creating Connection at $facilityId" $...
0
sample_56_25.ps1
Import-Module BitsTransfer $DownloadedInstaller="$env:temp\IBM_Cloud_CLI.exe" $RepoHost="download.clis.cloud.ibm.com" $metadataHost="$RepoHost/ibm-cloud-cli-metadata" $binaryDownloadHost="$RepoHost/ibm-cloud-cli" # fetch version metadata of CLI $infoEndpoint="https://$metadataHost/info.json" $req = [System.Net.WebReq...
0
4024.ps1
function Test-CreatesNewSimpleResourceGroup { $rgname = Get-ResourceGroupName $location = Get-Location "Microsoft.Resources" "resourceGroups" "West US" try { $actual = New-AzResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "testval"} $expec...
0
sample_11_10.ps1
ConvertFrom-StringData @' ###PSLOC CopySBEToNode = Copy SBE content from '{0}' to '{1}' RobocopyFailed = There were errors copying files. Robocopy exit code '{0}' SBEPackagePath = SBE package content path is '{0}' NoHealthChecks = SolutionExtension module does not implement any SBE Health checks. ModuleToImport =...
0
sample_1_28.ps1
ConvertFrom-StringData @' id_clusterinfo=Cluster Information id_clusterinforesquery=Processing Resources: %ResourceName% (%Current% of %top%) id_clusterinfoquery=Cluster Group %GroupName% - Querying resources '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # ...
0
580.ps1
function Add-SPOField { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string] $listTitle, [Parameter(Mandatory=$true, Position=2)] [string] $fieldName, [Parameter(Mandatory=$true, Position=3)] [string] $fieldXML ) $web = $clientContext.Web $list = $web.Lists.GetB...
0
sample_19_33.ps1
# *********************************************************************************************** # Version 1.0 # Date: 02-17-2012 -- Last edit: 2022-06-01 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Utility Script to load common functions. # 1. Defines commonly used functions in the Troublesho...
0
1517.ps1
function Assert-DirectoryDoesNotExist { [CmdletBinding()] param( [Parameter(Position=0)] [string] $Path, [Parameter(Position=1)] [string] $Message ) Set-StrictMode -Version 'Latest' if( Test-Path -Path $Path -Pat...
0
sample_8_5.ps1
#************************************************ # TS_HyperVXeon5500Check.ps1 # Version 1.0.1 # Date: 02-27-2011 # Author: Andre Teixeira - andret@microsoft.com # Description: This scripts checks the processors is an Intel Xeon processor 5500 series # If so, check binary versions of Hvax64.exe, Hv...
0
sample_25_17.ps1
# Stops Docker Desktop # Sets container type to windows or linux # Restarts Docker Desktop # Logins to Docker Hub with credentials param( [string]$user, [string]$pswd, [string]$container="windows" ) # Stop docker Write-Information -MessageData "Stopping docker desktop" -InformationAction Continu...
0
226.ps1
function Get-AsciiReaction { [cmdletbinding()] Param ( [Parameter()] [ValidateSet( 'Shrug', 'Disapproval', 'TableFlip', 'TableBack', 'TableFlip2', 'TableBac...
0
3053.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "Should -FileContentMatch" { Context "when testing file contents" { Setup -File "test.txt" "this is line 1$([System.Environment]::NewLine)rush is awesome$([System.Environment]::NewLine)And this is Unicode: ☺" It "return...
0
sample_25_85.ps1
# # Module manifest for module 'OCI.PSModules.Recovery' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Recovery.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Comp...
0
sample_17_40.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
0
sample_65_3.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 = '89.0.0' # Supported...
0
1351.ps1
function Resolve-CIdentity { [CmdletBinding(DefaultParameterSetName='ByName')] [OutputType([Carbon.Identity])] param( [Parameter(Mandatory=$true,ParameterSetName='ByName',Position=0)] [string] $Name, [Parameter(Mandatory=$true,ParameterSetName='BySid')] ...
0
gpupdate on remote pc's.ps1
############################################################################### # # Get all servers from a OU and run GPUpdate /force on this machines. # # Version 1.0 # # (C) 2009 - Arne Fokkema # www.ict-freak.nl # # Install the Quest AD cmdlets first!! # ###############################################...
0
sample_49_4.ps1
function Get-ClusterNodes { <# .SYNOPSIS Retrieves the inventory data for cluster nodes in a particular cluster. .DESCRIPTION Retrieves the inventory data for cluster nodes in a particular cluster. .ROLE Readers #> import-module CimCmdlets # JEA code requires to pre-import the module (this is slow...
0
sample_15_80.ps1
# # Module manifest for module 'OCI.PSModules.Loganalytics' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loganalytics.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditi...
0
sample_51_51.ps1
# Copyright (C) Intel Corporation, 2021 All Rights Reserved. function Invoke-ConfigureTLSMutualAuthentication { <# .Synopsis Configures AMT connection to TLS with mutual authentication .Description This cmdlet configures the AMT connection to TLS with mutual authentication. The cmdlet adds the AMT c...
0
IADsDNWithBinary Cmdlet_1.ps1
//Adapted from code @ http://mow001.blogspot.com/2006/01/msh-snap-in-to-translate.html Thanks! using System; using System.ComponentModel; using System.Management.Automation; using System.Reflection; using System.Diagnostics; namespace space { // This class defines the properties of a snap-in [Ru...
0
Xml Module 4.ps1
#requires -version 2.0 # Improves over the built-in Select-XML by leveraging Remove-XmlNamespace http://poshcode.org/1492 # to provide a -RemoveNamespace parameter -- if it's supplied, all of the namespace declarations # and prefixes are removed from all XML nodes (by an XSL transform) before searching. # IMPO...
0
4030.ps1
function Test-AzureProviderFeature { $defaultProviderFeatures = Get-AzProviderFeature $allProviderFeatures = Get-AzProviderFeature -ListAvailable Assert-True { $allProviderFeatures.Length -gt $defaultProviderFeatures.Length } $batchFeatures = Get-AzProviderFeature -ProviderName "Micros...
0
Connect-LabManager.ps1
function Ignore-SslErrors { # Create a compilation environment $Provider=New-Object Microsoft.CSharp.CSharpCodeProvider $Compiler=$Provider.CreateCompiler() $Params=New-Object System.CodeDom.Compiler.CompilerParameters $Params.GenerateExecutable=$False $Params.GenerateInMemory=$True $Params.IncludeDebugIn...
0
sample_48_85.ps1
# # Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll' # Version number of this module. ModuleVersion...
0
sample_18_55.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Import-EditorCommand { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [OutputType([Microsoft.PowerShell.EditorServices.Extensions.EditorCommand, Microsoft.PowerShell.EditorServices])] [Cmdle...
0
2015.ps1
. "$psscriptroot/TestRunner.ps1" $assemblyName = "Microsoft.WSMan.Management" $excludeList = @() if ( $IsWindows ) { import-module Microsoft.WSMan.Management } Test-ResourceStrings -AssemblyName $AssemblyName -ExcludeList $excludeList
0
sample_51_48.ps1
. "$PSScriptRoot/api.ps1" . "$PSScriptRoot/../php/api.ps1" $scheduledTasksFile = Get-Full-Path("Custom/scheduled-tasks/scheduled-tasks.json") $scheduledTasks = (Get-Content $scheduledTasksFile -Encoding UTF8 | Out-String | ConvertFrom-Json) while ($true) { Write-Host "Select your schedule :" $indexSch...
0
2158.ps1
function Write-LogEntry { param( [parameter(Mandatory=$true, HelpMessage="Value added to the RemovedApps.log file.")] [ValidateNotNullOrEmpty()] [string]$Value, [parameter(Mandatory=$false, HelpMessage="Name of the log file that the entry will written to.")] [ValidateNotNul...
0
AD attributes.ps1
<%@ Language=VBScript %> <% StartTime = Timer %> <!--#include file = "global.inc"--> <html> <head><title><%=strCompany%> - Search List</title> </head> <body> <!--#include file="default.htm"--> <link rel="stylesheet" href="/server/default.css" TYPE="text/css" media="screen"> <% Dim MyVariable MyVariable=Reque...
0
569.ps1
function Add-SPOSolution { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$path ) Write-Host "Uploading solution $path" -foregroundcolor black -backgroundcolor yellow $file = Get-Item -Path $path $targetPath = Join-SPOParts -Separator '/' -Parts $clientContext.Site.Serv...
0
sample_67_77.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
Get-Path_1.ps1
function Get-Path { [CmdletBinding(DefaultParameterSetName="DriveQualified")] Param( [Parameter(Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [Alias("PSPath")] [String] $Path, [Parameter()] [Switch]$ResolvedPath, [Parameter(ParameterSetName="ProviderQuali...
0
3989.ps1
function ServiceBusQueueTests { $location = Get-Location $resourceGroupName = getAssetName "RGName-" $namespaceName = getAssetName "Namespace-" $nameQueue = getAssetName "Queue-" Write-Debug "ResourceGroup name : $resourceGroupName" New-AzResourceGroup -Name $resourceGro...
0
2610.ps1
param([ValidateSet('Dev','Stage','QA','Prod')][string] $Environment) [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.IntegrationServices") | Out-Null; $IspacPath = switch($Environment){ 'Dev'{'C:\TFS2013\Dev\SSIS\TestDev.ispac'} 'Stage'{'C:\TFS2013\Dev\SSIS\TestStage.ispac...
0
Out-IseFile.ps1
function Out-IseFile { [CmdletBinding()] param ( [Parameter(Position = 0, Mandatory = $True, ValueFromPipeline = $True) ] $msg, [Parameter(Position = 1, Mandatory = $False, ValueFromPipeline = $False)] $path = $null, [Parameter(Position = 2...
0
sample_48_35.ps1
# # Module manifest for module 'OCI.PSModules.Servicemanagerproxy' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Servicemanagerproxy.dll' # Version number of this module. ModuleVersion = '74.1.0' # Sup...
0
sample_64_68.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # UnzipAndCopyMDS.ps1 # Kill all running Monitoring processes an...
0
sample_13_88.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
_3.168.1.1.ps1
function Set-IPAddress { param( [string]$networkinterface =$(read-host "Enter the name of the NIC (ie Local Area Connection)"), [string]$ip = $(read-host "Enter an IP Address (ie 10.10.10.10)"), [string]$mask = $(read-host "Enter the subnet mask (ie 255.255.255.0)"), [string]$gateway = $(read-host "Enter...
0
DotSource.psm1.ps1
#requires -version 3 $accelerators = [psobject].Assembly.GetType( 'System.Management.Automation.TypeAccelerators' ) foreach ($Type in 'Parser', 'FunctionDefinitionAst', 'AssignmentStatementAst', 'VariableExpressionAst', 'TokenKind') { $accelerators::Add( $Type, ...
0
Get-OleDBPSObject.ps1
function Get-OleDBPSObject ([string]$ConnectionString, [string]$Query) { $ConnObj = new-object System.Data.OleDb.OleDbConnection $ConnectionString $command = New-Object System.Data.OleDb.OleDbCommand $Query, $ConnObj try { $ConnObj.Open() [System.Data.OleDB.OleDbDataReader]$reader = $command.ExecuteReader()...
0
sample_47_82.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AMTFirmwareVersion { <# .Synopsis Returns the core Intel Active Management Technology firmware version .Description This Cmdlet returns the Intel Active Management Technology(AMT) core firmware version from clients that...
0
sample_60_23.ps1
# # Module manifest for module 'OCI.PSModules.Opensearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Opensearch.dll' # Version number of this module. ModuleVersion = '89.0.0' # Supported PSEditions ...
0
vmrc remote connector.ps1
#region Global var $script:viserver = "esx.local" $script:vmrc = "C:\\Program Files\\VMwareVMRC\\vmware-vmrc.exe" $script:vm = "" $script:vmt = "" $script:vmcon = "" $script:selectvm = "" $script:multiple = $FALSE #Set to TRUE for multiple VMRC Instances #endregion $vmcon = Connect-VIServer -Server $script:v...
0