run command prompt as admin
cd to the location of folder
DEL /F/Q/S *.* > NUL (this deletes all files all the folder structure)
used cd.. to navigate to parent folder
RMDIR /Q/S foldername (this deletes the folder and all subfolders)
DEL /F/Q/S *.* > NUL
/F -- forces the deletion of read-only files.
/Q -- enables quiet mode. You are not ask if it is ok to delete files (if you don't use this, you are asked for any file in the folder).
/S -- runs the command on all files in any folder under the selected structure.
*.* -- delete all files.
> NUL -- disables console output. This improves the process further, shaving off about one quarter of the processing time off of the console command.
RMDIR /Q/S foldername
/Q -- Quiet mode, won't prompt for confirmation to delete folders.
/S -- Run the operation on all folders of the selected path.
foldername -- The absolute path or relative folder name, e.g. o:/backup/test1 or test1...
open powershell as admin
Export-WindowsDriver -Online -Destination C:\temp\driverexport
You can then copy the drivers to another location to have a copy of them.
I have previously used this when reinstalling windows, where I export drivers to a USB, so when going to installed windows and then using device manager I browse to the Drivers folder on the USB....
Run command prompt as admin
type diskpart
list volume
select volume (number of the one you want)
To Assign
assign letter=H
to Remove
remove letter=H...
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="CertificateSHA1Hash"
You can get the Certificate SHA1 Hash by using openssl...
Let's first get a look at the profile used by your network adapters:
Get-NetConnectionProfile
Find the InterfaceIndex number of the adapter you wish to change then use command:
Set-NetConnectionProfile -InterfaceIndex <index number> -NetworkCategory Private...
Open Powershell as admin
Get-VM | ForEach { $Vm = $_; $_.HardDrives } | ForEach {
$GetVhd = Get-VHD -Path $_.Path
[pscustomobject]@{
Vm = $Vm.Name
Name = $_.Name
Type = $GetVhd.VhdType
ProvisionedGB = ($GetVhd.Size / 1GB)
CommittedGB = ($GetVhd.FileSize / 1GB)
}
} | Export-Csv -Delimiter ";" -Path "C:\temp\VMVHDStorageUsedTotal.csv"
Creates CSV with data in one column, select column in excel, go to data tab, then text to columns > Delimiter > Semicolon
Excel file would look like this:
Vm
Name
Type
ProvisionedGB
CommittedGB
GW1
Hard Drive on IDE controller number 0 at location 0
Dynamic
60
45.12890625
GW2
Hard Drive on SCSI controller number 0 at location 0
Dynamic
40
28.97265625
...
Connect to 365 via powershell
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking.
Get-Mailbox | Get-MailboxPermission -User userA
UserA would be the user that you want to know for instance; What mailboxes does Matt have access to would be as follows:
Get-Mailbox | Get-MailboxPermission -User matt
...
Connect to 365 via powershell
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking.
Get-MailboxFolderstatistics -Identity mailboxname | Where {$_.Name -Match "foldername"}
For instance to search my mailbox name Matt for a folder that contains alerts the command looks like this:
PS C:\WINDOWS\system32> Get-MailboxFolderstatistics -Identity matt | Where {$_.Name -Match "alerts"}
Although this give the output below, If you have multiple folders that contain your search criteria it can be difficulty to read
To get a better idea of where the folder is located use the identity to filter
PS C:\WINDOWS\system32> Get-MailboxFolderstatistics -Identity matt | Where {$_.Name -Match "alerts"} | select identity
Identity
--------
matt\LanSweeperAlerts
Another example is a folder called backups that is within my inbox folder
PS C:\WINDOWS\system32> Get-MailboxFolderstatistics -Identity matt | Where {$_.Name -Match "backups"} | select identity
Identity
--------
matt\Inbox\Backups
Once you have finished disconnect your exchange powershell session
Remove-PSSession $Session...