Skip to content

Commit

Permalink
➕ ADD Get-FSInfo
Browse files Browse the repository at this point in the history
GET SYNO.FileStation.Info
  • Loading branch information
pspete committed May 14, 2019
1 parent 0437813 commit 489f576
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions pSynology/Functions/Get-FSInfo.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
function Get-FSInfo {

[CmdletBinding()]
param()

BEGIN {

$Parameters = @{
api = "SYNO.FileStation.Info"
method = "get"
version = "2"
}

$WebAPIPath = "/webapi/entry.cgi?"

}#begin

PROCESS {

#Construct Request URI
$URI = $URL + $WebAPIPath + "$($Parameters | Get-Parameter)"

Write-Verbose $URI

#Send Logon Request
$Response = Invoke-Request -Uri $URI -Method GET -WebSession $ThisSession

If ($Response) {
$Response
}

}#process

END { }#end

}
3 changes: 2 additions & 1 deletion pSynology/pSynology.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
# Functions to export from this module
FunctionsToExport = @(
'New-Session',
'Close-Session'
'Close-Session',
'Get-FSInfo'
)

# AliasesToExport = @()
Expand Down

0 comments on commit 489f576

Please sign in to comment.