Add converter url to text
This commit is contained in:
		
							parent
							
								
									350807c951
								
							
						
					
					
						commit
						2e404e7a09
					
				
					 1 changed files with 13 additions and 0 deletions
				
			
		
							
								
								
									
										13
									
								
								Scripts/ConvertFrom-Html.psm1
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Scripts/ConvertFrom-Html.psm1
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | ||||||
|  | function ConvertFrom-Html { | ||||||
|  |     param ( | ||||||
|  |         [Parameter(ValueFromPipeline)]$url | ||||||
|  |     ) | ||||||
|  |     $irm = Invoke-RestMethod $url | ||||||
|  |     $HTMLFile = New-Object -ComObject HTMLFile | ||||||
|  |     $Bytes = [System.Text.Encoding]::Unicode.GetBytes($irm) | ||||||
|  |     $HTMLFile.write($Bytes) | ||||||
|  |     ($HTMLFile.all | where {$_.tagname -eq "body"}).innerText | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | # $apache_status = "http://192.168.3.102/server-status" | ||||||
|  | # $apache_status | ConvertFrom-Html | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue