Skip to main content
1 vote
0 answers
58 views

Set Date Format In Multi Table Powershell CSV Export [duplicate]

I am working with a Powershell script, using DBATools, which exports data from multiple tables to individual CSV files. In the tables, I am needing to reformat the date to yyyy-mm-dd. I found the ...
buck1112's user avatar
  • 512
0 votes
1 answer
98 views

Adding a key-value pair to a JSON object in Powershell without using ConvertFrom-Json

Is there a way to add a key-value pair to a JSON object in Powershell without using the ConvertFrom-Json cmdlet? The script I currently have outputs a JSON file that is unreadable because it has ...
mimi m's user avatar
  • 71
3 votes
1 answer
92 views

How can I output a PSCustomObject from a compiled Cmdlet?

I have a compiled Cmdlet that works with Hashtables. I would like to write a [pscustomobject] of the hashtable to the pipeline. In a PowerShell script block that would be accomplished using the ...
alx9r's user avatar
  • 4,343
0 votes
2 answers
92 views

Usage of powershell Set-Disk on USB attached devices

I try to run the following statements on an usb attached device : Clear-Disk 2 -RemoveData -RemoveOEM -Confirm:$False Set-Disk -Number 2 -PartitionStyle MBR When the device is a usb stick (flash disk)...
RPO's user avatar
  • 3
0 votes
0 answers
115 views

Power BI REST API: RLS Role Not Applied in Query Execution Using PowerShell Cmdlets

I am testing Row-Level Security (RLS) using the Power BI REST API but noticed that roles are not being applied. The query executes with full admin access instead of enforcing the assigned role. ...
zargawy's user avatar
  • 43
2 votes
0 answers
41 views

Is there a way to programmatically determine if a compiled cmdlet requires elevation (other than simply running the command)?

Is there a way to use reflection to programmatically inspect and determine if a given compiled cmdlet requires elevation? Notes: This question concerns compiled cmdlets, not script (text) files. ...
Paul π's user avatar
  • 543
1 vote
3 answers
119 views

For a compiled Cmdlet, how can I output each object immediately from an invoked scriptblock?

Consider the following Invoke-Command { 'a'; Write-Verbose 'a' -Verbose 'b'; Write-Verbose 'b' -Verbose } | . { process { Write-Verbose "downstream_$_" -Verbose } } which outputs ...
alx9r's user avatar
  • 4,343
0 votes
1 answer
387 views

The type initializer for 'iText.Commons.Actions.EventManager' threw an exception

I'm trying to build a simple PowerShell cmdlet that will use iText7 to open a PDF file and output the text. I've tried using the iText7Module from PowerShell Gallery, but the ...
evandrunen's user avatar
1 vote
0 answers
114 views

PowerShell Exchange Commands Not Working in Docker on Linux for Exchange On-Premises 2007

I am currently developing a REST API that needs to interact with an on-premises Microsoft Exchange server (Exchange 2007, not Office 365) through PowerShell commands. In my development environment (...
Juan Luis Martos's user avatar
0 votes
1 answer
206 views

Why is there a discrepancy between storage usage in Exchange Admin Center and 'Get-MailboxFolderStatistics'?

I'm currently working on Exchange license storage usage analysis and encountered a discrepancy between the storage usage size shown in the Exchange Admin Center (EAC) for each user and the size ...
CodeSeeker's user avatar
0 votes
0 answers
421 views

Unable to catch Powershell cmdlet exception calling MS-Graph API [duplicate]

I have Powershell script which I use to remove MFA authentication methods of a user through MS-Graph. At a certain point the code executes this command: try { Remove-...
user avatar
2 votes
1 answer
78 views

Powershell C# Extension How to Set the DefaultDisplayProperty when returning data with Write Object

I have created a PowerShell cmdlet in C#: using System.Management.Automation; using thosepeskyexternalclasses [Cmdlet(VerbsCommon.Get, "GetActivity", SupportsTransactions = false)] public ...
William Holmes's user avatar
1 vote
0 answers
1k views

Unable to Use Get-MessageTrace Command in Exchange Online

I’m having trouble with PowerShell and Microsoft Exchange. I’m trying to interact with Exchange Online via PowerShell to retrieve all emails received within a specified date range and display them on ...
Daniele's user avatar
  • 13
0 votes
1 answer
84 views

The term 'ng' is not recognized as the name of a cmdlet, function, script file, operable program

Why is the ng command not working ? The command should work but it's giving me an error like: The term 'ng' is not recognized as the name of a cmdlet, function, script file, or operable program. ...
Sakshi Dubey's user avatar
-5 votes
1 answer
187 views

C++ Compiler error : The term 'make' is not recognized as the name of a cmdlet [closed]

I want to compile cpp project in vscode and I write "make to terminal after that I have a error :enter image description here What do you think about this error .How I solve this? I can't ...
bilaltan's user avatar

15 30 50 per page
1
2 3 4 5
60