Class A 0-126
Class B 128-191
Class C 192-223
Class D 224-239 (Used
for Multicast)
Class E 240-255 (Used
for Research and Education)
Private address range:
10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255
192.168.0.0 to 192.168.255.255
169.254.0.0 to 169.254.255.255 (used as self assigned IP)
Tuesday, January 8, 2013
Wednesday, January 2, 2013
Get Shared Folders & Access Permissions
I have compiled a command to dig out Shared folders & there access permissions.
=============================================================================================
ACL :
1.
Get-Acl c:\foldername | Select-Object
Path,Owner,Group,AccessToString | Export-Csv -path C:\ACL.CSV
2.
Dir c:\foldername | Get-Acl | Select-Object
Path,Owner,Group,AccessToString | Export-Csv -path c:\dir.csv
3.
Get-content -path c:\folders.txt | get-acl |
Select-Object Path,Owner,Group,AccessToString | Export-Csv c:\folders.csv
4.
Get-Content Folders.txt | Foreach-Object {
get-acl $_ }
5.
Classical Commands : Cacls & Xcacls
Share Folders :
1.
Get-WmiObject win32_share
2.
Get-WmiObject win32_share -filter
"name='foldername'"
3.
Get-WmiObject win32_share | Select-Object
path,name,description | Export-Csv c:\AllShareFolders.csv
4.
$Share = gwmi -class Win32_Share | sort type,
name
$Share | ft name, description, type, path -auto
$Share | ft name, description, type, path -auto
Combined :
Get-WmiObject win32_share -filter "name='test'" |
get-acl | Select-Object Path,Owner,AccessToString | fl
Whole & Soul:
Get-WmiObject win32_share | Get-Acl | Select-Object
Path,Owner,AccessToString | Export-Csv -path c:\permissions.csv
===============================================================================================
Get OCS sip enabled User id's using QPowershell
If you ever want to dig OCS enabled user's from AD, Below is a powershell command.
Syntax:
Get-Content -Path "c:\UsersList.txt" | Get-QADUser -LDAPFilter '(msRTCSIP-UserEnabled=TRUE)' -IncludedProperties 'msRTCSIP-PrimaryUserAddress' | select-object msrtcsip-primaryuseraddress,dn | Export-Csv -Path "c:\OCSusers.csv" -Verbose
Syntax:
Get-Content -Path "c:\UsersList.txt" | Get-QADUser -LDAPFilter '(msRTCSIP-UserEnabled=TRUE)' -IncludedProperties 'msRTCSIP-PrimaryUserAddress' | select-object msrtcsip-primaryuseraddress,dn | Export-Csv -Path "c:\OCSusers.csv" -Verbose
Subscribe to:
Posts (Atom)