Posts

There is not enough usable free space on specified disk(s) to extend the volume.

We can run the following command to update disk information, it has the same function with the Rescan Disks in Disk Management: 1. Open Command Prompt under administrator. 2. Type: diskpart 3. At the DISKPART prompt, type: rescan Reference:  https://social.technet.microsoft.com/Forums/windows/en-US/f2dc07fc-3231-4ef5-8f9a-913b9b74a1a1/command-to-rescan-disks-in-disk-management-for-batch-file?forum=w7itprogeneral

How to extend the volume using command line.

Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. PS C:\Windows\system32> diskmgmt.msc PS C:\Windows\system32> diskpart Microsoft DiskPart version 6.1.7601 Copyright (C) 1999-2008 Microsoft Corporation. On computer: IN15INTMS001 DISKPART> list disk   Disk ###  Status         Size     Free     Dyn  Gpt   --------  -------------  -------  -------  ---  ---   Disk 0    Online           50 GB  1024 KB DISKPART> select disk 0 Disk 0 is now the selected disk. DISKPART> extend There is no volume selected. Please select a volume and try again. DISKPART> extend disk 0 There is no volume selected. Please select a volume and try again. DISKPART> list partition   Partition ###  Type              Size     Offset   -----------...

Runnig batch or vb scripts in SCCM 2012

Image
Create package using same steps as ‘software distribution’   Command line : cscript "filename.vbs" During deployment , select ‘run program from 'distribution point’   

PowerShell - Managing Remote sessions

Image
Enabling PowerShell Remoting On the computer we want to access remotely and execute PowerShell command remotely, we need to run following command: Enable-PSRemoting -Force   This command starts the WinRM service, sets it to start automatically with your system, and creates a firewall rule that allows incoming connections. The -Force part of the command tells PowerShell to perform these actions without prompting you for each step.   Executing PowerShell script  Invoke-command –filepath “path” – computername “computername” For E.g. invoke-command -filepath C:\Bin\ADScripts\PKI\retrieveExpiringCertificates.ps1 -computername HQCAS02 Reference: http://www.tomsitpro.com/articles/powershell-remote-management,2-781.html http://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/