Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

WFA Powershell Error - Drive not found


While running ps.cmd from WFA windows server we see error "Get-Item: Cannot find drive. "


ps.cmd contains,


@rem opens a powershell prompt with WFA's commandlets loaded
@PowerShell.exe -NoExit -ExecutionPolicy remotesigned -Command "& {cd (((Get-Item (Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\NA_WFA_SRV).ImagePath.Split(" ")[0]).Directory.fullname)); ../PoSH/profile.ps1; ((Get-Host).UI.RawUI).WindowTitle = 'WFA PS'; clear}"


profile.ps1 contains,


$ModulesDir = split-path $MyInvocation.MyCommand.Path
Import-Module $ModulesDir\Modules\WFA
Import-Module $ModulesDir\Modules\WFAWrapper
Import-Module $ModulesDir\Modules\DataONTAP


Executing Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\NA_WFA_SRV seems to be good.


PSPath               : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NA_WFA_SRV
PSParentPath    : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
PSChildName     : NA_WFA_SRV
PSDrive               : HKLM
PSProvider         : Microsoft.PowerShell.Core\Registry
Type                   : 16
Start                   : 2
ErrorControl      : 1
ImagePath        : "E:\Program Files\NetApp\WFA/bin/NA_WFA_SRV.exe" //RS//NA_WFA_SRV
DisplayName     : NetApp WFA Server
DependOnService : {NA_WFA_DB, Tcpip, Afd}
ObjectName      : LocalSystem
Description       : NetApp WFA Application Server running JBoss AS7


Kindly find the error screenshot atttached.



You must be using an old version of WFA, WFA2.1 or older. This is a bug in the WFA2.1 and below versions.


Replace the ps.cmd contents with the below code:



@rem opens a powershell prompt with WFA's commandlets loaded
@PowerShell.exe -NoExit -ExecutionPolicy remotesigned -Command "& {cd (Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\NA_WFA_SRV).ImagePath.substring(1, $(Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\NA_WFA_SRV).ImagePath.length -34); ../PoSH/profile.ps1; ((Get-Host).UI.RawUI).WindowTitle = 'WFA PS'; clear}"




Save the file and now launch ps.cmd.









If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.


Hi Sinhaa,

Thanks for your recommendations. We made changes to ps.cmd as per your recommendation. It worked, but was not able to run WFA commands eg: " show-WFAConfig -name TransactionTimeout".

It seems like modules are not loaded. Will be cheking it during our next scheduled.

Kindly find the attached error.






I already told that you are using a very old version of WFA. I gave you the fix for that. But the cmdlet Show-WfaConfig is not available with that version. Show-WfaConfig is only available from WFA3.0 and above.


WIth WFA 3.0 and above the original issue of ps.cmd failing will also not be seen.



If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner