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
<# | |
.SYNOPSIS | |
Sets the values for the title and metadata fields for the Contoso Customer Production Docs library | |
.DESCRIPTION | |
For each item in the library a lookup is performed either against the ERP, the file name or the parent folder names to generate a value for the current field. Possible values are matched against the contents in the term store to confirm the value can be set. The script also picks up where it left off from the last run using the last item id and last results count. Once the script is finished if a new customer folder is found the metadata defaults script, Set-MetaDataDefaults.ps1, is kicked off to set the defaults for that folder. | |
.NOTES | |
Britt Thompson | |
[email protected] | |
#> | |
#region ASSEMBLIES, SNAPINS, MODULES |
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
function Get-ServiceAccounts | |
{ | |
<# | |
.SYNOPSIS | |
Collect logins for services and scheduled tasks that are likely to be service accounts | |
.DESCRIPTION | |
Remotely collect a CSV and log of all accounts associated with scheduled tasks and services on servers. Useful for when you plan to make changes to old admin passowrds. | |
.PARAMETER ComputerName | |
String array of computer names to check for service accounts | |
.PARAMETER CSV |
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
function Get-ServiceAccounts | |
{ | |
<# | |
.SYNOPSIS | |
Reaches out to the given servers to get service accounts used in services and scheduled tasks | |
.DESCRIPTION | |
Checks each server in the list of given computers for non-System accounts used in services and non-Microsoft scheduled tasks | |
.EXAMPLE | |
Get-ServiceAccounts -ComputerName "SERVER1","SERVER2" -CSV | |
.NOTES |
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
{ | |
"Locales":{ | |
"Datacenter":"10.11.16", | |
"Marietta":"10.0.1", | |
"Atlanta":"10.5.20" | |
} | |
} |
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
function Get-RDSCurrentSession | |
{ | |
<# | |
.SYNOPSIS | |
Provides information about the current logged in session on the session host | |
.DESCRIPTION | |
Using Cassia .NET Library gathers information on the current logged in user/client on the local session host | |
.EXAMPLE | |
PS>Get-RDSCurrentSession | |
.OUTPUTS |
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
function Get-InstalledPrinters | |
{ | |
<# | |
.SYNOPSIS | |
Simple function to grab details regarding locally installed printers on servers | |
.DESCRIPTION | |
Uses WMI to pull locally installed printer information for output to CSV or other destination | |
.EXAMPLE | |
PS>Get-InstalledPrinters "SERVER1","SERVER2","SERVER3" -Unique | |
.PARAMETER Computers |
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
function Start-ProfileMigration | |
{ | |
<# | |
.SYNOPSIS | |
Advanced data migration function using Robocopy | |
.DESCRIPTION | |
Using Robocopy and designed for scheduling multiple incremental data migrations to mirror the source with the destination | |
.PARAMETER Name | |
Job name string to use in labeling log files and output | |
.PARAMETER Source |
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
function Start-DataMigration | |
{ | |
<# | |
.SYNOPSIS | |
Simple data migration function using Robocopy | |
.DESCRIPTION | |
Using Robocopy and designed for scheduled incremental data migration to mirron the source with the destination | |
.EXAMPLE | |
Example of how to use this cmdlet | |
PS>Start-DataMigration -Name "UserMigration" -Source "\\SERVER1\Share" -Destination "E:\Share" -ExcludeFiles "*.vmdk","*.mp3","*.iso" |
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
function Get-SecurityLogs | |
{ | |
<# | |
.SYNOPSIS | |
Pulls security logs from the given list of computers using the given date range | |
.DESCRIPTION | |
Using the computername, startdate and enddate parameters you can pull the event logs for the given computers. Once the data is collected to a variable you can alter the output as needed. | |
.EXAMPLE | |
PS>Get-SecurityLogs | |
Collects the security logs for the last day on the local machine |
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
function Get-Catch | |
{ | |
<# | |
.SYNOPSIS | |
Allows you to use a single line of code for your catch | |
.DESCRIPTION | |
Creates consistent repeatable error output in your try / catch | |
.EXAMPLE | |
try { Get-Process | ?{$_.ProcessName -match "w3wp"} } catch { Get-Catch } | |
.LINK |
NewerOlder