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
$TypeQuery = sc.exe query winmgmt|Select-String -Pattern "TYPE" -SimpleMatch | |
$type = $TypeQuery.ToString().Trim().Split(':')[1].trim().split(' ')[0] | |
$type |
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
$logs = Get-ChildItem -Path C:\inetpub\logs -Recurse -Filter *.log | |
$oldest = (get-date).AddDays(-30) | |
foreach($log in $logs){ | |
if($log.LastWriteTime -lt $oldest){ | |
$log.Delete() | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="oobeSystem"> | |
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> | |
<OOBE> | |
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> | |
<NetworkLocation>Work</NetworkLocation> | |
<SkipMachineOOBE>true</SkipMachineOOBE> | |
<SkipUserOOBE>true</SkipUserOOBE> | |
</OOBE> |
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
<#Disclaimer | |
The sample scripts are not supported under any Microsoft standard support program or service. | |
The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. | |
The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. | |
In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. | |
#> | |
## Delete any existing instances | |
$CurrentEA = $ErrorActionPreference | |
$ErrorActionPreference = 'Silent |
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
Param( | |
[string]$WsusServer = ([system.net.dns]::GetHostByName('localhost')).hostname, | |
[bool]$UseSSL = $False, | |
[int]$PortNumber = 80 | |
) | |
$script:CurrentErrorActionPreference = $ErrorActionPreference | |
$ErrorActionPreference = "SilentlyContinue" | |
#Connect to the WSUS 3.0 interface. | |
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration") | out-null |
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
# Author: Garth Jones | |
# http://www.enhansoft.com | |
# | |
# Created Date: 2016-08-01 | |
# Version: 1.00 | |
# | |
# Thanks Sean Kearney @energizedtech for the start point. | |
# | |
################################################################## |
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
oldname1.test|newname1.test | |
oldname2.test|newname2.test | |
oldname3.test|newname3.test | |
oldname4.test|newname4.test | |
oldname5.test|newname5.test | |
oldname6.test|newname6.test |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Benchmark> | |
<title>APACHE SITE 2</title> | |
</Benchmark> |
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
<check_type> | |
<custom_item> | |
system : "Linux" | |
type : "Check" | |
description : "8.1.1.1 this is other text" | |
</custom_item> | |
<custom_item> | |
system : "Linux" | |
type : "Check" | |
description : "8.1.1.1 more text" |
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
AssignedCIs = {"<?xml version='1.0' ?>\n\t\t<CI>\n\t\t\t<ID>8f8f54bb-05de-44a8-8695-f5d06d06d20f</ID>\n\t\t\t<ModelName>Site_56FE87C5-F355-45F9-BE43-BE8D575809F4/SUM_8f8f54bb-05de-44a8-8695-f5d06d06d20f</ModelName>\n\t\t\t<Version>1.00</Version>\n\t\t\t<CIVersion>200</CIVersion>\n\t\t\t<ApplicabilityCondition>\n\t\t\t\t<ApplicabilityRule ExpressionLanguage=\"Custom\" Handler=\"{2DB70103-3DFB-4806-85B0-B27B561284BB}\"><UpdateId>8f8f54bb-05de-44a8-8695-f5d06d06d20f</UpdateId><CISource><Id>{56FE87C5-F355-45F9-BE43-BE8D575809F4}</Id><Version>218</Version></CISource><ProductId>041e4f9f-3a3d-4f58-8b2f-5e6fe95c4591</ProductId></ApplicabilityRule>\n\t\t\t</ApplicabilityCondition>\n\t\t\t<EnforcementEnabled>FALSE</EnforcementEnabled>\n\t\t\t<DisplayName>Update for Microsoft Office Outlook 2007 Junk Email Filter (KB3114544)</DisplayName>\n\t\t\t<UpdateClassification>e6cf1350-c01b-414d-a61f-263d14d133b4</UpdateClassification>\n\t\t</CI>", "<?xml version='1.0' ?>\n\t\t<CI>\n\t\t\t<ID>92ff382f-1b20-416f-9bae-2887ca1682ff< |
NewerOlder