Quantcast
Channel: Marc Valk dot Net
Browsing all 22 articles
Browse latest View live

PowerShell: Moving files into subfolder based on date

A script to move files from one directory to another and ordering them in subdirectory in the destination folder. The subdirectory name is bases on the date of the file, thus ordering all files with...

View Article



PowerShell: Counting Files older than today (little mistake)

Today I had to count the number of XML files inside a folder. Simple, I thought. I created the following script: $OldestFileImport = get-childitem d: *.XML | where-object {$_.LastWriteTime -le...

View Article

Link: Where is the PowerShell ISE in Windows 8?

http://www.trekker.net/archives/where-is-the-powershell-ise-in-windows-8/

View Article

Image may be NSFW.
Clik here to view.

Amazon Powershell Tools

The amazon Powershell Tools have arrived: http://aws.amazon.com/powershell/578 commands When first starting your AWS Powershell Tools, you have to specify your Access Key and you Secret Access Key....

View Article

Changing an Office 365 User Principal Name with Powershell

It is very ease to change your login name in Office 365 if you have PowerShell for office 365 (x86 version, x64 Version) installed. First connect to Office 365 Connect-msolService Enter your...

View Article


Server 2012 – installing Feature on Demand: .NET Framework 3.5

When installing SQL 2012 on my windows server 2012 box, I received errors about the install of .NET Framework 3.5.As .NET Framework 3.5 is a “feature on demand”, the binaries and other files associated...

View Article

PowerShell: Import Scheduled Task

Some powershell I needed to import some scheduled tasks (xml files). Just for my own reference $XMLTaskDir = "C:\Program Files (x86)\****\***\" $Tasks = Get-ChildItem -Path $XMLTaskDir -Filter *.xml...

View Article

PowerShell: updating AD photo for use in Office 365

I wanted to add a photo to every user in our Office 365 environment, so it is visible within our Lync software. Normally I would think I would go to Lync, open op “Tools” and then “Options”, select My...

View Article


Running PowerShell Script from Netlogon Share

To run a powershell script from a netlogon share, proceed as follows: create a batch file on the Netlogon Share call your PowerShell Script:powershell -executionpolicy bypass -file...

View Article


See backup chain SQL Server

See the backup chain in SQL Server SELECT TOP 100 s.database_name, CASE s.type WHEN 'D' THEN 'Full' WHEN 'I' THEN 'Differential' WHEN 'L' THEN 'Transaction Log' END AS BackupType, CAST(DATEDIFF(second,...

View Article

Image may be NSFW.
Clik here to view.

O365: delivery restriction Distribution Group

If you have a synced distributiongroup from your on-premise environment to your office 365 environment and you can not send from an external account to your distribution group, it might be because only...

View Article

Powershell: Set default printer based on IP address

Simple – quick and dirty’ Powershell script to change your default printer based on the location where you are (i.e. @home or @work)$NetworkAdapter = Get-WmiObject -Class...

View Article

PowerShell: compare 2 directory’s

Comparing two directory’s and listing the differences$dir1 = “\\server1\c$\folder1″ $dir2 = “\\server2\c$\folder1″ $d1 = get-childitem -path $dir1 -recurse $d2 = get-childitem -path $dir2 -recurse...

View Article


SQL: backup / restore DB status

A nice script I found to use when you are backing up /  restoring a SQL database and you want to see the progress.SELECT r.session_id,r.command,CONVERT(NUMERIC(6,2),r.percent_complete) AS [Percent...

View Article

Image may be NSFW.
Clik here to view.

Youtube movies not playing full screen in Chrome

I’ve had an annoying problem with chrome (version 33.0.1750.146) which was that I could not play Youtube Video’s in full screen mode. The video would not be full screen (only a part of the screen) and...

View Article


Cannot communicate via lync to Skype users

If you want to communicate with skype users through your Lync software. For example you get the error messageThis message wasn’t sent because john.doe@gmail.com doesn’t have permissions on your...

View Article

Powershell: copy files based on date

To copy files from a certain date to a different folder you can use the following PowerShell command: get-childitem | where-object {$_.creationtime -ge "7/29/2014" -and $_creationtime -le "29/7/2014"}...

View Article


AD: user password change: access is denied

A user tries to change his password from his workstation and get’s a ‘access denied’ message. open active directory users and computers find the user and open it’s properties select the ‘account’ tab...

View Article

Image may be NSFW.
Clik here to view.

PowerShell: Copying Latest Files to multiple servers

Problem: I have a source folders which consisted of multiple directory’s (builds from TFS). I wanted to copy the latest folder (Based on LastWriteTime) to several servers. Answer: use-powershell (what...

View Article

Image may be NSFW.
Clik here to view.

VPN Connection BUG in Windows 10

So a few days ago I installed Windows 10, installed my software and went on setting up a VPN connection to our remote workplace. Whenever I install this VPN connection, I create two of them. One of...

View Article
Browsing all 22 articles
Browse latest View live




Latest Images