Skip to content

Formats any 1-16 digit mixed string to a phone number object

License

Notifications You must be signed in to change notification settings

zpbonjour/ps-phone-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

.SYNOPSIS
    This function is designed to format a mixed string of 1-16 digit numbers as a phone number.

.DESCRIPTION
    This function will take a string of numbers and letters or special characters and output a formatted
    phone number object.  All non-number characters are stripped out and replaced in the proper place

.PARAMETER InputNumber
    This is the only parameter.  It is the number or string to be formatted

.EXAMPLE
     format-phone -InputNumber +12349215237

.EXAMPLE
     (format-phone -InputNumber 1-2349215237).PrettyNumber

.EXAMPLE
     (format-phone -InputNumber 6432215237).AreaCode

.INPUTS
    String

.OUTPUTS
    PSCustomObject

.NOTES
    Author:  Zachary Bonjour
    Website: https://www.linkedin.com/in/zachary-bonjour/
    Report issues or bugs at https://github.com/zpbonjour/ps-phone-formatter

About

Formats any 1-16 digit mixed string to a phone number object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published