Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Wednesday, March 8, 2017

Network Connection Folder Empty

Recently I had an issue with Server not displaying the Network Adapters.

 image

I checked and ping and it was okay.  But when I did a Failover Cluster Validation, it displayed error cause it couldn’t find the network.

The following are the steps that was carried out to have it resolve

  • Open regedit .
  • Drill to the following in the registry

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network

  • On the right-panel look for Config.  Delete the key.

    image
  • No worries.  When delete this key, it’s just removing the configuration cache.
  • Restart the server or just reopen the Control PanelNetwork, it will display once again.

    SNAGHTMLc1d9bb

keywords : Network Connection missing, network not display, network connections folder is empty, not showing network adapter list

Tuesday, June 28, 2016

PowerShell–Listing of Folder Permission, export to CSV

Today would like to share with you about a way to list down all the Folder and subfolder permission into a CSV format.  This is good especially for internal or external audits.

There are two options that you can run.

  • Run in the File Server (provided you have PowerShell installed)
  • Run from your Computer (Map the File Server Drive, and also provided you have PowerShell installed in your computer)

The coding is as below :

# This is the file specified for the Output of CSV. Make the necessary change
$OutFile = "C:\Download\Permission.csv"

$Header = "Folder Path,IdentityReference,AccessControlType,IsInherited,InheritanceFlags,PropagationFlags"
Del $OutFile
Add-Content -Value $Header -Path $OutFile


# This is the top path of where want to scan the permission from.  This will include the sub folders
$RootPath = "C:\Download\Driver"

$Folders = dir $RootPath -recurse | where {$_.psiscontainer -eq $true}

foreach ($Folder in $Folders){
    $ACLs = get-acl $Folder.fullname | ForEach-Object { $_.Access  }
    Foreach ($ACL in $ACLs){
    $OutInfo = $Folder.Fullname + "," + $ACL.IdentityReference  + "," + $ACL.AccessControlType + "," + $ACL.IsInherited + "," + $ACL.InheritanceFlags + "," + $ACL.PropagationFlags
    Add-Content -Value $OutInfo -Path $OutFile
    }}

Note : Make changes to the Pink in colour according to your CSV file and which path you want to scan your File Server and export out the permission listing.

The output will be something like below when open with Excel :

image

I’m executing on my PC, that’s the reason I have the output as above.

Thank you and hope this helps.

keywords : ACL, folder permission, powershell, File Server, fileserver, Access list, access control list, permission to CSV

Monday, April 4, 2016

Killing a Hung VM in Task Manager

Sometimes the VM we tried to stop hangs.  So in order to kill the process using the Task Manager, we can end process of VMWP.exe.  But the next question is which one.  Each VM has a unique Process ID.

image

Therefore, I launch the elevated Powershell by executing the following command below

Get-WmiObject win32_process -Filter "Name like '%vmwp%'" | Select-Object ProcessID, @{Label="VMName";expression={(Get-VM -Id $_.commandline.split("")[1]|Select-Object VMName).VMName}}|ft –AutoSize

image

So I go back to the Task Manager and Right-Click on it and end task,base on the Process ID of that particular VM.

image

Hope this command helps you as it helped me.

keywords : hang VM, hung VM, stuck VM, Hyper-V virtualization stuck Server 2012 R2, vmwp.exe, killing vwmp.exe

Friday, March 11, 2016

DPM 2012 Reporting Issue (ID : 220)

After upgrading from SCDPM 2012 SP1 to SCDPM 2012 R2, I hit the issue when I tried to configure the Reporting to be send out periodically in the Report Module of SCDPM 2012 R2.

image

The steps taken was the following :

  • Launch the Reporting Services Manager (in my example is SQL 2008 R2, since it’s upgraded gradually from SCDPM 2012 SP1 to SCDPM 2012 R2)
  • Ensure to the correct database that I’m pointing to  (e.g. MSDPM2012)
  • Navigate to E-Mail Settings.
  • Key in the valid Sender Address and SMTP Server.
  • Click Apply

SNAGHTML5532c4a

  • Launch the SCDPM 2012 R2 – Reporting
  • Configure the schedule reporting with emails, tested with no issues.keywords : SCDPM 2012, DPM cannot enable e-mail subscription for reports unless SMTP details are configured in the remote SQL Server Reporting Service Installation. SMTP details need to be configured manually when an existing SQL Server is chosen to be used for DPM during DPM setup.  Please enter the SMTP server name, SMTP port number and SMTP From address manually in the SQL Server Reporting Services configuration File.
    Configuration file path : c:\Program Files\Microsoft DPM\SQL\MSRS10.MSDPM2010\Reporting Services\ReportServer\RSReportServer.config
    The SMTP Server  details on the SMTP Servers tab in the Options dialog enables only DPM alert notifications. For more details, see DPM Help (ID : 220)
    SCDPM Report error, Systems Center Data Protection Manager Report Error, cannot configure email distribution in DPM report

Tuesday, November 3, 2015

How to Remove Azure Account (Cached) using PowerShell

Recently I’ve done quite a lot of testing using various accounts to Azure.  All the commands are executed in the PowerShell ISE (Run ISE are Administrator).

The PowerShell should have the Azure Commands in it already.  If not, can download from here.

Select the Install from the Command-line tools

image

When I tried to Get-AzureAccount, it displayed more than one account and subscriptions

image

I need to remove the other subscriptions.  Therefore I perform as follow :

image

Execute the command as below :

  • Get-AzureAccount | format-table id

Once displayed, I execute to remove the account using

  • Remove-AzureAccount account-name

Note : Just replace the account-name with the account that needs to be deleted.

Another way is to remove all the accounts then re-add it back. 

To do this execute it as below to remove all the accounts :

  • Get-AzureAccount | ForEach-Object {Remove-AzureAccount $_.ID -Force}

To add the account that I’m working on, use :

  • Add-AzureAccount

 

keys : add azure account, remove azure account in cache, Azure powershell command line, command-line, azure subscription, AzureSubscription, get-azureaccount, remove-azureaccount

Friday, October 30, 2015

Azure–Token Error when execute from Powershell

I was doing the following :

  • Connect to a Azure from a Computer A
  • Execute the connection from PowerShell and connecting to Azure
  • Everything was ok.

Then I went to another location.  Executing the same process by connecting to Azure through the PowerShell.  I had no issue when executing the Add-AzureAccount but when I check I tried to get the subscription, I had the error as below :

image

After some finding, it seemed the token in the second location has expired.  Therefore I did the following :

  • The User I login is Administrator, therefore I go to :

C:\Users\Administrator\AppsData\Roaming\Windows Azure Powershell

Note : Change only the value in the PINK, with whatever credential you use to login to the PC.

  • Delete all the content in the directory

image

  • Proceed back to PowerShell and Add-AzureAccount
  • Then execute the Get-Subscription will display with no issue.

keywords : failed to refresh token, no service namespace, the server returned an error (400), AadAuthenticationFailedExecption, Bad Request

Thursday, October 8, 2015

DPM Reporting – An error has occurred during report processing

I hit an issue on launching the DPM reporting.  The DPM is functioning well except the reporting.  It’s the issue of the SQL Reporting settings.

image

It stated as :

An error has occurred during report processing. (rsProcessingAborted).
Query execution failed for dataset ‘DataSet2’. (rsErrorExecutingCommand)
Invalid object name ‘vw_DPM_Replica’.

Steps taken to resolve :

  • Launch the Reporting Services Configuration Manager in the DPM
image
  • Select the Report Manager URL on the left panel
  • Click on the URL on the right panel

image

  • Double-click on the DPMReporterDataSource
image
  • The Connection string is missing.
  • Minimize this screen

image

  • Create a file call dbtest.udl on the desktop (it’s a build in Windows)
  • Double click on it.

image

  • Once the Data Link Properties launch, Select the server name (using the drop down)
  • Use the Windows NT integrated security for the credential
  • Select the database (using the drop down)
  • Click Test Connection

image

  • Click OK once it’s successful

image

  • Right-click on the dbtest.udl and open with notepad

image

  • Copy the text from “Intergrated ….. “till the end of the line

image

  • Maximize the DPMReporterDataSource
  • Paste the copied text into the Connection string.
  • Click on Test Connection (may request to key in password again)
  • Once successful, click Apply.

Launch the DPM reporting with no issue occurred.

keyword : DPM, SQL, SRSS, Reporting Services, rsErrorExecutingCommand, rsProcessingAborted, dataset, query execution failed, invalid object name

Thursday, August 13, 2015

Azure Recovery Services–backup increased to 54TB limit

Earlier last month I shared on how to configure the DPM 2012 R2 with Azure Recovery (Backup Vault)

Microsoft Azure recovery Services team has officially released the backup per protection group from 1.7TB limit and now to 54TB limit on 12th Aug 2015.

You need to have the Azure Recovery Services Agent 2.0.8715.0 or higher in order for the backup to exceed the limitation of 1.7TB.

image

The news release is here.

keynote : Azure limit, ASR, Azure Recovery Services, DPM, SCDPM, storage limit.backup limit

Friday, July 31, 2015

Class 20409B - Server Virtualization with Windows Server Hyper-V and System Center

 

Just finished conducting a 5-days class on Server Virtualization using Hyper-V and System Center.  During class, I shared real life scenarios on how it was implemented, what are the obstacles they will face if planning were not done properly in the first place before rolling out.

Feeling happy that the students went back with knowledge.

keywords : 20409, Hyper-V, virtualization, backup, protection, VMM, virtual machine manager, dpm, azure, cloud, vmmlibrary,

Wednesday, July 22, 2015

Upgrade Windows Server 2012 R2 Evaluation Version to License/ Full Version

I had been doing a development or lab environment with Windows 2012 R2 Datacenter Evaluation copy.  Lots of work has been done.

Instead of reinstalling the entire copy of a Windows Server 2012 R2 Full Version and then reinstalling the application that I’ve been doing lots of work on it, I found a way to upgrade the Windows Server 2012 R2 Evaluation to a Full Windows Server 2012 R2.

(Note : This does not work for Domain Controllers running on evaluation license)

The following are the steps that I want to share.

image

The above shows the desktop of the Windows 2012 R2 that I’ve been testing and the 180 days is over.  I can do the slmgr.vbs –rearm , however had decided to go a full version and put into production since testing has been done for the application installed in this server.

image

Using the command slmgr.vbs /dlv would gather the information for the volume licensing.

image

As the arrow shows the information is an evaluation Windows Server 2012 copy.

Another way is to launch the command prompt in elavated (run as administrator).

Key in the command as below in the command prompt.

dism /online /get-currentedition

image

As you see, it shows the Current Edition is an Evaluation copy.

Next command is to check what version this current Evaluation can be upgrade to.

dism /online /get-targeteditions

image

If the evaluation copy is a ServerStandard, it will allow the option to upgrade to Standard Full or Datacenter Full edition

Next get the full license key ready. The next command will need to input in the command.  The command is as :

For DataCenter Edition key in as below :

dism /online /set-edition:ServerDataCenter /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula

For ServerStandard Edition key in as below :

dism /online /set-edition:ServerStandard /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula

Only make the changes in the Pink colour (input your valid license key).  In my example I’m using the DataCenter edition.

SNAGHTML2f84ac

It will look something like the above displayed.  Press enter to execute.

image

Press Y to restart the computer

image

image

The computer will restart/reboot twice.

Once it’s done, login the Windows and you’ll have the full version of the Windows 2012 R2

image

Reference : Evaluation Versions and Upgrade Options for Windows Server 2012

keywords : upgrade evaluation to full copy, windows 2012 R2, Windows 2012 server, upgrade eval, full license, server 2012 eval, slmgr, rearm

Friday, December 12, 2014

Drag and Drop Files into VM

I’ve a Windows 2012 R2 running Hyper-V.  A VM is running inside this Hyper-V but I need to copy some of the files into the VM.  One of the reason for not connecting to network is that the VM is cloned and I do not want to clash with the Production VM.

There’s a way that you can Drag and Drop into the VM from the Hyper-V Host into the VM.

Open the Hyper-V Settings – Click on the Enhanced Session Mode Policy.

Mark a check in the “Allow enhanced session mode” and click OK.

SNAGHTML64b88ea

Once that is done, you can drag from your Hyper-V Host into the VM desktop or any folder that you want to copy into the VM.

Thank you and hope that helps.

keyword : drag and drop files, folders into VM that is not connected to network in Hyper-V host.

Friday, March 28, 2014

Unable to Backup using DPM or Local Windows Backup–missing VSS

Here’s the scenario :

  • Two Windows Server 2012 running Hyper-V
  • Two Node Clusters
  • Backup software : DPM 2012 SP1

When the VM resides on Host1, the DPM can backup VMs with no issue.  However when the VMs resides in Host2, the DPM fails to backup.

Checked on the Host2 and found many errors of 8194.

image

To isolate further, I tried to backup Folders of Host2 using DPM, it still failed.  Additional to that, tried the Windows Backup locally on Host2, that too failed.

Next is to try a tool which comes in Windows Server 2008 and Windows Server 2012.  It’s called the Diskshadow.

C:\Diskshadow
Diskshadow > set context persistent
Diskshadow > set verbose on
Diskshadow > begin backup
Diskshadow > Add volume D: alias VolumeD

The output as follow :

image

Next I did a comparison of Host1 and Host2 by using the command as follow in the Diskshadow

Diskshadow > list providers

Found out that Host1 has all 4 but Host2 has only 2 of the providers.  The missing ones are highlighted in the pink box.

image

So go to the following registry in Host1:

HKEY LOCAL MACHINE\SYSTEM\CURRENT CONTROL SET\SERVICES\VSS\PROVIDERS

image

Export both the missing key registry from Host1

image

image

Then in the Host2, I import both the keys that was exported above from Host1.

In the Host2, I use the Diskshadow to check the providers :

image

Tried the backup from DPM, and it’s working already.  Hope this helps . 

keywords : Microsoft Hyper-V VSS Writer failed retryable error, VSS Issue error 8194, DPM 2012 SP1, DPM backup fail ,

Creation of recovery points for Backup Using Child Partition Snapshot on have failed. The last recovery point creation failed for the following reason: (ID: 3114)
DPM encountered a retryable VSS error. (ID: 30112)

Monday, March 17, 2014

A VSS Writer has rejected an event with error 0x800423f3

Recently I hit the issue for the DPM backup the VMs.  The DPM backing the Hyper-V VMs failed with the following message in the event viewer of the Hyper-V host that the VM is residing.

image

Then in the command prompt (elevated “run as administrator”) I list the VSS by typing the command Vssadmin list writers.

image

In the DPM console, had the following :

image

The steps that I took to resolve the issue is as follow :

  • Shutdown the VM
  • Perform the VM backup through the DPM
  • In the Hyper-V host, launch the Hyper-V Manager and would be able to see the status as “backing up …”
  • Once the backup is completed in then I start up the VM.
  • Waited for 20 mins for the VM to be up and running, then perform another backup (create another recovery point in DPM)
  • It’s successful and case is resolve.

In the Hyper-V Host I run again the command prompt (elevated “run as administrator”) by typing the command Vssadmin list writers and check the status.

image

Hope it helps.

keywords : VSS, vssadmin, a vss writer has rejected an event with error 0x800423f3, the writer experienced a transient error, if the backup process is retried, the error may not reoccur, last error : retryable error, Microsoft Hyper-V VSS Writer, DPM encountered a retryable VSS error (ID 30112) , vssadmin list writers

Wednesday, February 19, 2014

Performance Monitor–Create Data Collector Set Greyed Out

Recently I tried to create a New Collector Set for the Performance Monitor for one of the customer’s request.  When I launched the Performance Monitor, click to create a new Data Collector Set and found it was greyed out.

image

After some troubleshooting, it seems that a service related to it was disabled.

image

All was done is click on the Properties of the Task Scheduler and select as Automatic Start Up.   You can click on the start to get the Task Scheduler instead of rebooting for this round.  Next time the server reboots, it will auto-start the services cause you have made the changes.

Once that’s done, go back to the Performance Monitor and create the new Data Collector Set, the Next button is no more grey out.

Hope this helps Smile.

keywords : Performance monitor, next button grey out greyed out, task scheduler, cannot create data collecter set