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
# Get All PCs in Domain, Export to ServerList.txt | |
# Call get-inventory.ps1 logic on created Serverlist.txt | |
# dk / 22.09.2017 | |
import-module activedirectory | |
$domain = "carpentier.local" | |
$tempfile = "c:\temp\tmpfile.csv" | |
$outfile = "c:\temp\Serverlist.csv" | |
Get-ADComputer -Filter * | | |
select-object Name | |
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
#Remove-MailQueueObjects.ps1 | |
Param( | |
$Path = "D:\tst", | |
$pattern = "TextString", | |
$filter = "*.eml" | |
} | |
Get-ChildItem -Recurse -Path $Path -File -Filter $filter | | |
where { | |
get-content $psitem.fullname -ReadCount 0 | |