Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
43
Task/URL-parser/PowerShell/url-parser-1.ps1
Normal file
43
Task/URL-parser/PowerShell/url-parser-1.ps1
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
function Get-ParsedUrl
|
||||
{
|
||||
[CmdletBinding()]
|
||||
[OutputType([PSCustomObject])]
|
||||
Param
|
||||
(
|
||||
[Parameter(Mandatory=$true,
|
||||
ValueFromPipeline=$true,
|
||||
ValueFromPipelineByPropertyName=$true,
|
||||
Position=0)]
|
||||
[System.Uri]
|
||||
$InputObject
|
||||
)
|
||||
|
||||
Process
|
||||
{
|
||||
foreach ($url in $InputObject)
|
||||
{
|
||||
$url | Select-Object -Property Scheme,
|
||||
@{Name="Domain"; Expression={$_.Host}},
|
||||
Port,
|
||||
@{Name="Path" ; Expression={$_.LocalPath}},
|
||||
Query,
|
||||
Fragment,
|
||||
AbsolutePath,
|
||||
AbsoluteUri,
|
||||
Authority,
|
||||
HostNameType,
|
||||
IsDefaultPort,
|
||||
IsFile,
|
||||
IsLoopback,
|
||||
PathAndQuery,
|
||||
Segments,
|
||||
IsUnc,
|
||||
OriginalString,
|
||||
DnsSafeHost,
|
||||
IdnHost,
|
||||
IsAbsoluteUri,
|
||||
UserEscaped,
|
||||
UserInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue