Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object reference not set to an instance of an object #86

Open
kmarcadams opened this issue Oct 13, 2023 · 0 comments
Open

Object reference not set to an instance of an object #86

kmarcadams opened this issue Oct 13, 2023 · 0 comments

Comments

@kmarcadams
Copy link

Using a call of:

Get-NTFSAccess -Path $mypath -Verbose
$ERROR[0] | fl -force

VERBOSE: EnablePrivileges enabled in PrivateDate
Get-NTFSAccess : Object reference not set to an instance of an object.
At C:\Users<redacted>\CAD_Folder_Creation.ps1:63 char:1

  • Get-NTFSAccess -Path $mypath -Verbose
  •   + CategoryInfo          : OpenError: (\\<redacted>\01-MOD:String) [Get-NTFSAccess], NullReferenceException
      + FullyQualifiedErrorId : ReadFileError,NTFSSecurity.GetAccess
    
    

VERBOSE: EnablePrivileges enabled in PrivateDate
VERBOSE: Disabeling all 4 enabled privileges...
VERBOSE: TakeOwnership disabled
VERBOSE: Restore disabled
VERBOSE: Backup disabled
VERBOSE: Security disabled
VERBOSE: ...finished

writeErrorStream : True
Exception : System.NullReferenceException: Object reference not set to an instance of an object.
at NTFSSecurity.BaseCmdlet.GetRelativePath(String path) in C:\Git\NTFSSecurity\NTFSSecurity\BaseCmdlets.cs:line 117
at NTFSSecurity.BaseCmdlet.GetFileSystemInfo2(String path) in C:\Git\NTFSSecurity\NTFSSecurity\BaseCmdlets.cs:line 74
at NTFSSecurity.GetAccess.ProcessRecord() in C:\Git\NTFSSecurity\NTFSSecurity\AccessCmdlets\GetAccess.cs:line 91
TargetObject : \\01-MOD
CategoryInfo : OpenError: (\\01-MOD:String) [Get-NTFSAccess], NullReferenceException
FullyQualifiedErrorId : ReadFileError,NTFSSecurity.GetAccess
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at Set-FolderPermissions, C:\Users<redacted>\CAD_Folder_Creation.ps1: line 63
at , C:\Users<redacted>\CAD_Folder_Creation.ps1: line 650
PipelineIterationInfo : {0, 1}
PSMessageDetails :
If I use "Get-NTFSAccess \\01-MOD" in a clean powershell session the command returns correctly. If I try after this error comes up, I get the same error. What is the NullReference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant