Skip to content

Instantly share code, notes, and snippets.

View ptchuitio84's full-sized avatar

Patrick R. Tchuitio ptchuitio84

View GitHub Profile
@ptchuitio84
ptchuitio84 / Get-SharesWithShareAndNTFSPermissions.ps1
Last active January 12, 2025 22:49 — forked from Juanito99/Get-SharesWithShareAndNTFSPermissions
List File-Shares with Share and NTFS Permissions in PowerShell
<#
License terms
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
#>
#get all Shares
@ptchuitio84
ptchuitio84 / Get-ServerDNSSettings.ps1
Created August 15, 2022 14:48 — forked from flickerfly/Get-ServerDNSSettings.ps1
Check the DNS Settings for all Windows Servers
# Source: http://www.jbmurphy.com/2013/09/23/quick-powershell-script-to-check-dns-settings-on-all-servers/
# Could use error checking to not throw an alert when the server isn't accessible
$AllServers=Get-ADComputer -Filter {OperatingSystem -Like "Windows Server*"}
ForEach ($Server in $AllServers){
$Result=Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = 'True'" -Property DNSServerSearchOrder -ComputerName $Server.Name
$output = new-object PSObject
$output | add-member NoteProperty "ComputerName" $Server.Name
$output | add-member NoteProperty "DNSServerSearchOrder" $Result.DNSServerSearchOrder
$output