36 lines
1.2 KiB
PowerShell
36 lines
1.2 KiB
PowerShell
Invoke-RestMethod -Method Post -Uri "https://itdpv.nd.gov/api/passwords" -ContentType "application/json" -Body $PasswordJson
|
|
|
|
|
|
|
|
Invoke-RestMethod -Method Get -Uri 'https://itdpv.nd.gov/winapi/passwords/20841' -Credential $PrvCred
|
|
|
|
$Uri = 'https://itdpv.nd.gov/winapi/searchpasswords/?search=zm'
|
|
$x=Invoke-RestMethod -Method Get -Uri $Uri -Credential $PrvCred
|
|
|
|
|
|
|
|
$Uri = 'https://itdpv.nd.gov/winapi/passwordlists/377'
|
|
Invoke-RestMethod -Method Get -Uri $Uri -Credential $PrvCred
|
|
|
|
|
|
|
|
# Retrieving password
|
|
$PasswordstateUrl = 'https://itdpv.nd.gov/winapi/passwords/18824'
|
|
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Credential $PrvCred
|
|
|
|
# search for password
|
|
$Uri = 'https://itdpv.nd.gov/winapi/searchpasswords/?search=M365'
|
|
Invoke-RestMethod -Method Get -Uri $Uri -Credential $PrvCred
|
|
|
|
# adding a password
|
|
$jsonData = '
|
|
{
|
|
"PasswordListID":"53",
|
|
"Title":"itdzmbuild01.nd.gov",
|
|
"UserName":"test",
|
|
"password":"TESTpass12#$%"
|
|
}
|
|
'
|
|
|
|
$PasswordstateUrl = 'https://itdpv.nd.gov/winapi/passwords'
|
|
$result = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -ContentType "application/json" -Body $jsonData -Credential $PrvCred |