The Default location for Windows Search index is C:\ProgramData\Microsoft. In my case this location is on a SSD with limited space. Hence i want to move the index cache to a different drive with more of space. I know how to do this using GUI.
I wanted to find out how to do this using PowerShell? So i can automate the process.
You could do this via the windows registry:
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Search" -Name "DataDirectory" -Value "X:\Microsoft\Search\Data\"
Related
I have a Windows 10 image backup from about 6 months ago that contains some code I need to recover.
The image backup was made on my prior PC, which has since suffered a catastrophic hard drive failure and was reimaged with Windows 10.
Is it possible to browse the old image backup and find and extract the folder(s) I need?
Simple, but ridiculously hard to find with Google if you don't know what to search for.
There are .vhdx files in the WindowsImageBackup folder
Find the .vhdx that represents the disk you want to mount/explore
Attach the .vhdx with diskpart or Disk Management
Assign a drive letter
Browse with File Explorer
Caveat: You might have to open a DOS cmd prompt in Admin mode and use diskpart to assign the drive a letter.
I logged to my CentOS 7 server ( Azure Virtual machine) this morning and found that it's running slow on space, so I'm looking for undesired log files and safe to remove files, so Is it safe to delete the files under /var/lib/azsec ?
Here's a screenshot of the folder:
/var/lib/ folders
Thanks in advance,
Actually, it's not safe to do that directly because if you want to check the log to find something indeed later and there will no log to find.
So I suggest you can make a backup of the log and store it in another place. Then you can delete it from the VM to make some space to use.
I am using OpenVZ Web Panel to manage my virtual machines. For some reason, OVZ Web Panel's "Daily Backup" option will only store a daily backup of each virtual machine. I have configured the Backups to keep to more than 1 under the User's Profile settings - setting it to values higher than 1 and "unlimited" - but the setting is ignored, and only 1 backup copy is rotated every morning. I need at 7 daily snapshot backups for each virtual machine.
Anyone know how to let it store more backup copies? I have searched forums, but nobody else seem to have this issue. The documentation is also not clear about this. I have changed the owner of the virtual machine, restarted OWP - but still no luck.
the easiest and lazy-est way to do this, IMHO, is to write a script and then a cron job to run that script.
e.g.
cd /path/to/files
mv filename filename`date +%y%m%d`
find /path/to/files* -mtime +5 -exec rm {} \;
in some script file, where filename is the name of that one file being generated then add an entry into e.g. /etc/crontab
the find that executes the rm will delete files over 5 days old. then you get 5 days worth of backups.
probably a lot easier then requesting a feature from the devs of the program, trying to modify it yourself, etc. (unless there is some already developed feature...)
Is there a way to get a list of Virtual directories under a specific website in IIS using the command prompt?
I was able to perform the task using C# but I have a specific requirement where-in I need to list all the virtual directories under a website using the command prompt.
appcmd list vdir /app.name:[sitename]/
Replace [sitename] with the name of your site.
For more info, check out Microsoft Technet.
How can I rename a Virtual Directory (or Web Application) in IIS 6.0/7.0 using VBScript?
If you just want to change the site name in IIS 7. Edit the applicationHost.config file.
This file can be found in c:\Windows\System32\inetsrv\config\
Find and replace the name of the application. Save the file. And if you restart the IIS Management Console you will see the name has change.
Do you want to rename it in IIS, or change the virtual path? adsutil can do either. It should be installed in c:\inetpub\AdminScripts
adsutil.vbs SET W3SVC/svcnum/Root/AppName/AppFriendlyName "New Friendly Name"
adsutil.vbs SET W3SVC/svcnum/Root/AppName/AppRoot "New Application Path"
See the "Name" property of the objects from the IIsWebVirtualDirSetting WMI collection (from the MicrosoftIISv2 WMI namespace).
see http://msdn.microsoft.com/en-us/library/ms525005%28v=vs.90%29.aspx
I assume you want to use a local shell script.
Try PowerShell, I think IIS7 has introduced new administration tools that look quite powerful. I think you could also use these scripts to manage IIS remotely via WMI.
It shouldn't be any more complicated then VBScript.
Another way would be to use VBScript to edit the IIS configuration files or create an administration object, but that doesn't really seem to be the way to go about it.
Hopefully this helps.