Skip to content

Instantly share code, notes, and snippets.

View dotps1's full-sized avatar

Thomas Malkewitz dotps1

View GitHub Profile
@dotps1
dotps1 / Export-AclToCsv.ps1
Last active January 5, 2024 08:22
Formats some acl properties to nice, readable csv columns.
<#
.SYNOPSIS
Gets useful ACL properties and exports them to a CSV file.
.DESCRIPTION
Gets Path, Owner, Access, Inheritance, and InheritanceFlags of an object(s) and export them to a CSV.
The CSV format is desinged for user firendly read-ablitly.
The first two columns of a row will be Path and Owner, then the next row(s) will be the Identity and Permissions of the left most object.
Once the next object is enumerated, the Path and Owner will begin on the left most column.
Example Output of 'Export-AclToCsv -Path "\\Server\Share" -ExportPath $env:HOMEPATH + "\test.csv":
@dotps1
dotps1 / New-RandomPassword.ps1
Last active April 30, 2025 17:42
Create a new random password with powershell, specify length, upper case, lower case, numbers, symbols. all are ASCII mapped arrays.
<#
.SYNOPSIS
Creates random password string of length 1 to 100.
.DESCRIPTION
Creates random password with ability to choose what characters are in the string and the length, the symbols can be specificlly defined.
.EXAMPLE
New-RandomPassword -Length 8 -Lowercase
In this example, a random string that consists of 8 lowercase charcters will be returned.
.EXAMPLE
New-RandomPassword -Length 15 -Lowercase -Uppercase -Numbers -Symbols
@dotps1
dotps1 / Get-SqlEdition.ps1
Last active August 29, 2015 13:56
Gets SQL Edition Type for each installed SQL Instance
<#
.SYNOPSIS
Collects each SQL Edition Type by Instance Name.
.DESCRIPTION
Enumerates the registry for installed instances of SQL, then foreach installed instance, it enumerates the Edition Type.
.EXAMPLE
Get-SqlEdition -ComputerName MySQLServer.mydomain.org
.EXAMPLE
@("MyComputer","MyServer","MyDomainController") | %{ Get-SqlEdition -ComputerName $_ }
.NOTES