Skip to content

Search-Guid

SYNOPSIS

Extracts a GUID from a given string.

SYNTAX

__AllParameterSets

Search-Guid [-String] <string> [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

This function searches for a GUID within the provided string and returns it. The function accepts input from the pipeline and processes each string to extract GUIDs.

EXAMPLES

EXAMPLE 1

'The ID is 550e8400-e29b-41d4-a716-446655440000' | Search-Guid

Extracts and returns the GUID 550e8400-e29b-41d4-a716-446655440000 from the input string.

EXAMPLE 2

Search-Guid -String 'GUID: 123e4567-e89b-12d3-a456-426614174000'

Returns the extracted GUID 123e4567-e89b-12d3-a456-426614174000.

PARAMETERS

-String

The string containing a potential GUID.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

{{ Fill in the Description }}

OUTPUTS

System.Guid

{{ Fill in the Description }}

NOTES