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
$MP = "Microsoft.Windows.Server.2003" | |
$path = "C:\folder\XML.to.Clean.Up.xml" | |
$xml = [xml](get-content $path) | |
$references = $xml.ManagementPack.Manifest.References.Reference | ? id -like "*$mp*" | |
foreach($reference in $references) | |
{$references.parentnode.RemoveChild($reference)} | |
$Diagnostics = $xml.ManagementPack.Monitoring.diagnostics.diagnostic | ? target -like "*$mp*" | |
foreach($Diagnostic in $Diagnostics) |
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"?><ManagementPack ContentReadable="true" SchemaVersion="2.0" OriginalSchemaVersion="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<Manifest> | |
<References> | |
<Reference Alias="Windows3"> | |
<ID>Microsoft.Windows.Server.2003</ID> | |
<Version>6.0.6989.0</Version> | |
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken> | |
</Reference> | |
</References> |
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
#v4 | |
Measure-Command { foreach($source in $sources) | |
{ | |
$sourcepath = $source.path.replace('\','/') | |
$count = $allstats.sourcefilename.Where({$_ -like "*$sourcepath*"}).count | |
$array += [pscustomobject]@{count = $count; path = $source.path} | |
} | |
} | |
#v5 |
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
#v2 | |
Measure-Command {foreach($source in $sources) | |
{ | |
$count = 0 | |
foreach($allstat in $allstats) | |
{ | |
$sourcepath = $source.path.replace('\','/') | |
if($allstat.sourcefilename -like "*$sourcepath*") | |
{ | |
$count++ |
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
foreach($source in $sources) | |
{ | |
$sourcepath = $source.path.replace('\','/') | |
$count = ($allstats | ? sourcefilename -like "*$sourcepath*").count | |
$array += [pscustomobject]@{count = $count; path = $source.path} | |
} |
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
<settings> | |
<hosts> | |
<FTP ID="459" Name="*Test Prod FTP" > </FTP> | |
<SSHFTP ID="741" Name="*Test UA SSH" > </SSHFTP> | |
<Share ID="832" Name="\\server\share" > </Share> | |
<FTP ID="451" Name="*Test FTP" > </FTP> |
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"?> | |
<RDCMan programVersion="2.7" schemaVersion="3"> | |
<file> | |
<credentialsProfiles /> | |
<properties> | |
<expanded>True</expanded> | |
<name>testrdg</name> | |
</properties> | |
<group> | |
<properties> |