File System Management Using Powershell

A PowerShell provider, or PSProvider, is an adapter. It’s designed to take some kind of data storage and make it look like a disk drive. You can see a list of installed providers right within the shell: Providers can also be added into the shell, typically along with a module or snap-in,which are the two … Continue reading File System Management Using Powershell

Advertisements

Registry Manipulation Use Cases

How to Modify the Powershell Execution Policy from Registry? Querying Execution Policy Get-ItemProperty -path HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell Modifying Execution Policy Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell -Name ExecutionPolicy -Value remotesigned How to Disable the Server manager from Loading at startup? New-ItemProperty -Path HKCU:\Software\Microsoft\ServerManager -Name DoNotOpenServerManagerAtLogon -PropertyType DWORD -Value "0x1" –Force How to Enable the Remote desktop settings from Registry? (To … Continue reading Registry Manipulation Use Cases

Manipulating, Querying and Creating Registry

Accessing Registry PowerShell treats the Windows Registry just like another drive, pretty much like a disk drive. This is why you can use all the file system cmdlets to read, write, and change the Registry as explained below: Before you try and play with the examples, be aware that the Registry and its content are … Continue reading Manipulating, Querying and Creating Registry

Basic Disk Space Utilization Report

#HTML formatting for creating table and adding tables around output $a = "<Style>" $a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}" $a = $a + "TH{border-width: 1px;padding: 10px;border-style: solid;border-color: black;}" $a = $a + "TD{border-width: 1px;padding: 10px;border-style: solid;border-color: black;}" $a = $a + "</Style>" ### End of HTML Code### ## I am using WMI … Continue reading Basic Disk Space Utilization Report

Powershell Execution Policies Part II

While working with Allsigned Execution Policy, we need to have all scripts digitally signed, Otherwise Script execution will fail, with error mentioned in below Screen shot. PS C:\> Get-ExecutionPolicy AllSigned PS C:\> & '.\HashTables and Array.ps1' & : File C:\HashTables and Array.ps1 cannot be loPowershell Execution Policies Part IIaded. The fileC:\HashTables and Array.ps1 is not … Continue reading Powershell Execution Policies Part II