Product, version and build: 7.3.108
32 or 64 bit version of product: 64-Bit
Operating system: Windows 10
32 or 64 bit OS: 64-Bit
Hello,
I have been unable to to have PrimalScript's PrimalSense to autocomplete the Azure Active Directory cmdlets in the Editor like it does on the PowerShell ISE.
Is there anyway I can have PrimalSense autocomplete the Azure Active Directory cmdlets?
Some of the cmdlets used for Azure Active Directory is Connect-MsolService, Set-MsolUserLicense, etc.
One annoying thing I found in PrimalScript editor is any time I try to write a for...loop command in the Editor, it tries to upper case the "i" letter of the word in to "I", such as in foreach ($i in $list) {$i}. Instead if leaving the "in" keyword as it is, it tries to upper case the "i" of the word "in" to "In" instead.
Is there any way to remove the autocomplete of the keyword "in" so that the "i" letter stays as I type it without upper casing the letter "I"?
Cmdlet Autocomplete & "In" autocomplete
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Cmdlet Autocomplete & "In" autocomplete
In PrimalScript, look under "File" menu, click on "Options" then under "Text Editor" in "PrimalSense | PrimalSense Option" unchecked the "Auto case correction". This should stop the behavior you're experiencing.
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: Cmdlet Autocomplete & "In" autocomplete
Bring up the cache editor in the ribbon and make sure your Azure module is selected for the platform and powershell version you are using.
Please also make sure that you have that same platform and PowerShell version selected in PrimalScript's ribbon.
Please also make sure that you have that same platform and PowerShell version selected in PrimalScript's ribbon.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Cmdlet Autocomplete & "In" autocomplete
When I unchecked the "Auto case correction" in "Text Editor" in "PrimalSense | PrimalSense Option" dialog, it stopped the auto casing for the "in" keyword, and it also stopped to autocomplete and auto case for the functions that I had within the script.
For the Autosense of the Azure modules, I added all the Azure modules for the proper platform and PowerShell version in cache editor and clicked on "Build Cache" button, but the autosense still does not work even after restarting PrimalScript.
For the Autosense of the Azure modules, I added all the Azure modules for the proper platform and PowerShell version in cache editor and clicked on "Build Cache" button, but the autosense still does not work even after restarting PrimalScript.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Cmdlet Autocomplete & "In" autocomplete
Thanks for responding.
We are taking a look at it and we'll get back to you soon.
We are taking a look at it and we'll get back to you soon.
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: Cmdlet Autocomplete & "In" autocomplete
What version of the Azure module do you have installed?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: Cmdlet Autocomplete & "In" autocomplete
I fired up PrimalScript with default settings and typed foreach ($i in $list) {$i} in a PowerShell Script.
The 'in' did not case correct to 'In'
Do you have a variable called '$In' in your script or a function 'In' or a '-In' parameter?
The 'in' did not case correct to 'In'
Do you have a variable called '$In' in your script or a function 'In' or a '-In' parameter?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Cmdlet Autocomplete & "In" autocomplete
The Azure for Active Directory version is 1.1.166.0.
For the in casing, you can try copy the following for loop script onto a blank page of the PrimalScript's Editor.
As soon as you change In to in on the first line, PrimalScript will upper case the i in front of in to In.
For the in casing, you can try copy the following for loop script onto a blank page of the PrimalScript's Editor.
As soon as you change In to in on the first line, PrimalScript will upper case the i in front of in to In.
Code: Select all
foreach ($objUser In $unlicensedUserList)
{
if ($groupUserList.ContainsKey($objUser.UserPrincipalName))
{
$userPrincipalName = $objUser.UserPrincipalName;
$displayName = $groupUserList.Item($userPrincipalName);
$msg = "Activating license for $displayName. . .";
try {
Set-MsolUserLicense -UserPrincipalName $userPrincipalName -AddLicenses "domain:ENTERPRISEPACK";
$msg = "Activation completed successfully.";
$object = '' | Select-Object 'User Name','Activated',Message;
$object.'User Name' = $displayName;
$object.'Activated' = $true;
$object.Message = $msg;
$activatedUserList += $object;
}
catch
{
$msg = $_.Exception.Message;
$object = '' | Select-Object 'User Name','Activated',Message;
$object.'User Name' = $displayName;
$object.'Activated' = $false;
$object.Message = $msg;
$unActivatedUserList += $object;
}
}
}
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: Cmdlet Autocomplete & "In" autocomplete
This is a mix of two issues here, which makes this a little bit cumbersome. In the future please create a thread for one issue.
I will investigate both and see what I can find out.
I will investigate both and see what I can find out.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: Cmdlet Autocomplete & "In" autocomplete
I paste your code in a new windows and correct to 'In' to 'in'
I do not see any case correction.Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.