General Powershell Notes

From Michael's Information Zone
Revision as of 16:42, 26 May 2017 by Michael.mast (talk | contribs)
Jump to navigation Jump to search

[1]

Powershell Version

[2]

$PSVersionTable

NTFS Permissions

[3] [4]

Get-NTFSAccess -path .\Contacts
add-ntfsaccess -path .\contacts -account first.last -accessrights read

Passing Passwords to PSSession

[5] Convert to secure string then call from file. This following pulls from stdin as a secure string (converts what you type), then converts that to something (I'm still new to Microsoft's ways of doing things), then stores as a file.

read-host -assecurestring | convertfrom-securestring | out-file C:\securestring.txt