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?
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
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?