Showing posts with label Power Shell. Show all posts
Showing posts with label Power Shell. Show all posts

Tuesday, December 1, 2015

Enable ping on Windows Server 2016 TP4

To enable ping on Windows Server 2016 TP4, please follow the following PowerShell command

> Import-Module NetSecurity

> Set-NetFirewallRule -DisplayName “File and Printer Sharing (Echo Request – ICMPv4-In)” -enabled True

>  New-NetFirewallRule -Name Allow_Ping -DisplayName “Allow Ping”  -Description “Packet Internet Groper ICMPv4” -Protocol ICMPv4 -IcmpType 8 -Enabled True -Profile Any -Action Allow

image

 

Reference:

http://blog.blksthl.com/2012/11/20/how-to-enable-ping-in-windows-server-2012/

Print Friendly and PDF
Share/Bookmark

Thursday, April 18, 2013

Delete file last modified day over 30 days by PowerShell

$TargetFolder = "X:\30days"
$Childitems = Get-Childitem $TargetFolder -recurse |where {$_.attributes -ne "Directory"}
$mdate = Get-Date -format yyyyMMdd
foreach ($i in $Childitems)
{
    if ($i.CreationTime -lt ($(Get-Date).AddDays(-30)))
    {
Write-host $i.fullname -- $mdate
        Remove-Item $i.FullName -force -recurse

    }
}

Print Friendly and PDF
Share/Bookmark

Wednesday, April 17, 2013

Using PowerShell to enable or disable backup mode on EV 10.1

Enable backup mode

c:\windows\syswow64\windowspowershell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "set-vaultstorebackupmode EVSITE sitename site"

* When the file level backup have been running on EV server (EV data folder: "Enterprise Vault Stores", "EV_CACHE", "EV_INDEX"), you will need to enable the backup mode before running the backup.

Disable backup mode

c:\windows\syswow64\windowspowershell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\evshell.psc1" -command "clear-vaultstorebackupmode EVSITE sitename site"

# When the file level backup have been complete on EV server, you will need to disable backup mode, otherwise the EV open datastore will become readonly.

Print Friendly and PDF
Share/Bookmark

Sunday, March 6, 2011

Windows PowerShell Survival Guide

Windows PowerShell Survival Guide

http://social.technet.microsoft.com/wiki/contents/articles/windows-powershell-survival-guide.aspx?wa=wsignin1.0

Print Friendly and PDF
Share/Bookmark

Thursday, July 22, 2010

imagepatcher

imagepatcher is a script that applies patches to all | selected images in the wim file or vhd file. You will no longer need to update offline installations separately. Updates are downloaded directly from update.microsoft.com. It is developed using Microsoft Powershell

http://imagepatcher.codeplex.com/

Print Friendly and PDF
Share/Bookmark

Sunday, June 13, 2010

PowerPack for VHD/VDI/VMDK Inventory

http://dmitrysotnikov.wordpress.com/2010/04/13/powerpack-for-vhd-vdi-vmdk-inventory/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+DmitrysPowerblog+%28Dmitry%27s+PowerBlog%29

Print Friendly and PDF
Share/Bookmark

Thursday, September 24, 2009

PowerGUI

Graphical User Interface and Script Editor


http://powergui.org/index.jspa Print Friendly and PDF
Share/Bookmark