Review AD for active computers

Sometimes you need to generate a quick report from your Active Directory about active computers in your network. In case if you miss article in Google, below is listing from Original post

Just save it to filename.ps1 and enjoy.

# 
# Name : ListActiveComputers.ps1
# Purpose: Get active computer accounts from active directory by 
# checking the last logon date. Get the properties of computer
# account (name,OS,OSverion,lastlogondate and CanonicalName)
# and save it to ActiveComputers.csv file.
#
# Written by Anand Venkatachalapathy
# Date written: 03/28/2012
#

Import-Module ActiveDirectory

# get today's date
$today = Get-Date

#Get today - 60 days (2 month old)
$cutoffdate = $today.AddDays(-60)

#Get the computer accounts filtered by lastlogondate.
# Select only required properties of the computer account
# and export it to a file
Get-ADComputer  -Properties * -Filter {LastLogonDate -gt $cutoffdate} `
| Select Name,OperatingSystem,OperatingSystemVersion, `
LastLogonDate,CanonicalName | Export-Csv ./ActiveComputers.csv
Posted in Windows Server | Tagged , , , | Leave a comment

RC cars project

I have an idea to build RC car like Tesla. Pretty much Losi 5t has something like this but from the third part company.

For the project I will take Mercedes AMG from De Agostini (same platform as DuraTrax Nissan GT-R 1/10 Glow Powered On-Road Car DTXD51), so this will be a not classical conversion from Nitro to electro (I already did this Nitro to electric conversion). I understand that this is not the unique project but tech challenge accepted.

I hope next week I will add video with parts.

 

Posted in Uncategorized | Tagged , , , , | Leave a comment

SharePoint permissions

So what is Sharepoint:

Microsoft describes a SharePoint site collection as, “A SharePoint site collection is a hierarchical set of sites that can be managed together. Sites within a site collection have common features, such as shared permissions, galleries for templates, content types, and Web Parts, and they often share a common navigation. A site collection contains a single top-level site, and any number of subsites organized in a hierarchy. A subsite is a single SharePoint site within a site collection. A subsite can inherit permissions and navigation structure from its parent site or these can be specified and managed independently. Creation of subsites can be delegated to users of a site collection, but creation of site collections must be performed by a service administrator.” (https://technet.microsoft.com/en-us/library/cc262410.aspx)

SharePoint permissions:
1. There are 5 built-in permission levels within SharePoint (Full Control, Design, Contribute, Read and Limited Access). These permission levels are made up of a combination of 33 different SharePoint permissions which can be broken up into three different sub-categories. The built-in permission levels can also be modified to include or exclude any of the individual permissions. Customized permission levels can also be created for more granular controls as well. Further details can be found on Microsoft’s site (http://office.microsoft.com/en-us/windows-sharepoint-services-help/permission-levels-and-permissions-HA010100149.aspx)
2. The first permission category is List Permissions. These permissions only apply to lists and libraries and consist of the permissions below:
– Manage Lists: Create and delete lists, add or remove columns in a list, and add or remove public views of a list.
– Override List Behaviors: Discard or check in a document that is checked out to another user, and change or override settings that allow users to read/edit only their own items.
– Add Items: Add items to lists, and add documents to document libraries.
– Edit Items: Edit items in lists, edit documents in document libraries, and customize Web Part pages in document libraries.
– Delete Items: Delete items from a list, and documents from a document library.
– View Items: View items in lists, and documents in document libraries.
– Approve Items: Approve a minor version of list items or document.
– Open Items: View the source of documents with server-side file handlers.
– View Versions: View past versions of a list item or document.
– Delete Versions: Delete past versions of list items or documents.
– Create Alerts: Create alerts.
– View Application Pages: View forms, views, and application pages. Enumerate lists.

3. The second permission category is Site Permission. These permissions only apply to a specific site and consist of the permissions below:
– Manage Permissions: Create and change permission levels on the web site and assign permissions to users and groups.
– View Web Analytics Data: View reports on Web site usage.
– Create Subsites: Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.
– Manage Web Site: Grants the ability to perform all administration tasks for the web site, as well as manage content.
– Add and Customize Pages: Add, change, or delete HTML pages or Web Part pages, and edit the website.
– Apply Themes and Borders: Apply a theme or borders to the whole website.
– Apply Style Sheets: Apply a style sheet (.css file) to the website.
– Create Groups: Create a group of users that can be used anywhere within the site collection.
– Browse Directories: Enumerate files and folders in a website by using SharePoint Designer 2013 and Web DAV interfaces.
– Use Self-Service Site Creation: Create a website using Self-Service Site Creation.
– View Pages: View pages in a website.
– Enumerate Permissions: Enumerate permissions on the website, list, folder, document, or list item.
– Browse User Information: View information about users of the website.
– Manage Alerts: Manage alerts for all users of the website.
– Use Remote Interfaces: Use SOAP, Web DAV, the Client Object Model, or SharePoint Designer 2013 interfaces to access the website.
– Use Client Integration Features: Use features that launch client applications. Without this permission, users must work on documents locally and then upload their changes.
– Open: Enables users to open a website, list, or folder to access items inside that container.
– Edit Personal User Information: Enables users to change their own user information, such as adding a picture.
4. The third permission category is Personal Permissions. These permissions only apply to things like personal views and private web parts and consist of the permissions below:
– Manage Personal Views: Create, change, and delete personal views of lists.
– Add/Remove Personal Web Parts: Add or remove personal Web Parts on a Web Part page.
– Update Personal Web Parts: Update Web Parts to display personalized information.

Posted in Uncategorized | Tagged , , | Leave a comment

[Solved] WSUS console error Windows 2012 R2

95% of all articles on Internet describe how to resolve this issue. My solution was to uninstall it. Remove WSUS server from ISS. Delete all folders where data stored for WSUS.

While installation you will need to install also .NET 3.5 (it also include .NET 2.0) as version 4 will be installed. The path where everything will be stored need to be shared folder with proper access level, you will need to create it, while WSUS relo installation. Also will be good to install  Download Microsoft Report Viewer 2008 SP1 Redistributable from Official Microsoft Download Center (feedback to .NET) link >> https://www.microsoft.com/en-us/download/details.aspx?id=3841

I hope this will help you with Windows patching.

Posted in Windows Server | Tagged , , , | Leave a comment

Microsoft VSS

Microsoft Shadow Copy Provider’s Volume Shadow Copy Service, or simply VSS is the first process of most image based backup solutions.  VSS was first made available for the Windows 2000 Operating System, and has been bundled with every new Operating System since Windows XP.  It is used to create volume shadow copies of a machine that is actively in use.

Between the various versions of Windows as well as versions of applications with VSS support, there are many different VSS Writers each with their own unique function.

To list the VSS writers of any Windows OS simply open up a command prompt and enter in the command:

vssadmin list writers

The result will look similar to what is displayed below:

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>vssadmin list writers

vssadmin 1.1 – Volume Shadow Copy Service administrative command-line tool

(C) Copyright 2001-2005 Microsoft Corp.

Writer name: ‘System Writer’

Writer Id: {e8132975-6f93-4464-a53e-1050253ae220}

Writer Instance Id: {767c1764-6013-42ad-86f0-cdc94ba7bca2}

State: [5] Waiting for completion

Last error: No error

Writer name: ‘ASR Writer’

Writer Id: {be000cbe-11fe-4426-9c58-531aa6355fc4}

Writer Instance Id: {444e1aca-b439-46ac-81e2-4702fb1b478c}

State: [1] Stable

Last error: No error

Writer name: ‘Registry Writer’

Writer Id: {afbab4a2-367d-4d15-a586-71dbb18f8485}

Writer Instance Id: {8e480c8f-edab-4e52-80a4-f9c42a92fd91}

State: [1] Stable

Last error: No error

Writer name: ‘COM+ REGDB Writer’

Writer Id: {542da469-d3e1-473c-9f4f-7847f01fc64f}

Writer Instance Id: {58303128-81b8-4df4-bfa9-3381561b85f1}

State: [1] Stable

Last error: No error

Writer name: ‘BITS Writer’

Writer Id: {4969d978-be47-48b0-b100-f328f07ac1e0}

Writer Instance Id: {104fab54-11d7-4f75-b46f-b18dc818ac93}

State: [1] Stable

Last error: No error

Writer name: ‘WMI Writer’

Writer Id: {a6ad56c2-b509-4e6c-bb19-49d8f43532f0}

Writer Instance Id: {10af4ff1-92b3-4255-bbf1-351eb8ae9fcf}

State: [1] Stable

Last error: No error

This particular output displays the names of 6 separate VSS Writers.  More importantly for troubleshooting purposes this command also displays each of these VSS Writer’s current State as well as their Last error.

Writer name: ‘System Writer’

Writer Id: {e8132975-6f93-4464-a53e-1050253ae220}

Writer Instance Id: {767c1764-6013-42ad-86f0-cdc94ba7bca2}

State: [5] Waiting for completion

Last error: No error

It is possible that nothing will display at all for this command however this is easily resolved by re-registering the VSS DLL Binaries which does not require a reboot.

State of VSS Writers

VSS Writers have several states which directly reflect the current status of each VSS Writer.

Stable

Unknown

Frozen

Failed during freeze operation

Failed

List of Common Writers

Active Directory Domain Services VSS Writer (NTDS)Beginning with Windows Server 2003, this writer reports the NTDS database file (ntds.dit) and the associated log files.  These files are required to restore the Active Directory correctly.

ADAM (instanceN) Writer

Beginning with Server 2003, this writer reports the ADAM database file (adamntds.dit) and the associated log files for each instance in %program files%\Microsoft ADAM\instanceN\data, where N is the ADAM instance number.

These database log files are required to restore ADAM instances.

ADAM (VMwareVCMSDS) Writer

VMWare Virtual Center Server Service for the ADAM instance VMWareVCMSDS

ASR Writer

Automated System Recovery which stores the BCD configuration of disks on the system on OSes starting with Vista and Server 2008.

BITS Writer

Background Intelligent Transfer Service Writer first available in Vista and Server 2008.  BITS uses the FilesNotToBackup registry key to exclude files from the BITS cache folder. The default cache location is %AllUsersProfile%\Microsoft\Network\Downloader\Cache

Certificate Authority

This writer is responsible for enumerating the data files for the Certificate Server

COM+ REGDB Writer

COM+ Class Registration Database Writer responsible for the contents of the %SystemRoot%\Registration directory which was first available in Vista and Server 2008 OSes.

DFS Replication Service Writer

Starting in Server 2003 R2 this writer protects Distributed File System Replication selections data.

DHCP Jet Writer

Starting with Server 2003 this writer is responsible for enumerating files required for the DHCP server roleThis writer is not available for workstation OSes.

Exchange Writer

The Exchange Writer provides the application aware backups for Microsoft Exchange Servers.  It also provides the ability for performing log truncation of Microsoft Exchange Transaction Logs.

Event Log Writer

Responsible for protecting the Event Log Viewer contents.

FRS Writer

Responsible for the File Replication Service starting with Server 2003.

FSRM Writer

Starting with Windows Server 2003 R2, this writer enumerates the FSRM configuration files that are used for system state backup.  During restore operations it prevents changes in FSRM configuration and temporarily halts enforcement of quotas and file screens.  This writer is not available for workstation OSes.

IIS Config Writer

Protects the configuration data for Internet Information Services (IIS).

IIS Metabase Writer

Responsible for the Microsoft Internet Information Services which is required by some SQL Server features.

Microsoft Exchange Writer

Responsible for backing up the Exchange Information Store as well as providing the ability to truncate Exchange transaction logs.

Microsoft Hyper-V VSS Writer

Responsible for backing up Hyper-V Virtual Machines.

MSSearch Service Writer

Starting with Server 2008 this writer exists to delete search index files from shadow copies after creation.  This is done to minimize the impact of Copy-on-Write I/O during regular I/O on these files on the shadow-copied volume.

MSDEWriter

Beginning with Windows Server 2008, this writer exists to delete search index files from shadow copies after creation.  This is done to minimize the impact of Copy-on-Write I/O during regular I/O on these files on the shadow-copied volume.  This Writer is frequently called on by operations from the SQLSERVERAGENT service.

NPS Writer

Responsible for protecting the Network Policy Server.

NPS VSS Writer

Responsible for protecting the Network Policy Server.

Search VSS Writer

Responsible for Search Operations.

Performance Counters Writer

Starting with Windows 7 and Server 2008r2, this writer reports the performance counter configuration files.  These files are only modified during application installation and should be backed up and restored during system state backups and restores.

Registry Writer

The registry writer is responsible for the Windows registry.

SCVMM Express Writer

Responsible for the Microsoft System Center Virtual Machine Manager.

Shadow Copy Optimization Writer

Beginning with Windows Vista and Windows Server 2008, this writer deletes certain files from volume shadow copies.

SMS Writer

Responsible for the System Center Configuration Manager.

SPSearch VSS Writer

Responsible for the SharePoint Server Search operation.

SQL Server Writer

The SQL Server Writer provides the application aware backups for Microsoft SQL Servers.  It also provides the ability for performing log truncation of Microsoft SQL Transaction Logs.

System Writer

Beginning with Windows Vista and Windows Server 2008, the system writer enumerates all operating system and driver binaries.

Task Scheduler Writer

Starting with Windows 7 and Server 2008r2, this writer reports the Task Scheduler’s task files.

TermServLicensing

Responsible for protecting the Microsoft Terminal Server Licensing.

VSS Metadata Store Writer

Starting with Windows 7 and Server 2008r2, This writer reports the writer metadata files for all VSS express writers.

WDS VSS Writer

Beginning with Windows Vista and Windows Server 2008, this writer reports the writer metadata files for all VSS express writers.

WINS Jet Writer

Beginning with Windows Server 2003, this writer is responsible for enumerating files required for WINS.

WMI Writer

Beginning with Windows Vista and Windows Server 2008, this writer is used for identifying WMI-specific state and data during backup operations.

 

Posted in Uncategorized | Tagged , | Leave a comment

Downgrade process Windows 2012 to 2008

“The downgrade process

Follow these steps to downgrade to a previous version of Windows or Windows
Server software:

 

  1. Obtain genuine Windows media and a corresponding product key for the version
    of Windows that is eligible for downgrade.

    • The media should come from a prior legally licensed version from the OEM or
      Retail channels.
    • End users who are licensed separately through Microsoft Volume Licensing
      (VL) may provide their VL media and key to a system builder to facilitate the
      downgrade on their own systems.
  2. Insert the downgrade-eligible version of Windows media in the CD drive and
    follow the installation instructions.
  3. Type the product key.
    • If the software was previously activated, you will not be able to activate
      it online. In this case, the appropriate local Activation Support phone number
      will be displayed. Call the number and explain the circumstances. When it is
      determined that the end user has an eligible Windows license, the customer
      service representative will provide a single-use activation code to activate the software. Please note that Microsoft does not provide a full product key in this scenario.
  4. Activate the software.”

 

Posted in Uncategorized | Leave a comment

Active Directory get list of users with PowerShell

Today, I had task how to export list of users from specific group.

So it’s easy:
1. Open PowerShell
2. Run:
Import-Module ActiveDirectory //this will load Active Directory libs
3. Get-ADGroupMember -identity “Enterprise Admins” | select name | Export-csv -path C:\Output\EnterpriseAdmins.csv -NoTypeInformation

With this command you don’t need to specify whole object path, just name, if you have another group name – just replace Enterprise Admins with your group name. Please make sure you have Output directory on drive C, otherwise you will got next:
Export-Csv : Could not find a part of the path 'C:\output\EnterpriseAdmins.csv'.
At line:1 char:74
+ Get-ADGroupMember -identity "Enterprise Admins"| select name | Export-csv <<<< -path c:\output\EnterpriseAdmins.csv -NoTypeInformation
+ CategoryInfo : OpenError: (:) [Export-Csv], DirectoryNotFoundEx ception
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.Ex portCsvCommand

I hope this will help you.

Posted in Uncategorized | Leave a comment