-
Modify disk classifications in Virtual Machine Manager (VMM) using PowerShell
Do you need to modify large number of disk classifications in System Center Virtual Machine Manager (SCVMM)? It is very simple in PowerShell. Get-SCVMHost -VMMServer MyVMMserver -ComputerName MyHyperV -OutVariable vmHost | Format-Table -Property FQDN, ProcessorModel $storageClassification = Get-SCStorageClassification -Name ‘My disk class’ Get-SCStorageDisk -VMHost $vmHost[0] -OutVariable hostDisk | Format-Table -Property Name, Classification $hostDisk | Set-SCStorageDisk…
-
PowerShell Windows User Group event for DevOps – September 2015 in Czech
I would like to thank you very much for attending our PowerShell Windows User Group (WUG) event. Current event: PowerShell for DevOps aka PowerShell Hidden treasures (Czech language) Btw. did you know that Jeffrey Snover (@jsnover) is the Mother of PowerShell?
-
How to stop (terminate) processes on a remote server using PowerShell and CIM / WMI?
My friends asked me simple question: How to stop (terminate) processes on a remote server? Of course you can use: Invoke-Command -ComputerName RemoteServer or Invoke-Command -Session $existingSessionToRemoteServer But in this case my friends had established CIM session in their script. I wrote a few simple examples how to stop process using WMI and CIM and…
-
PowerShell – Script to run one-time full deduplication including optimization, garbage collection and scrubbing
I wrote a simple script to run full deduplication. It is handy when you need one-time deduplication including garbage collection and scrubbing job. $ErrorActionPreference = ‘Stop’ Function Wait-RvDedupJob { Write-Warning -Message ‘Wait for all jobs to finish’ while (Get-DedupJob -ErrorAction SilentlyContinue) { Start-Sleep -Seconds 10 } } Get-DedupVolume | ForEach-Object -Process ` { $_.Volume Wait-RvDedupJob…
-
How to setup Debug Mode in Windows PowerShell Desired State Configuration (DSC)
If you work on custom DSC resources then debug mode is very handy for you because you may need to re-import your updated DSC resource again and again. Without re-import (force import) the DSC uses cache. How to set DebugMode: None Signifies that DebugMode is False and not applicable. ForceModuleImport Enforce the resource module to…