This file contains hidden or 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 | |
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 |
This file contains hidden or 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 | |
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 |
This file contains hidden or 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 | |
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": |
This file contains hidden or 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 | |
Queries ConfigMgr Database for BitLockerProtectionStatus Boolean Value. | |
.DESCRIPTION | |
Queries ConfigMgr Database for any workstation that has completed a Hardware Inventory Scan, looks for the BitLockerProtectionStatus Value, 1 is fully encrypted and Protection is on, 0 for anything else. | |
Also uses the inventoried file: 'Orginal System Loader' which is used by TrueCrypt to indicate full disk encryption. | |
.EXAMPLE | |
Get-UnEncryptedWorkstationsFromCMDB | |
.EXAMPLE | |
Get-UnEncryptedWorkstationsFromCMDB -SqlServer localhost -Database ConfigMgr -IntergratedSecurity |
This file contains hidden or 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 | |
Queries AD DS for workstation accounts that have not logged in for a given amount of time. | |
.DESCRIPTION | |
Queries AD DS in spcific OU and uses the LastLogonTimeStamp to determine the last time a computer account has logged on. | |
The Default Value of is 180 for days a computer account is inactive. | |
The Default Value of the SearchBase is the root of the domain of the currently logged on user. | |
.EXAMPLE | |
Get-ADInactiveWorkstations | |
In this example, all workstations that have not logged on within 180 days from the root of the current users domain will be returned. |
This file contains hidden or 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 | |
Gets the current value for the Disk TimeoutValue from the registry of a machine. | |
.DESCRIPTION | |
Gets the value that is currently set in the registry for the time out a disk waits before timing out and shuting down a system. | |
.EXAMPLE | |
Get-DiskTimeoutValue | |
.EXAMPLE | |
Get-DiskTimeoutValue -ComputerName MyServer.mydomain.org | |
.EXAMPLE |
This file contains hidden or 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 Single Sign On Option as the default sign on method to Pass-Through Authentication. | |
.DESCRIPTION | |
Exports the Configuration Model 000 Registry Binary Key. | |
Converts the Binary to ASCII and then to an Xml Object. | |
Using the Xml Class Methods, it modifes the 'LogonMethod' Value to 'sson'. | |
If the 'LogonMethod' Node does not exist, it will be created and the Value set to 'sson'. | |
Commits the changes, if there where any back to the registry. | |
.EXAMPLE |
This file contains hidden or 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 | |
Migrates network printers from one print server to another. | |
.DESCRIPTION | |
Migrates all networked printers from one specified print server to another print server. | |
.EXAMPLE | |
Update-NetworkPrintersServerConnection -OldPrintServer "\\MyOldPS" -NewPrintServer "\\MyNewPS" | |
.NOTES | |
This is done with a ComObject allowing for use in PowerShell V2, before the Get-Printer,Add-Printer and Remove-Printer Cmdlets where introduced. | |
http://technet.microsoft.com/en-us/library/dd347648.aspx |
This file contains hidden or 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 Convert-MACAddressDelimiter | |
{ | |
[CmdletBinding()] | |
[OutputType([String])] | |
Param | |
( | |
[Parameter(Position = 0, | |
Mandatory = $true, | |
ValueFromPipeline = $true, | |
ValueFromPipelineByPropertyName = $true)] |
This file contains hidden or 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 | |
Renames a Domain Computer to its Serial Number. | |
.DESCRIPTION | |
Connects to the Win32_Bios Wmi Class and retrieves the Serial Number, if the existing computer name does not match the serial number, it will be renamed. | |
.EXAMPLE | |
Reanme-DomainComputerToSerialNumber -ComputerName "MyComputer.mydomain.org" -Restart | |
.EXAMPLE | |
$cred = Get-Credential; @("ComputerA","ComputerB","ComputerC") | Reanme-DomainComputerToSerialNumber -DomainCredential $cred -Restart | |
.NOTES |
OlderNewer