PowerShell

Microsoft Sharepoint Logo

How to audit SharePoint using powershell

Sometimes you need to know what information you have got in your SharePoint solution. I have been asked this numerous times since GDPR was introduced. Get-SPWeb http://your-sharepoint-site | Select -ExpandProperty Lists | Where { $_.GetType().Name -eq “SPDocumentLibrary” -and -not $_.Hidden } | Select -ExpandProperty Items | Group {$_.ParentList.ParentWeb.Url + “/”...

http://54.154.77.54/wp-content/uploads/2018/11/word-image-128.png

Installing Terraform on Windows Desktop and Windows Server

Installing Terraform on Windows   Terraform is extremely popular on Linux, but it is now also available on Windows. You need to have PowerShell version 4 or greater installed so it is recommended to install on the following Microsoft Windows products: Windows 10 Desktop Windows Server 2012 Windows Server 2016 It...

Useful WMI Commands

Useful WMI Commands

Search WMIObjects Get-WmiObject -Namespace Root\cimv2 -list | where {$_.name -like ‘*disk*’} Awesome WMI explorer tool can be found here – https://powershell.org/2013/03/08/wmi-explorer-from-the-powershell-guy/ WMI contains more properties that Standard Powershell commands eg. Get-Service Get-WmiObject -Class Win32_Service | Select-Object * WMI Win32_operatingsystem last boot uptime conversion $os = gwmi win32_operatingsystem $os.ConvertToDateTime($os.LastBootUpTime) EG  -24 October...

VMware PowerCLI OneLiners

VMware PowerCLI OneLiners

Vmware PowerCLI One Liners These commands will save you a mountain of time, despite the formatting of this website they should all copy as single line commands. Find VMs powered off Get-VM | where {$_.powerstate -eq “PoweredOff”} | Sort-Object | get-harddisk | ft parent, capacityGB, Filename -autosize Find Vms CREATED...