This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* via http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database | |
Security Audit Report | |
1) List all access provisioned to a sql user or windows user/group directly | |
2) List all access provisioned to a sql user or windows user/group through a database or application role | |
3) List all access provisioned to the public role | |
Columns Returned: | |
UserName : SQL or Windows/Active Directory user cccount. This could also be an Active Directory group. | |
UserType : Value will be either 'SQL User' or 'Windows User'. This reflects the type of user defined for the | |
SQL Server user account. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure you get the right files | |
for f in `ls -tr *.MP4`; do echo "file '$PWD/$f'";done | |
# Merge the files | |
fmpeg -f concat -safe 0 -i <(for f in ./*.MP4; do echo "file '$PWD/$f'"; done) -c copy output.MP4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Option 1 | |
invoke-restmethod -method Get -URI "https://www.powershellgallery.com/api/v2/Search()?`$filter=(startswith(Id,'PSClass') and IsLatestVersion) or (startswith(Id,'Adsi') and IsLatestVersion)"| | |
select -expand properties|select -expand downloadcount | |
# Option 2 | |
$a = find-module az | |
$a.AdditionalMetadata.Downloadcount # total download | |
$a.AdditionalMetadata.versionDownloadCount # download for current version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module MeetupPS | |
Get-MeetupEvent -GroupName FrenchPSUG -status past | | |
Select Name,local_date,link, yes_rsvp_count | | |
Export-csv "Meetup.com-FRPSUG$(Get-Date -format yyyyMMdd).csv" -notype -enco UTF8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://lazywinadmin.com/2018/01/MVPModule-BackupMyEntries.html#backup-per-year | |
# Connect to api | |
$Key = '<Your Secret key>' | |
Set-MVPConfiguration -SubscriptionKey $Key | |
# Get All contributions | |
$AllContrib = Get-MVPContribution -limit 1000 | |
# Retrieve important data and select the useful properties that | |
# we can use for the next import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((iwr https://www.powershellgallery.com/stats/packages).content -split '\r\n' |sls -Pattern '<a href="/packages/' -Context 0,1)|%{[pscustomobject]@{'Package'=$_.line -replace '<td><a href="/packages/.+/">|</a></td>|\s+';"Stats"=([string]($_.context.postcontext) -replace '\s+|<td><a href="/stats/packages/.+?groupby=Version">|</a></td>')-as [int];"Link"=-join("https://www.powershellgallery.com",$_.line -replace '<td><a href="|/">.+</a></td>|\s+')}}|select -first 100 | |
<# | |
Package Stats Link | |
------- ----- ---- | |
SpeculationControl 20195596 https://www.powershellgallery.com/packages/SpeculationControl | |
AzureRM.profile 2205020 https://www.powershellgallery.com/packages/AzureRM.profile | |
Carbon 1507538 https://www.powershellgallery.com/packages/Carbon | |
AzureRM.KeyVault 1398051 https://www.powershellgallery.com/packages/AzureRM.KeyVault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irm https://www.youtube.com/feeds/videos.xml?channel_id=UCyxicOKZNm_u1opF_xAYfDA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$source = @' | |
using System; | |
using System.Security.Principal; | |
using System.Runtime.InteropServices; | |
namespace ECGCAT | |
{ | |
public class Kernel32 | |
{ | |
[DllImport("Kernel32.dll", SetLastError = true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$source = @' | |
using System; | |
using System.Security.Principal; | |
using System.Runtime.InteropServices; | |
namespace ECGCAT | |
{ | |
public class Kernel32 | |
{ | |
[DllImport("Kernel32.dll", SetLastError = true)] |
NewerOlder