Add files via upload
This commit is contained in:
parent
4340cc4218
commit
11bceff7a5
1 changed files with 6 additions and 0 deletions
6
posh.txt
6
posh.txt
|
|
@ -1072,6 +1072,7 @@ $WBadmin_cmd = "wbadmin.exe START BACKUP -backupTarget:$TargetUNC -systemState -
|
||||||
Invoke-Expression $WBadmin_cmd
|
Invoke-Expression $WBadmin_cmd
|
||||||
|
|
||||||
### DNS
|
### DNS
|
||||||
|
|
||||||
$zone = icm $srv {Get-DnsServerZone} | select ZoneName,ZoneType,DynamicUpdate,ReplicationScope,SecureSecondaries,
|
$zone = icm $srv {Get-DnsServerZone} | select ZoneName,ZoneType,DynamicUpdate,ReplicationScope,SecureSecondaries,
|
||||||
DirectoryPartitionName | Out-GridView -Title "DNS Server: $srv" –PassThru
|
DirectoryPartitionName | Out-GridView -Title "DNS Server: $srv" –PassThru
|
||||||
$zone_name = $zone.ZoneName
|
$zone_name = $zone.ZoneName
|
||||||
|
|
@ -1104,6 +1105,7 @@ $TextA = "$FQDN IN A $IP"
|
||||||
}
|
}
|
||||||
|
|
||||||
### DHCP
|
### DHCP
|
||||||
|
|
||||||
$mac = icm $srv -ScriptBlock {Get-DhcpServerv4Scope | Get-DhcpServerv4Lease} | select AddressState,
|
$mac = icm $srv -ScriptBlock {Get-DhcpServerv4Scope | Get-DhcpServerv4Lease} | select AddressState,
|
||||||
HostName,IPAddress,ClientId,DnsRegistration,DnsRR,ScopeId,ServerIP | Out-GridView -Title "HDCP Server: $srv" –PassThru
|
HostName,IPAddress,ClientId,DnsRegistration,DnsRR,ScopeId,ServerIP | Out-GridView -Title "HDCP Server: $srv" –PassThru
|
||||||
(New-Object -ComObject Wscript.Shell).Popup($mac.ClientId,0,$mac.HostName,64)
|
(New-Object -ComObject Wscript.Shell).Popup($mac.ClientId,0,$mac.HostName,64)
|
||||||
|
|
@ -1736,6 +1738,8 @@ PATCH - Partial update/modify
|
||||||
PUT - Update/replace
|
PUT - Update/replace
|
||||||
DELETE - Remove
|
DELETE - Remove
|
||||||
|
|
||||||
|
### Token
|
||||||
|
|
||||||
https://veeam-11:9419/swagger/ui/index.html
|
https://veeam-11:9419/swagger/ui/index.html
|
||||||
$Header = @{
|
$Header = @{
|
||||||
"x-api-version" = "1.0-rev2"
|
"x-api-version" = "1.0-rev2"
|
||||||
|
|
@ -1748,6 +1752,8 @@ $Body = @{
|
||||||
$vpost = iwr "https://veeam-11:9419/api/oauth2/token" -Method POST -Headers $Header -Body $Body -SkipCertificateCheck
|
$vpost = iwr "https://veeam-11:9419/api/oauth2/token" -Method POST -Headers $Header -Body $Body -SkipCertificateCheck
|
||||||
$vtoken = (($vpost.Content) -split '"')[3]
|
$vtoken = (($vpost.Content) -split '"')[3]
|
||||||
|
|
||||||
|
### GET
|
||||||
|
|
||||||
$token = $vtoken | ConvertTo-SecureString -AsPlainText –Force
|
$token = $vtoken | ConvertTo-SecureString -AsPlainText –Force
|
||||||
$vjob = iwr "https://veeam-11:9419/api/v1/jobs" -Method GET -Headers $Header -Authentication Bearer -Token $token -SkipCertificateCheck
|
$vjob = iwr "https://veeam-11:9419/api/v1/jobs" -Method GET -Headers $Header -Authentication Bearer -Token $token -SkipCertificateCheck
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue