On a new client’s server, I ran into an issue where a drive was running low on space and I found that another user account on the server (which had been deleted) had files in the Recycle Bin!
Thankfully, I found this Powershell command which worked to delete the files. All you have to do is open a Powershell console as admin and run the following command:
Get-ChildItem “C:`$Recycle.bin\” -Force | Remove-Item -Recurse -force
You can append -Whatif to do a test run and see what files will be deleted before actually deleting them.
To disable Clutter in Office365 via Powershell, simply do the following:
Connect to Office365 Powershell for your account
Then simply run this command to disable Clutter for all mailboxes:
Get-Mailbox | Set-Clutter –enable $false
That’s it! If you want to disable Clutter for a single mailbox, you can do the following:
Set-clutter -identity [email protected]-Enable $false
To do this via the Office365 Portal, just navigate to: Mail > Automatic Processing > Clutter and turn it off!
The last logon time of an Exchange 2010/2013/2016 mailbox user can easily be found by running the Get-MailboxStatistics cmdlet in the Exchange Management Shell.
You can further sort the info by including and running the following command:
Get-MailboxStatistics -Server EXCH | Sort LastLogonTime -Descending
And export it to a CSV by adding an Export-CSV option like below:
Get-MailboxStatistics -Server EXCH | Sort LastLogonTime -Descending | Export-CSV c:\lastlogon.csv
I can’t tell you how many times I have logged in to a computer just to see five or more versions of Java installed going back multiple versions. To uninstall ALL of them in one fell swoop without being prompted, I use this command:
wmic product where "name like 'Java%%'" call uninstall /nointeractive
First you need to connect to Office365.
Next, simply run this commandlet:
Add-MailboxFolderPermission email@example.com:\Calendar –User firstname.lastname@example.org –AccessRights Author
Your accessrights options are: Owner, PublishingEditor, Editor, PublishingAuthor, Author, NonEditingAuthor, Reviewer, Contributor, AvailabilityOnly, LimitedDetails
If you’d like to get permissions, you can simply use:
Get-MailboxFolderPermission –Identity email@example.com:\Calendar –User firstname.lastname@example.org
Finally, to remove permissions:
Remove–MailboxFolderPermission –Identity calendar@company:\calendar –user email@example.com
This works for Office365 or an internal Exchange server to disable the calendar on a Shared Mailbox or User’s Mailbox. First, you’ll have to pull up the Exchange Management Shell. Then run the following commands:
New-OwaMailboxPolicy –Name “New Policy Name”
Creates a new mailbox policy
Set-OwaMailboxPolicy –Identity “New Policy Name” –CalendarEnabled $false
Sets the calendar for all mailboxes under the policy to be off
Set-CASMailbox –Identity “shared mailbox” –OwaMailboxPolicy “newpolicy”
Applies the policy to the mailbox in question
After configuring Wake On Lan via Command Configure in a previous post, I then wanted to enable Bitlocker on the Windows 8 machine. Unfortunately, the Dell laptop did not have TPM enabled in the BIOS, which allows for a secure key to be saved. Command Configure to the rescue!
There are a few commands you have to run. For some reason, Dell requires you to have a BIOS password to enable the TPM. Don’t worry, you can enable it and disable it all at once without needing to reboot the machine. Here is what you need to run:
cctk –setuppwd=biospassword // This sets a BIOS password
cctk –tpm=on –valsetuppwd=biospassword // This turns TPM on and provides the BIOS password you set previously
cctk –tpmactivation=activate –valsetuppwd=biospassword // This activates TPM and provides the BIOS password you previously set
cctk –setuppwd= –valsetuppwd=biospassword // This removes the BIOS password. Just put one space after the = sign. You need to feed the old BIOS password to make the change.
That is it! You’ll have to restart the computer and Windows will see the TPM device and be able to enable Bitlocker.
I’ve been playing with Dell Command Configure recently and will be doing a few posts on my work.
First up is enabling Wake On Lan (WOL) on Dell Optiplex, Latitude, XPS, Insprion, systems. The main advantage is this can be done remotely, through Windows, and can even be scripted.
You’ll need Dell Command | Configure which you can grab from here. If you are interested in more features, you can read up on the full documentation in the Reference Guide here.
After you install it, you can open the aptly named “Command Configure Command Prompt” tool. From there, you can enter all your arguments that you want to change. To change your Wake On Lan settings, simply type in:
cctk –wakeonlan [enable, disable, enablewakeonwlan, lanorwlan]
The options above are what you can do. You can set it to wake on just wireless, or both wireless and ethernet LAN. For both wlan and lan, your command would be:
cctk –wakeonlan lanorwlan
An easy way to get a mailbox usage report is via the Get-Mailboxstatistics commandlet in powershell and a combination of other commands. The below script will output a mailbox usage report in HTML format:
Unlimited | Get