I am new to SharePoint and am writing PowerShell scripts to create a number of libraries. Each library will be added as a list webpart on a webpart page for added security. Finally, the page is added to navigation. I have been able to write the code for creating the libraries, pages and the navigation and added security to both the navigation and the library. So, users without access to certain pages will not be able to see the navigation and the library. However, if someone has a link to the page, they will be able to go directly to the page without using the navigation.
Can someone please point me in the right direction so I can add security to the pages as well or is it even possible?