< Back

Set-SFTPPathAttribute

Sat Jan 18, 2020 8:00 pm

NAME Set-SFTPPathAttribute



SYNOPSIS

Sets one or more attributes on a scefied item to a remote server though a SFTP Session.





SYNTAX

Set-SFTPPathAttribute [-SessionId] <Int32[]> [-Path] <String> [-LastAccessTime <DateTime>] [-LastWriteTime

<DateTime>] [-GroupId <Int32>] [-UserId <Int32>] [-GroupCanExecute <Boolean>] [-GroupCanRead <Boolean>]

[-GroupCanWrite <Boolean>] [-OthersCanExecute <Boolean>] [-OthersCanRead <Boolean>] [-OthersCanWrite <Boolean>]

[-OwnerCanExecute <Boolean>] [-OwnerCanRead <Boolean>] [-OwnerCanWrite <Boolean>] [<CommonParameters>]



Set-SFTPPathAttribute [-SFTPSession] <SftpSession[]> [-Path] <String> [-LastAccessTime <DateTime>] [-LastWriteTime

<DateTime>] [-GroupId <Int32>] [-UserId <Int32>] [-GroupCanExecute <Boolean>] [-GroupCanRead <Boolean>]

[-GroupCanWrite <Boolean>] [-OthersCanExecute <Boolean>] [-OthersCanRead <Boolean>] [-OthersCanWrite <Boolean>]

[-OwnerCanExecute <Boolean>] [-OwnerCanRead <Boolean>] [-OwnerCanWrite <Boolean>] [<CommonParameters>]





DESCRIPTION

Sets one or more attributes on a scefied item to a remote server though a SFTP Session.





PARAMETERS

-SessionId <Int32[]>

Session Id of an existing SFTPSession.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Path <String>

Remote path we want to set attribute on.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-LastAccessTime <DateTime>

Set the last access time.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-LastWriteTime <DateTime>

Set the last write time.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-GroupId <Int32>

Set a group id.



Required? false

Position? named

Default value 0

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-UserId <Int32>

Set the user id.



Required? false

Position? named

Default value 0

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-GroupCanExecute <Boolean>

Set if the owning group can execute.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-GroupCanRead <Boolean>

Set if the owning group can read.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-GroupCanWrite <Boolean>

Set if the owning group can write.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-OthersCanExecute <Boolean>

Set if others can execute.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-OthersCanRead <Boolean>

Set if others can read.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-OthersCanWrite <Boolean>

Set if others can write.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-OwnerCanExecute <Boolean>

Set if owner can execute.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-OwnerCanRead <Boolean>

Set if owner can read.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-OwnerCanWrite <Boolean>

Set if owner can write.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-SFTPSession <SftpSession[]>

Existing SFTPSession object.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.Int32[]





System.String





System.DateTime





System.Int32





System.Boolean





SSH.SftpSession[]







OUTPUTS

Renci.SshNet.Sftp.SftpFileAttributes







NOTES









Example 1



PS C:\\> Set-SFTPPathAttribute -SessionId 0 -Path /usr/local/test_tools/dns_test.py -GroupCanExecute $true

-OwnerCanExecute $true -OthersCanExecute $true



Make a specific file executable by all.



RELATED LINKS

Online Version: https://github.com/darkoperator/Posh-SS ... aster/docs