Add files via upload
This commit is contained in:
		
							parent
							
								
									3a0117651d
								
							
						
					
					
						commit
						e8fe808b7b
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		
							
								
								
									
										10
									
								
								posh.txt
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								posh.txt
									
										
									
									
									
								
							|  | @ -2107,7 +2107,7 @@ $data = ps | |||
| $Chart = New-ExcelChartDefinition -XRange CPU -YRange WS -Title "Process" -NoLegend | ||||
| $data | Export-Excel .\ps.xlsx -AutoNameRange -ExcelChartDefinition $Chart -Show | ||||
| 
 | ||||
| # XML (Extensible Markup Language) | ||||
| # XML | ||||
| 
 | ||||
| $xml = [xml](Get-Content $home\desktop\test.rdg) # прочитать содержимое XML-файла | ||||
| $xml.load("$home\desktop\test.rdg") # открыть файл | ||||
|  | @ -2133,7 +2133,7 @@ return | |||
| } | ||||
| } | ||||
| 
 | ||||
| ### XmlWriter | ||||
| ### XmlWriter (Extensible Markup Language) | ||||
| 
 | ||||
| $XmlWriterSettings = New-Object System.Xml.XmlWriterSettings | ||||
| $XmlWriterSettings.Indent = $true # включить отступы | ||||
|  | @ -2186,8 +2186,6 @@ $log = ' | |||
|   } | ||||
| }' | ConvertFrom-Json | ||||
| 
 | ||||
| Invoke-RestMethod -Uri "https://jsonplaceholder.typicode.com/posts" -Method Get # GET-запрос для получения объекта JSON | ||||
| 
 | ||||
| ### YAML (Yet Another Markup Language) | ||||
| 
 | ||||
| Import-Module PSYaml | ||||
|  | @ -2209,10 +2207,14 @@ $Result.Values.ethernets.ens160.nameservers | |||
| ### HTML (HyperText Markup Language) | ||||
| Get-Process | select Name, CPU | ConvertTo-HTML -As Table > "$home\desktop\proc-table.html" # вывод в формате List (Format-List) или Table (Format-Table) | ||||
| 
 | ||||
| ### PSWriteHTML | ||||
| 
 | ||||
| Import-Module PSWriteHTML | ||||
| (Get-Module PSWriteHTML).ExportedCommands | ||||
| Get-Service | Out-GridHtml -FilePath ~\Desktop\Get-Service-Out-GridHtml.html | ||||
| 
 | ||||
| ### HtmlReport | ||||
| 
 | ||||
| Import-Module HtmlReport | ||||
| $topVM = ps | Sort PrivateMemorySize -Descending | Select -First 10 | %{,@(($_.ProcessName + " " + $_.Id), $_.PrivateMemorySize)} | ||||
| $topCPU = ps | Sort CPU -Descending | Select -First 10 | %{,@(($_.ProcessName + " " + $_.Id), $_.CPU)} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue