| 
									
										
										
										
											2023-08-21 11:54:12 +03:00
										 |  |  | 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" | 
					
						
							| 
									
										
										
										
											2023-10-03 22:02:33 +03:00
										 |  |  | # $apache_status | ConvertFrom-Html | 
					
						
							|  |  |  | # irm http://192.168.3.102/server-status?auto |