Update README.md

This commit is contained in:
Alex Kup 2023-04-11 14:26:26 +03:00 committed by GitHub
parent c926e20b2d
commit e286b0db0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,8 +17,8 @@
- [EMShell](#EMShell) - [EMShell](#EMShell)
- [PowerCLI](#PowerCLI) - [PowerCLI](#PowerCLI)
- [VBR](#VBR) - [VBR](#VBR)
- [REST API](#REST API) - [REST API](#REST-API)
- [Console API](#Console API) - [Console API](#Console-API)
- [Git](#Git) - [Git](#Git)
### Help ### Help
@ -1468,7 +1468,7 @@ Resynchronizing - ошибка и приостановка копировани
`Get-VBRRestorePoint` \ `Get-VBRRestorePoint` \
`Get-VBRViProxy` `Get-VBRViProxy`
# REST API # REST-API
`$pars = Invoke-WebRequest -Uri $url` \ `$pars = Invoke-WebRequest -Uri $url` \
`$pars | Get-Member` \ `$pars | Get-Member` \
@ -1521,11 +1521,11 @@ DELETE - Remove
`$vjob = Invoke-RestMethod "https://veeam-11:9419/api/v1/jobs" -Method GET -Headers $Header -SkipCertificateCheck` \ `$vjob = Invoke-RestMethod "https://veeam-11:9419/api/v1/jobs" -Method GET -Headers $Header -SkipCertificateCheck` \
`$vjob.data.virtualMachines.includes.inventoryObject` `$vjob.data.virtualMachines.includes.inventoryObject`
# Console API # Console-API
[Console] | Get-Member -Static
[Console]::BackgroundColor = "Blue"
`[Console] | Get-Member -Static` \
`[Console]::BackgroundColor = "Blue"`
```
do { do {
if ([Console]::KeyAvailable) { if ([Console]::KeyAvailable) {
$keyInfo = [Console]::ReadKey($true) $keyInfo = [Console]::ReadKey($true)
@ -1559,14 +1559,14 @@ $pressed = Get-KeyPress -Key Q -ModifierKey 'Control,Shift'
if ($pressed) {break} if ($pressed) {break}
sleep 1 sleep 1
} while ($true) } while ($true)
```
### Windows-API
### Windows API `Add-Type -AssemblyName System.Windows.Forms` \
`[int][System.Windows.Forms.Keys]::F1`
Add-Type -AssemblyName System.Windows.Forms
[int][System.Windows.Forms.Keys]::F1
65..90 | % {"{0} = {1}" -f $_, [System.Windows.Forms.Keys]$_}
`65..90 | % {"{0} = {1}" -f $_, [System.Windows.Forms.Keys]$_}`
```
function Get-ControlKey { function Get-ControlKey {
$key = 112 $key = 112
$Signature = @' $Signature = @'
@ -1584,7 +1584,7 @@ $pressed = Get-ControlKey
if ($pressed) { break } if ($pressed) { break }
Start-Sleep -Seconds 1 Start-Sleep -Seconds 1
} while ($true) } while ($true)
```
### [Clicker] ### [Clicker]
``` ```
$cSource = @' $cSource = @'
@ -1651,7 +1651,7 @@ public static void LeftClickAtPoint(int x, int y)
`[Clicker]::LeftClickAtPoint(1900,1070)` `[Clicker]::LeftClickAtPoint(1900,1070)`
### [Audio] ### [Audio]
```
Add-Type -Language CsharpVersion3 -TypeDefinition @" Add-Type -Language CsharpVersion3 -TypeDefinition @"
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
[Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
@ -1695,9 +1695,9 @@ set { Marshal.ThrowExceptionForHR(Vol().SetMute(value, System.Guid.Empty)); }
} }
} }
"@ "@
```
[Audio]::Volume = 0.50 `[Audio]::Volume = 0.50` \
[Audio]::Mute = $true `[Audio]::Mute = $true`
### Register-Event ### Register-Event