In this post, I will show a playbook with different tasks to copy files from Windows CIFS shared folder to a Linux folder. First, the status and the prerequisites: I have 3 machines: The Ansible controller ansible_srv01 where the playbook
In this post, I will show you how to create a directory on a CIFS shared folder hosted on the Windows machine This task can be achieved by configuring the WinRM listener on the Windows machine. In the playbook, we
With this simple script, you will be able to get the free space available on the C: drive on a list of remote computers. I’m using WMI to request the remote computers. You can use two different ways for the
This script is useful if you want to scan a root folder and get the acl (owner and NTFS security rights) of the subfolders. Script : $rootfolder = Get-ChildItem -Path \\server\user_home_root_folder foreach ($userfolder in $rootfolder) { $userfolder.FullName get-acl $userfolder.FullName |
With this script, you will be able to manage the file retention on a specific folder. The file removal is based on age (LastWriteTime file property / source ) #Powershell Script to delete files older than a certain age $intFileAge
This script will allow you to delete the Recycle bin items older than 60 days. The recycle bin items are listed in the system where the script is running on. ForEach ($DriveLetter in Get-PSDrive -PSProvider FileSystem) { $DelPath = $DriveLetter.Name
I have found a great script to remove local profile to a remote or a local machine. I have added two features to this script : list only the “non loaded” profile possibility to remove all profiles The first point
Recently, I have received this error message while deleting a folder tree : The cause is a trailing space in the folder name. The only to delete this folder is to run this command : rd “\\?\G:\folder_with_a_trailing_space “ I have
Archive more than one million files located in one folder Windows operating systems are not good candidates to host and manage million files located in only folder (no subfolders). If you try to list the content of the folder (using
You need to migrate a file server shared folder from a Windows Server 2008 to a Windows Server 2012. Windows Server 2012 now contains Powershell cmdlets to interact with SMB Shared folders, but Windows 2008 not. The purpose of the