Simple script for creating new folders.
# Create folder if it doesn't exists
function CreteFolder([String]$folderPath)
{
if ((Test-Path $folderPath) -ne $True)
{ New-Item $folderPath -type directory }
}
Thursday, 22 August 2013
Powershell: Create Folder/Directory if doesn't exists
Thursday, 18 July 2013
Powershell: How to get members of AD security group
all - AD security group
Get-ADGroupMember all
Displays only "usernames":
Get-ADGroupMember all | Select SamAccountName
Snippet for Iterating through all users
$Users=Get-ADGroupMember all | Select SamAccountName
foreach ($User in $Users)
{
Write-Host $User.SamAccountName
}
Get-ADGroupMember all
Displays only "usernames":
Get-ADGroupMember all | Select SamAccountName
Snippet for Iterating through all users
$Users=Get-ADGroupMember all | Select SamAccountName
foreach ($User in $Users)
{
Write-Host $User.SamAccountName
}
Saturday, 6 April 2013
Unable to connect to Windows 7 file share
While trying to connect to Windows 7 machine (from Mac or PC) over the network I was constantly receving messages:"Unable to connect"
On "server" machine I noticed following error in event viewer:
Soruce: Srv
Event Id:2017
"The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations."
Problem occurs when multiple computers are trying to connect to one Windows 7 "server" machine. Do following procedure:
Set the following registry key to ’1':
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache
and set the following registry key to ’3':
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size
Restart computer or just "Server" service, fixed! :)
On "server" machine I noticed following error in event viewer:
Soruce: Srv
Event Id:2017
"The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations."
![]() |
| The server was unable to allocate from the system nonpaged pool because the pool was empty. |
Problem occurs when multiple computers are trying to connect to one Windows 7 "server" machine. Do following procedure:
Set the following registry key to ’1':
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache
and set the following registry key to ’3':
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size
Restart computer or just "Server" service, fixed! :)
Wednesday, 26 September 2012
Windows Azure Mobile Services resources
Documentation:
- Check out Windows Azure Mobile Services REST API Reference on MSDN
Some useful resources:
Samples:
Don't forget that Azure Mobile Services are still in beta!
- Live Connect Developer Center (register your application)
- Getting Started with Windows Azure Mobile Services (video form Scott Guthrie)
- SDK source and samples on github
- follow @joshtwist from Microsoft Azure Mobile Services Team
- Xamarin is preparing SDK for iOS and Android
Samples:
- Windows 8
- Simple ToDo tutorial for Windows 8 and Mobile Services
- Windows 8 How to upload an Image using a Blob Storage SAS generated by Windows Azure Mobile Services
- Android
- IOS
Don't forget that Azure Mobile Services are still in beta!
Related articles
Thursday, 16 August 2012
Visual Studio 2012: System.FormatException: The format of value 'application/json; charset=utf-8' is invalid.
After installing Visual Studio 2012 RTM over Visual Studio 2012 RC one of my Web API start failing with error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
The format of value 'application/json; charset=utf-8' is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: The format of value 'application/json; charset=utf-8' is invalid.
Source Error: ...
Solution is simple - just update NuGet API packages (Microsoft ASP.NET Web API Client, Web API Core, ...) it can be done by UI or runing following command:
PM>Update-Package
Probably updating to latest version is also good for other packages like EntityFramework, ...
PM>Update-Package
Probably updating to latest version is also good for other packages like EntityFramework, ...
| The Microsoft Visual Studio .NET logo. (Photo credit: Wikipedia) |
Friday, 27 July 2012
Visual Studio C# web application build fails with "Error 46"
After rebuild I've got following error:
"Error 46 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. ..."
Clear build and rebuild didn't help. Deleting all files in Bin folder did help! :)
When you are sick of deleting bin folder, just simple add folowing tag to *.csproj:
Source:
http://stackoverflow.com/questions/7388359/mvc3-project-build-fails-because-of-web-config-in-obj-folder
"Error 46 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. ..."
Clear build and rebuild didn't help. Deleting all files in Bin folder did help! :)
When you are sick of deleting bin folder, just simple add folowing tag to *.csproj:
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'">
<RemoveDir Directories="$(IntermediateOutputPath)" />
</Target>
Source:
http://stackoverflow.com/questions/7388359/mvc3-project-build-fails-because-of-web-config-in-obj-folder
Related articles
Tuesday, 24 July 2012
Backend as a Service - list of providers
List of most used BaaS (Back-end as a Service) providers for mobile application development:
Storageroomapp is more content oriented (aka CMS via REST).
Some articles to read:
- Applicasa
- Kinvey
- Stackmob
- Parse
- Sencha IO
- https://io.tiggzi.com/secured/database-list (cloud rest database)
- Dotcloud.com (very interesting JS cloud for realtime apps)
- Microsoft Azure Mobile Services
- Backendless
- Appery.io
Storageroomapp is more content oriented (aka CMS via REST).
Some articles to read:
Subscribe to:
Posts (Atom)








