This command changes the vSwitch Load Balance Policy to iphash
esxcli network vswitch standard policy failover set -l iphash -v vSwitch0
This command changes the Port Group Management Network Load Balance Policy iphash
esxcli network vswitch standard portgroup policy failover set -p "Management Network" -l iphash
These are just random notes and programs that may have incomplete descriptions. Any scripts or programs use at your risk
Showing posts with label line. Show all posts
Showing posts with label line. Show all posts
Monday, October 7, 2013
Thursday, March 15, 2012
Batch delete files older then X days using forfiles : updated!
Purpose:
This batch example will search for files with the extension .txt and deletes file less then 5 days old.
Required:
----------------------------------------------------
Forfiles.exe
/p The path to search
/s Recurse into sub-folders
/M Mask
/C command The command to execute for each file
/D - dd Select files with a last modified date less than or
equal to the current date minus "dd" days. (in the past)
-----------------------------------------------------
Del.exe
-----------------------------------------------------
Code:
Echo onIf you have a space in the path the only way i found forfiles.exe to work is the following example
Forfiles /P c:\temp\ /S /M *.txt /C "cmd /c del @path" /D -5
if a file is older then 30 days in e:\example space then delete
forfiles -p "e:\example space" -m *.* -s -d -30 -c "cmd /C del @FILE"
Subscribe to:
Comments (Atom)
Powershell: Microsoft Graph to add new roles to application registration
PowerShell Script Bulk add new roles to application registration in azure. Update $roles with ,Us...