4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author,...

25
Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson Systems Engineer Netwrix Corporation

Transcript of 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author,...

Page 1: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Russell Smith

IT consultant, author, and trainer.

4 Handy PowerShell Commands for Managing

the File System

Adam Stetson

Systems EngineerNetwrix Corporation

Page 2: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Managing Permissions with PowerShell

• Basic tasks using Get-Acl and Set-Acl

• FileSystem Provider cmdlets installed by default

• No cmdlet to generate reports

• Can’t modify ACEs

• Can’t create or modify NTFS shares

Page 3: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

FileSystem Provider PowerShell cmdlets

• Get-Location

• Set-Location

• Get-Item

• Get-ChildItem

• Invoke-Item

• Move-Item

• New-Item

• Remove-Item

• Get-ItemProperty

• Set-ItemProperty

• Clear-Item

• Clear-ItemProperty

• Remove-Item

• Remove-ItemProperty

• Get-Acl

• Set-Acl

• Get-AuthenticodeSignature

• Set-AuthenticodeSignature

Page 4: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Get-Acl Set-Acl

Get-ChildItem Get-EventLog

Page 5: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Other Useful PowerShell cmdlets

New-Item Remove-Item

Copy-Item Get-Content

Page 6: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Demo

Page 7: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Get Permissions

Page 8: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

File Shares

Page 9: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Copy Permissions

Page 10: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Create a Directory

Page 11: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Delete a Directory

Page 12: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

List a Directory

Page 13: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Add ACE to ACL

Page 14: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Remove ACE

Page 15: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Permissions Report

Page 16: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Report Excess Permissions

Page 17: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Search Event Log

Page 18: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Demonstration

Netwrix Auditor

Page 19: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Product Demonstration

Page 20: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Product Demonstration

Page 21: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Product Demonstration

Page 23: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Questions?

Page 24: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

Prize Drawing

Page 25: 4 Handy PowerShell Commands for Managing the File System · Russell Smith IT consultant, author, and trainer. 4 Handy PowerShell Commands for Managing the File System Adam Stetson

www. .com

Russell Smith

IT consultant, author, and trainer.

Adam Stetson

Systems EngineerNetwrix Corporation

Thank You!