- First download
dbfpy
: http://sourceforge.net/projects/dbfpy/files/latest/download?source=files - Then install:
sudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
function Get-ContentJson { | |
<# | |
.Synopsis | |
Get-ContentJson reads a json file, converts it an returns the object | |
.Example | |
ls . -recurse *.json | Get-ContentJson | |
.Example | |
Get-ContentJson (dir . *.json).fullname | |
#> | |
param( |
dbfpy
: http://sourceforge.net/projects/dbfpy/files/latest/download?source=filessudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
# ========================================================================== | |
# | |
# Script Name: Install-Programs.ps1 | |
# | |
# Author: Andy Parkhill | |
# | |
# Date Created: 27/03/2014 | |
# | |
# Description: A simple environment setup script for my personal laptop. | |
# |
############################ | |
#AUTHOR: JR Morgan | |
#CREATED: 20120417 | |
#MODIFIED: 20140611 | |
############################ | |
<# | |
.Synopsis | |
Adds DHCP Scope to ALL specified DHCP servers. If split-scope is desired | |
the script uses IP Math to automatically add the desired exlcude ranges. |
# PowerShell function to run JavaScript/JQuery and return results back to PS, with timeout | |
# some web page with jQuery in it | |
$url = "http://jquery.com/" | |
Function ResetTimer | |
{ | |
$script:startTime = [DateTime]::Now | |
} |
# 1. Install Chocolatey | |
<# | |
Set-ExecutionPolicy RemoteSigned -Force | |
# Create empty profile (so profile-integration scripts have something to append to) | |
if (-not (Test-Path $PROFILE)) { | |
$directory = [IO.Path]::GetDirectoryName($PROFILE) | |
if (-not (Test-Path $directory)) { | |
New-Item -ItemType Directory $directory | Out-Null | |
} |
function ConvertFrom-JsonToCsv { | |
param( | |
[Parameter(ValueFromPipeline)] | |
$json | |
) | |
Process { | |
($json | ConvertFrom-Json) | ConvertTo-Csv -NoTypeInformation | |
} | |
} |
################## | |
# Privacy Settings | |
################## | |
# Privacy: Let apps use my advertising ID: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# To Restore: | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
<# | |
.SYNOPSIS | |
The synopsis goes here. This can be one line, or many. | |
This version of the template has inbuilt functions to capture credentials and store it securely for reuse | |
Avoids the need to have plaintext passwords in the script | |
.DESCRIPTION | |
The description is usually a longer, more detailed explanation of what the script or function does. | |
Take as many lines as you need. |
# From https://technet.microsoft.com/en-us/library/ff730944.aspx | |
# This will open an internet explorer window that will display all installed windows font names in their corresponding font. | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
$objFonts = New-Object System.Drawing.Text.InstalledFontCollection | |
$colFonts = $objFonts.Families | |
$objIE = New-Object -com "InternetExplorer.Application" | |
$objIE.Navigate("about:blank") | |
$objIE.ToolBar = 0 |