您现在的位置: 主页 > 房产指南 > 正文

天津海滨人平易近医院,医院简介,引荐专家,门诊

2020-05-16 05:17  来源:原创   字号:T | T

Parameter()] [ValidateNotNullOrEmpty()] [Uri] $IconUri, [Parameter()] [string[]] $ReleaseNotes, [Parameter()] [switch] $PassThru, [Parameter()] [switch] $Force ) Process { $scriptFilePath = $null if($Path) { $scriptFilePath = Resolve-PathHelper -Path $Path -CallerPSCmdlet $PSCmdlet | Microsoft.PowerShell.Utility\Select-Object -First 1 if(-not $scriptFilePath -or -not (Microsoft.PowerShell.Management\Test-Path -Path $scriptFilePath -PathType Leaf)) { $errorMessage = ($LocalizedData.PathNotFound -f $Path) ThrowError -ExceptionName "System.ArgumentException" ` -ExceptionMessage $errorMessage ` -ErrorId "PathNotFound" ` -CallerPSCmdlet $PSCmdlet ` -ExceptionObject $Path ` -ErrorCategory InvalidArgument } } else { $scriptFilePath = Resolve-PathHelper -Path $LiteralPath -IsLiteralPath -CallerPSCmdlet $PSCmdlet | Microsoft.PowerShell.Utility\Select-Object -First 1 if(-not $scriptFilePath -or -not (Microsoft.PowerShell.Management\Test-Path -LiteralPath $scriptFilePath -PathType Leaf)) { $errorMessage = ($LocalizedData.PathNotFound -f $LiteralPath) ThrowError -ExceptionName "System.ArgumentException" ` -ExceptionMessage $errorMessage ` -ErrorId "PathNotFound" ` -CallerPSCmdlet $PSCmdlet ` -ExceptionObject $LiteralPath ` -ErrorCategory InvalidArgument } } if(-not $scriptFilePath.EndsWith('.ps1', [System.StringComparison]::OrdinalIgnoreCase)) { $errorMessage = ($LocalizedData.InvalidScriptFilePath -f $scriptFilePath) ThrowError -ExceptionName "System.ArgumentException" ` -ExceptionMessage $errorMessage ` -ErrorId "InvalidScriptFilePath" ` -CallerPSCmdlet $PSCmdlet ` -ExceptionObject $scriptFilePath ` -ErrorCategory InvalidArgument return } $psscriptInfo = $null try { $psscriptInfo = Test-ScriptFileInfo -LiteralPath $scriptFilePath } catch { if(-not $Force) { throw $_ return } } if(-not $psscriptInfo) { if(-not $Description) { ThrowError -ExceptionName "System.ArgumentException" ` -ExceptionMessage $LocalizedData.DescriptionParameterIsMissingForAddingTheScriptFileInfo ` -ErrorId 'DescriptionParameterIsMissingForAddingTheScriptFileInfo' ` -CallerPSCmdlet $PSCmdlet ` -ErrorCategory InvalidArgument return } if(-not $Version) { $Version = [Version]'1.0' } if(-not $Author) { $Author = (Get-EnvironmentVariable -Name 'USERNAME' -Target $script:EnvironmentVariableTarget.Process -ErrorAction SilentlyContinue) } if(-not $Guid) { $Guid = [System.Guid]::NewGuid() } } else { # Use existing values if any of the parameters are not specified during Update-ScriptFileInfo if(-not $Version -and $psscriptInfo.Version) { $Version = $psscriptInfo.Version }