Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
Hi,
I try to do remote operations in a volume served by cifs, to delete files automaticaly.
If I use Mount-NaController:
PS FILER:\vol\xxx\xxx_xxx> Measure-Command {Get-ChildItem -recurse}
Days : 0
Hours : 0
Minutes : 4
Seconds : 45
Milliseconds : 103
Ticks : 2851034460
TotalDays : 0,00329980840277778
TotalHours : 0,0791954016666667
TotalMinutes : 4,7517241
TotalSeconds : 285,103446
TotalMilliseconds : 285103,446
If i try this over network connection un the same PC:
PS H:\SC000001\POWERSHELL\SCRIPTS> Measure-Command {Get-ChildItem FILER\XXX_XXX -recurse}
Days : 0
Hours : 0
Minutes : 0
Seconds : 55
Milliseconds : 317
Ticks : 553178542
TotalDays : 0,00064025294212963
TotalHours : 0,0153660706111111
TotalMinutes : 0,921964236666667
TotalSeconds : 55,3178542
TotalMilliseconds : 55317,8542
There is an important difference.
Any suggestion?
Thx.
Solved! See The Solution
Yes actually there is an important difference. Mount-NaController connects a PowerShell provider. When you *use* that drive the provider is executing ZAPI request to the controller to enumerate the file/folder structure. This is inherently slower than the native CIFS RPC request that Get-ChildItem uses. The advantage of the provider is that it can enumerate any file/folder regaurdless of the actual permissions. If you have native permissions to a share always use the native powershell cmdlets. Treat the provider as a failback when you either don't have a share created, or your access is limited.
Hope that helps,
~Glenn
Yes actually there is an important difference. Mount-NaController connects a PowerShell provider. When you *use* that drive the provider is executing ZAPI request to the controller to enumerate the file/folder structure. This is inherently slower than the native CIFS RPC request that Get-ChildItem uses. The advantage of the provider is that it can enumerate any file/folder regaurdless of the actual permissions. If you have native permissions to a share always use the native powershell cmdlets. Treat the provider as a failback when you either don't have a share created, or your access is limited.
Hope that helps,
~Glenn
Ok, Tahks..