Active Directory Audit with Keyvault retrieval option.
Audit's Active Directory taking "days" as the input for how far back to check for a last sign in.
Output can be kept locally, or sent remotely via email or sftp.
Function App is the same as SendEmail except that it uses a password retrieved using the related Function App.
The related function app would need to be created.
Expects SecureString and Key as inputs to function app parameter set.
Get-ADDSActiveAccountAudit [-LocalDisk] [-AttachmentFolderPath <String>] [-ADDSAccountIsNotEnabled] [-DaysInactive <Int32>] [<CommonParameters>] Get-ADDSActiveAccountAudit [-SendMailMessage] [-SMTPServer <String>] [-AttachmentFolderPath <String>] [-ADDSAccountIsNotEnabled] [-DaysInactive <Int32>] -UserName <String> [-Password <SecureString>] [-Port <Int32>] -To <String> [-From <String>] [<CommonParameters>] Get-ADDSActiveAccountAudit [-WinSCP] [-AttachmentFolderPath <String>] [-ADDSAccountIsNotEnabled] [-DaysInactive <Int32>] -UserName <String> -Password <SecureString> -FTPHost <String> -SshHostKeyFingerprint <String> [-RemotePath <String>] [<CommonParameters>] Get-ADDSActiveAccountAudit [-FunctionApp] <String> [-Function] <String> [-SMTPServer <String>] [-AttachmentFolderPath <String>] [-ADDSAccountIsNotEnabled] [-DaysInactive <Int32>] -UserName <String> [-Port <Int32>] -To <String> [-From <String>] -ApiToken <String> [<CommonParameters>] Get-ADDSActiveAccountAudit [-Clean] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Only output data to local disk. | true | false | False | ||
Adds parameters for sending Audit Report as an Email. | true | false | False | ||
Adds parameters for sending Audit Report via SFTP. | true | true (ByPropertyName) | False | ||
Azure Function App Name. | true | false | |||
Azure Function App's Function Name. Ex. "HttpTrigger1" | true | true (ByPropertyName) | |||
Defaults to Office 365 SMTP relay. Enter optional relay here. | false | true (ByPropertyName) | smtp.office365.com | ||
Default path is C:\temp\ADDSActiveAccountAuditLogs. This is the folder where attachments are going to be saved. |
false | true (ByValue) | C:\temp\ADDSActiveAccountAuditLogs | ||
Defaults to not being set. Choose to search for disabled Active Directory Users. |
false | true (ByPropertyName) | False | ||
Defaults to 90 days in the past. Specifies how far back to look for accounts last logon. If logon is within 90 days, it won't be included. |
false | true (ByPropertyName) | 90 | ||
Specify the account with an active mailbox and MFA disabled. Ensure the account has delegated access for Send On Behalf for any UPN set in the "$From" Parameter |
true | true (ByPropertyName) | |||
Use: (Read-Host -AsSecureString) as in Examples. May be omitted. |
false | true (ByPropertyName) | |||
SMTP Port to Relay. Ports can be: "993", "995", "587", or "25" | false | true (ByPropertyName) | 587 | ||
Recipient of the attachment outputs. | true | true (ByPropertyName) | |||
Defaults to the same account as $UserName unless the parameter is set. Ensure the Account has delegated access to send on behalf for the $From account. |
false | true (ByPropertyName) | $UserName | ||
Private Function Key. | true | true (ByPropertyName) | |||
SFTP Hostname. | true | true (ByPropertyName) | |||
Adds parameters for sending Audit Report via SFTP. | true | true (ByPropertyName) | |||
Remove FTP path. Will be created in the user path under functionname folder if not specified. | false | true (ByPropertyName) | ("./" + $($MyInvocation.MyCommand.Name -replace '\..*')) | ||
Remove installed modules during run. Remove local files if not a LocalDisk run. | true | false | False |
Get-ADDSActiveAccountAudit -LocalDisk -VerboseEXAMPLE 2
Get-ADDSActiveAccountAudit -SendMailMessage -SMTPServer $SMTPServer -UserName "helpdesk@domain.com" -Password (Read-Host -AsSecureString) -To "support@domain.com" -VerboseEXAMPLE 3
Get-ADDSActiveAccountAudit -FunctionApp $FunctionApp -Function $Function -SMTPServer $SMTPServer -UserName "helpdesk@domain.com" -To "support@domain.com" -VerboseEXAMPLE 4
Get-ADDSActiveAccountAudit -WinSCP -UserName "ftphostname.UserName" -Password (Read-Host -AsSecureString) -FTPHost "ftphost.domain.com" -SshHostKeyFingerprint "<SShHostKeyFingerprint>" -VerboseEXAMPLE 5
Get-ADDSActiveAccountAudit -Clean -Verbose
Active Directory Server and Workstation Audit with Report export option (Can also be piped to CSV if Report isn't specified).
Audit's Active Directory taking "days" as the input for how far back to check for a device's last sign in.
Output can be piped to a csv manually, or automatically to C:\temp or a specified path in "DirPath" using
the -Report Switch.
Use the Tab key for the -HostType Parameter.
Get-ADDSAssetInventoryAudit [-HostType] <String> [[-DaystoConsiderAHostInactive] <Int32>] [[-Report]] [[-DirPath] <String>] [-Enabled <Boolean>] [<CommonParameters>] Get-ADDSAssetInventoryAudit [-OSType] <String> [[-DaystoConsiderAHostInactive] <Int32>] [[-Report]] [[-DirPath] <String>] [-Enabled <Boolean>] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Select from Windows Server or Windows 10 plus. | true | true (ByValue) | |||
Search an OS String. Wildcards can be omitted as the function will automatically add the wildcard characters before searching. |
true | true (ByValue) | |||
false | true (ByPropertyName) | 90 | |||
Add report output as csv to DirPath directory. | false | true (ByPropertyName) | False | ||
The path to the -Report output directory. | false | false | C:\temp\ADDSAssetInventoryAudit | ||
false | true (ByPropertyName) | True |
Get-ADDSInventoryAudit -HostType WindowsServersEXAMPLE 2
Get-ADDSInventoryAudit -HostType WindowsWorkstations -DirPath "C:\Temp\" -ReportEXAMPLE 3
Get-ADDSInventoryAudit -HostType WindowsServers -DirPath "C:\Temp\" -ReportEXAMPLE 4
Get-ADDSInventoryAudit -OSType "2008" -DirPath "C:\Temp\" -Report
Active Directory Audit with Keyvault retrieval option.
Audit's Active Directory taking a Prefix used as a Wildcard as input for checking user accounts.
Output can be kept locally, or sent remotely via email or sftp.
Function App is the same as SendEmail except that it uses a password retrieved using the related Function App.
The related function app would need to be created.
Expects SecureString and Key as inputs to function app parameter set.
Get-ADDSDepartedUsersAccountAudit [-LocalDisk] [-AttachmentFolderPath <String>] -WildCardIdentifier <String> [<CommonParameters>] Get-ADDSDepartedUsersAccountAudit [-SendMailMessage] [-SMTPServer <String>] [-AttachmentFolderPath <String>] -UserName <String> [-Password <SecureString>] [-Port <Int32>] -To <String> [-From <String>] -WildCardIdentifier <String> [<CommonParameters>] Get-ADDSDepartedUsersAccountAudit [-WinSCP] [-AttachmentFolderPath <String>] -UserName <String> -Password <SecureString> -FTPHost <String> -SshHostKeyFingerprint <String> [-RemotePath <String>] -WildCardIdentifier <String> [<CommonParameters>] Get-ADDSDepartedUsersAccountAudit [-FunctionApp] <String> [-Function] <String> [-SMTPServer <String>] [-AttachmentFolderPath <String>] -UserName <String> [-Port <Int32>] -To <String> [-From <String>] -ApiToken <String> -WildCardIdentifier <String> [<CommonParameters>] Get-ADDSDepartedUsersAccountAudit [-Clean] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Only output data to local disk. | true | false | False | ||
Adds parameters for sending Audit Report as an Email. | true | false | False | ||
Adds parameters for sending Audit Report via SFTP. | true | true (ByPropertyName) | False | ||
Azure Function App Name. | true | false | |||
Azure Function App's Function Name. Ex. "HttpTrigger1" | true | true (ByPropertyName) | |||
Defaults to Office 365 SMTP relay. Enter optional relay here. | false | true (ByPropertyName) | smtp.office365.com | ||
Default path is C:\temp\ADDSDepartedUsersAuditLogs. This is the folder where attachments are going to be saved. |
false | true (ByValue) | C:\temp\ADDSDepartedUsersAuditLogs | ||
Specify the account with an active mailbox and MFA disabled. Ensure the account has delegated access for Send On Behalf for any UPN set in the "$From" Parameter |
true | true (ByPropertyName) | |||
Use: (Read-Host -AsSecureString) as in Examples. May be omitted. |
false | true (ByPropertyName) | |||
SMTP Port to Relay. Ports can be: "993", "995", "587", or "25" | false | true (ByPropertyName) | 587 | ||
Recipient of the attachment outputs. | true | true (ByPropertyName) | |||
Defaults to the same account as $UserName unless the parameter is set. Ensure the Account has delegated access to send on behalf for the $From account. |
false | true (ByPropertyName) | $UserName | ||
Private Function Key. | true | true (ByPropertyName) | |||
true | true (ByPropertyName) | ||||
true | true (ByPropertyName) | ||||
false | true (ByPropertyName) | ("./" + $($MyInvocation.MyCommand.Name -replace '\..*')) | |||
Remove installed modules during run. Remove local files if not a LocalDisk run. | true | false | False | ||
Name wildcard appended to user account. | true | true (ByPropertyName) |
Get-ADDSDepartedUsersAccountAudit -LocalDisk -WildCardIdentifier "<StringToSearchFor>" -VerboseEXAMPLE 2
Get-ADDSDepartedUsersAccountAudit -SendMailMessage -SMTPServer $SMTPServer -UserName "helpdesk@domain.com" -Password (Read-Host -AsSecureString) -To "support@domain.com" -WildCardIdentifier "<StringToSearchFor>" -VerboseEXAMPLE 3
Get-ADDSDepartedUsersAccountAudit -FunctionApp $FunctionApp -Function $Function -SMTPServer $SMTPServer -UserName "helpdesk@domain.com" -To "support@domain.com" -WildCardIdentifier "<StringToSearchFor>" -VerboseEXAMPLE 4
Get-ADDSDepartedUsersAccountAudit -WinSCP -UserName "ftphostname.UserName" -Password (Read-Host -AsSecureString) -FTPHost "ftphost.domain.com" -SshHostKeyFingerprint "<SShHostKeyFingerprint>" -WildCardIdentifier "<StringToSearchFor>" -VerboseEXAMPLE 5
Get-ADDSDepartedUsersAccountAudit -Clean -Verbose
Active Directory Audit with Keyvault retrieval option.
Audit's Active Directory for priviledged users and groups, and extended rights.
Output can be kept locally, or sent remotely via email or sftp.
Function App is the same as SendEmail except that it uses a password retrieved using the related Function App.
The related function app would need to be created.
Expects SecureString and Key as inputs to function app parameter set.
Get-ADDSPrivilegedAccountAudit [-LocalDisk] [-AttachmentFolderPath <String>] [<CommonParameters>] Get-ADDSPrivilegedAccountAudit [-SendMailMessage] [-SMTPServer <String>] [-AttachmentFolderPath <String>] -UserName <String> [-Password <SecureString>] [-Port <Int32>] -To <String> [-From <String>] [<CommonParameters>] Get-ADDSPrivilegedAccountAudit [-WinSCP] [-AttachmentFolderPath <String>] -UserName <String> -Password <SecureString> -FTPHost <String> -SshHostKeyFingerprint <String> [-RemotePath <String>] [<CommonParameters>] Get-ADDSPrivilegedAccountAudit [-FunctionApp] <String> [-Function] <String> [-SMTPServer <String>] [-AttachmentFolderPath <String>] -UserName <String> [-Port <Int32>] -To <String> [-From <String>] -ApiToken <String> [<CommonParameters>] Get-ADDSPrivilegedAccountAudit [-Clean] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Only output data to local disk. | true | false | False | ||
Adds parameters for sending Audit Report as an Email. | true | false | False | ||
Adds parameters for sending Audit Report via SFTP. | true | true (ByPropertyName) | False | ||
Azure Function App Name. | true | false | |||
Azure Function App's Function Name. Ex. "HttpTrigger1" | true | true (ByPropertyName) | |||
Defaults to Office 365 SMTP relay. Enter optional relay here. | false | true (ByPropertyName) | smtp.office365.com | ||
Default path is C:\temp\ADDSPrivilegedAccountAuditLogs. This is the folder where attachments are going to be saved. |
false | true (ByValue) | C:\temp\ADDSPrivilegedAccountAuditLogs | ||
Specify the account with an active mailbox and MFA disabled. Ensure the account has delegated access for Send On Behalf for any UPN set in the "$From" Parameter |
true | true (ByPropertyName) | |||
Use: (Read-Host -AsSecureString) as in Examples. May be omitted. |
false | true (ByPropertyName) | |||
SMTP Port to Relay. Ports can be: "993", "995", "587", or "25" | false | true (ByPropertyName) | 587 | ||
Recipient of the attachment outputs. | true | true (ByPropertyName) | |||
Defaults to the same account as $UserName unless the parameter is set. Ensure the Account has delegated access to send on behalf for the $From account. |
false | true (ByPropertyName) | $UserName | ||
Private Function Key. | true | true (ByPropertyName) | |||
SFTP Hostname. | true | true (ByPropertyName) | |||
Adds parameters for sending Audit Report via SFTP. | true | true (ByPropertyName) | |||
Remove FTP path. Will be created in the user path under functionname folder if not specified. | false | true (ByPropertyName) | ("./" + $($MyInvocation.MyCommand.Name -replace '\..*')) | ||
Remove installed modules during run. Remove local files if not a LocalDisk run. | true | false | False |
Get-ADDSPrivilegedAccountAudit -LocalDisk -VerboseEXAMPLE 2
Get-ADDSPrivilegedAccountAudit -SendMailMessage -SMTPServer $SMTPServer -UserName "helpdesk@domain.com" -Password (Read-Host -AsSecureString) -To "support@domain.com" -VerboseEXAMPLE 3
Get-ADDSPrivilegedAccountAudit -FunctionApp $FunctionApp -Function $Function -SMTPServer $SMTPServer -UserName "helpdesk@domain.com" -To "support@domain.com" -VerboseEXAMPLE 4
Get-ADDSPrivilegedAccountAudit -WinSCP -UserName "ftphostname.UserName" -Password (Read-Host -AsSecureString) -FTPHost "ftphost.domain.com" -SshHostKeyFingerprint "<SShHostKeyFingerprint>" -VerboseEXAMPLE 5
Get-ADDSPrivilegedAccountAudit -Clean -Verbose
Takes SamAccountName as input to retrieve most recent LastLogon from all DC's.
Takes SamAccountName as input to retrieve most recent LastLogon from all DC's and output as DateTime.
Get-ADUsersLastLogon [-SamAccountName] <Object> [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Identity, UserName, Account | The SamAccountName of the user being checked for LastLogon. | true | true (ByValue) |
The output type is the type of the objects that the cmdlet emits.
Get-ADUsersLastLogon -SamAccountName "UserName"
Discovers local network and runs port scans on all hosts found for specific or default sets of ports.
Scans the network for open ports specified by the user or default ports if no ports are specified.
Creates reports if report switch is active.
Get-NetworkScan [[-Ports] <Int32[]>] [-LocalSubnets] [-Report] [<CommonParameters>] Get-NetworkScan [[-Ports] <Int32[]>] [-Computers] <String[]> [-Report] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Default ports are: "21", "22", "23", "25", "53", "67", "68", "80", "443", ` "88", "464", "123", "135", "137", "138", "139", ` "445", "389", "636", "514", "587", "1701", ` "3268", "3269", "3389", "5985", "5986" If you want to supply a port, do so as an integer or an array of integers. "22","80","443", etc. |
false | true (ByPropertyName) | |||
true | true (ByPropertyName) | False | |||
true | true (ByPropertyName) | ||||
Specify this switch if you would like a report generated in C:\temp. | false | false | False |
Get-NetworkScan -report
Takes CSV input as "LastName<space>FirstName" and flips it to "Firstname<space>Lastname"
Takes a CSV that was formatted as 'LastName, FirstName' with the comma and space removed, to 'FirstName Lastname'.
Switch-SurnameWithGivenName [[-RosterCSV] <String>] [[-AttachmentFolder] <String>] [<CommonParameters>]
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
false | true (ByValue, ByPropertyName) | ||||
false | true (ByPropertyName) | C:\temp\Switch-SurnameWithGivenName |
Switch-SurnameWithGivenName -RosterCSV "C:\temp\RosterNameColumnFormattedLastNameSpaceFirstname.csv" -Verbose