Error while running powershell script in azure sentinel

%3CLINGO-SUB%20id%3D%22lingo-sub-2754066%22%20slang%3D%22en-US%22%3EError%20while%20running%20powershell%20script%20in%20azure%20sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2754066%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20run%20powershell%20script%20to%20add%20playbooks%20in%20Azure%20Sentinel%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FTools%2FPowerShell%2FAdd-PlaybooksToSentinel%2FAdd-PlaybooksToSentinel.ps1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Fblob%2Fmaster%2FTools%2FPowerShell%2FAdd-PlaybooksToSentinel%2FAdd-PlaybooksToSentinel.ps1%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EErrors%20coming%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThe%20term%20'Out-GridView'%20is%20not%20recognized%20as%20a%20name%20of%20a%20cmdlet%2C%20function%2C%20script%20file%2C%20or%20executable%20program.%20Check%20the%20spelling%20of%20the%20name%2C%20or%20if%20a%20path%20was%3CBR%20%2F%3E%7C%20included%2C%20verify%20that%20the%20path%20is%20correct%20and%20try%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECannot%20validate%20argument%20on%20parameter%20'Subscription'.%20The%20argument%20is%20null%20or%20empty.%20Provide%20an%20argument%20that%20is%20not%20null%20or%20empty%2C%20and%20then%20try%20the%20command%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%2C%20how%20to%20fix%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2756132%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20while%20running%20powershell%20script%20in%20azure%20sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2756132%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1117494%22%20target%3D%22_blank%22%3E%40FahadAhmed%3C%2FA%3E%26nbsp%3BWhich%20version%20of%20PowerShell%20are%20you%20running%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I am trying to run powershell script to add playbooks in Azure Sentinel, 

 

https://github.com/Azure/Azure-Sentinel/blob/master/Tools/PowerShell/Add-PlaybooksToSentinel/Add-Pla...

 

Errors coming: 

The term 'Out-GridView' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was
| included, verify that the path is correct and try again.

 

Cannot validate argument on parameter 'Subscription'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

 

Any idea, how to fix it?

2 Replies

@FahadAhmed Which version of PowerShell are you running?

@Gary Bushey , its showing version 7.1.4

 

Name Value
---- -----
PSVersion 7.1.4
PSEdition Core
GitCommitId 7.1.4
OS Linux 5.4.0-1058-azure #60~18.04.1-Ubuntu SMP Tue Aug 31 20:34:46 UTC 2021
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0